Problem 3: Bookstore Order System
Create a Java program for a bookstore where the user can order books. The program should allow the user to:
1. Select a book from a list of options:
o Java Programming Book – $15
o Data Structures Book – $20
o Algorithms Book – $25
2. Enter the quantity of the selected book.
3. Confirm the total bill and continue ordering or exit.
The program should:
Use Scanner to receive the user’s choice and quantity.
Implement a switch statement to handle book selection.
Use a loop to allow multiple orders until the user chooses to exit.
Display the total cost for the ordered books after each selection.
Problem 4: Movie Ticket Booking System
Write a Java program for a movie ticket booking system where the user can:
1. Choose a movie from the following list:
o Action Movie – $12
o Comedy Movie – $8
o Drama Movie – $10
2. Enter the number of tickets they want to book.
3. Confirm the total bill and decide whether to continue booking or exit.
The program should:
Use Scanner for input.
Implement a switch statement to choose the movie.
Use a loop to allow multiple bookings until the user decides to exit.
Calculate the total price based on the movie and quantity of tickets.
Ensure that the user does not enter a negative or zero number of tickets.
Allow the user to exit or book more tickets after each transaction.
Problem 2: Fast-Food Ordering System
Create a Java program for a fast-food ordering system where the user can:
1. Order a burger ($5), fries ($3), or a drink ($2).
2. Enter the quantity of the selected item.
3. Confirm the total bill and continue ordering or exit.
Use Scanner to input the user’s choice and quantity.
Implement a switch statement for menu selection.
Use a loop to allow multiple orders until the user chooses to exit.
Problem 3: Bus Ticket Booking System
Develop a program that allows a user to buy bus tickets. The user should be able to:
1. Choose a destination (City A - $10, City B - $15, City C - $20).
2. Enter the number of tickets.
3. Display the total cost.
4. Ask if the user wants to book another ticket or exit.
Use Scanner for input.
Use a switch statement for selecting a destination.
Implement a loop to continue booking until the user decides to stop.
Problem 4: Grocery Store Checkout System
Create a grocery checkout program where the user can:
1. Choose an item (Apple - $2, Banana - $1, Milk - $3).
2. Enter the quantity.
3. View the total bill.
4. Continue shopping or exit.
Use Scanner for input.
Implement a switch statement for item selection.
Use a loop to allow multiple purchases until the user exits.
Problem 5: Student Grading System
Write a program that accepts multiple student grades and categorizes them:
1. Enter a grade (0-100).
2. Use a switch statement to classify grades (90-100: A, 80-89: B, etc.).
3. Repeat for multiple students until the user chooses to exit.
Use Scanner for input.
Implement a switch statement for grade classification.
Use a loop to allow multiple entries.