Description
In this project, you will implement a system, that is based on Linked List, to assign passengers to various busses to help them commute based on their scheduled times.
Each student (i.e., passenger) has the following information: traveler ID (the student ID), travelling date, travelling time, from, and to (destination). Following is an example of the input file called (passengers.txt):
1190001#18042022#14:00#Birzeit#Nablus 1190112#18042022#11:00#Beit Rima#Birzeit 1190554#19042022#13:00#Birzeit#Atara 1190201#20042022#14:00#Birzeit#Ramallah
Another file containing the registered bus lines (busses.txt) contains: a bus number, date, departure time, from, to, price of ticket, and capacity. Example of the input file:
1#18042022#14:30#Birzeit#Ramallah#6#15 2#18042022#11:45# Beit Rima#Birzeit#6#1 13#19042022#14:30# Birzeit#Atara#6#20 53#20042022#14:00#Birzeit#Nablus#6#7
Your application should do the following:
1. Read the drivers file and load it into an array, then read the second file (passengers) which should be added to the busses in a linked list (array of linked lists). Before assigning passengers to busses you should make sure that:
- Each passenger is added to a bus based on the date and departure time. Meaning, each passenger should match the bus based on his/her travelling time and the departure time of the bus
- The length of each linked list should be decided based on the capacity of the available bus
- If a student has no matching travelling date/time, there should be another linked list for those
Your application should be able to show the following information through a proper menu of the application:
- Loadthebusinformationfile
- Loadthepassengerinformationfile
- Assign passengers and print assignment information of all
busses
- Print a specific bus information along with its passengers
information (names and IDs)
- Printunmatchedpassengers
- Addnewpassenger
- Deletepassenger
- Delete bus number
- Exit
Grading policy:
- Yourapplicationshouldhaveallfunctionalitiesworking properly. Twenty marks will be graded for the functionality of the project;
- The following notes will make up the remaining 10 marks of the grade:
a. There has to be adequate documentation and comments in the code (i.e., functions, loops, etc.);
b. Your code should follow the code convention (i.e., spaces, indentations, etc.); and
c. Your application should contain a menu to allow the user to select which option (s) he would like to run.