أنا طالبة بدرس تكنولوجيا المعلومات-ملتميديا-سنة اولى وطلبوا مني حل هذا السؤال كمشروع للمادة الرجاء المساعدة في حل هذا السؤال بلغة ++C لكن دون استخدام class وبعض المكتبات ولكم جزيل الشكر

Write a program that represents a Bus Reservation System. The application gives the user multiple
options as listed in the screens at the back of the screen. The features are:
1. Add Bus Information: This allows user to add a bus information before it can be reserved by the
passengers. It includes the bus no., driver’s name, arrival time, departure time and destination
(from and to) of the bus.
2. Reservation: This includes the bus no., seat number and the passenger’s name. The seat
number of the particular bus is reserved under the passenger’s name.
3. Show Reservation Information: You can show all the information of the buses and their seats. It
also shows the no. of empty seats in a bus along with the seat number registered to a particular
passenger.
4. Buses Available: This shows the buses available for reservation, and the information regarding
the bus no.
We have 5 buses only, and each bus can have 20 seats.
Bonus items (Extra Marks):
• If you use arrays to store the items you will get extra marks.
• When selecting an option from the main menu, clear the screen.

======================================
Main Menu
1. Add Bus Information
2. Reservation
3. Show Reservation Information
4. Buses Available
0. Exit Application
Enter Your Choice: 1
======================================
Enter Bus No: 1
Enter Driver’s Name: Ali
Arrival Time: 8:00 AM
Departure: 11:00 AM
From: Hebron
To: Jerusalem
======================================
Main Menu
1. Add Bus Information
2. Reservation
3. Show Reservation Information
4. Buses Available
0. Exit Application
Enter Your Choice: 2
======================================
Bus No: 1
Seat Number: 5
Enter Passenger’s Name: Ahmad
======================================
Main Menu
1. Add Bus Information
2. Reservation
3. Show Reservation Information
4. Buses Available
0. Exit Application
Enter Your Choice: 3
======================================
Enter Bus No: 1
*****************************************************************************
Bus no: 1
Driver: Ali Arrival time: 8:00 AM Departure Time: 11:00 AM
From: Hebron To: Jerusalem
*****************************************************************************
1. Empty 2. Empty 3. Empty 4. Empty
5. Ahmad 6. Empty 7. Empty 8. Empty
9. Empty 10. Empty 11. Empty 12. Empty
13. Empty 14. Empty 15. Empty 16. Empty
17. Empty 18. Empty 19. Empty 20. Empty

There are 19 seats empty in Bus No: 1
The seat no 5 is reserved for Ahmad. ======================================
Main Menu
1. Add Bus Information
2. Reservation
3. Show Reservation Information
4. Buses Available
0. Exit Application
Enter Your Choice: 4
======================================
*****************************************************************************
Bus no: 1
Driver: Ali Arrival time: 8:00 AM Departure Time: 11:00 AM
From: Hebron To: Jerusalem
*****************************************************************************
Bus no:
Driver: Arrival time: Departure Time:
From: To:
*****************************************************************************
Bus no:
Driver: Arrival time: Departure Time:
From: To:
*****************************************************************************
Bus no:
Driver: Arrival time: Departure Time:
From: To:
*****************************************************************************
Bus no:
Driver: Arrival time: Departure Time:
From: To:
======================================
Main Menu
1. Add Bus Information
2. Reservation
3. Show Reservation Information
4. Buses Available
0. Exit Application
Enter Your Choice: 0
=====================================

أضف اجابة

أضف اجابة

‫تصفح