I am a very beginner in java coding and would need help on getting the codes for these exercises. Why I'm asking is because time is running out and deadline coming up too fast.
1. Small mathematics application. Write a program that asks the user mathematical questions (at
least 5 questions) such as “What is 5*21?”. The user should be able to stop the program by writing 0
or by answering correctly and thus getting the next question. (Hint you can use for example .equals()
if you want to compare Strings).
2. Ticket vending application. Create a vending system for individual train ticket system. We assume
that there are only four possible stations called: Helsinki, Pasila, Tampere and Turku. The tracks of
trains are built in a way that all the trains need to go from Helsinki to Pasila. From Pasila they can go
either to Turku or Tampere. We assume that you have to travel from Tampere to Turku via Pasila.
Our system only sells one way tickets, which have fixed prices for the different possible journeys. All
the combinations of one departing and one destination stations are possible.
Build an application which asks the user his name and then asks the journey he wants to undertake.
Then print to the screen the journey and the cost of the ticket (hint: you can invent the price table
for the different tickets, but they should be somehow logical, or current, prices).
3. Restaurant reservation management system. The restaurant has 5 tables and 18 possible seats
(tables of 6, 4, 4, 2, 2). We assume that one table can only be reserved once for one evening and
that the seating cannot be changed.
Make a management system of a restaurant clerk, which stores the availability of tables. The clerk
taking the reservations is the user. In the beginning of the evening, there are no reservations.
Reservations come one at a time. Reservations can be for any number of people, but the seating
cannot be changed.
Reservations can only be accepted if there is room for them and otherwise the clerk should be
notified that there is room.
To minimize the empty tables, system should place the customers to the smallest possible table, if
there is room. For example a reservation of 3 must be placed to the table of 4, if there is still room.
Otherwise, it will need to be placed on the table of 6. If both are full, the reservation cannot be
accepted and the user needs to be notified. Store the reservation information to the system and
print the reservation situation out, if clerk wants to see the reservations, if all the tables are full or if
the clerk wants to stop accepting new reservations.