Reference no: EM133214609
Question : (Please do not use 'Array Lists' or any other library method. Use classes and objects with oop concepts.)
The Class version should be able to manage 5(Five) pumps parallelly. Create a class called FuelQueue and another class called passenger. (The menu and its options are mentioned at the bottom.) Each queue can hold up to 6 passengers with the following additional information.
i. First Name.
ii. Second Name.
iii. Vehicle No
iv. No. of liters required.
Note: In class version, add customer to the Fuel queue (102 or ACQ) option must select the queue with the minimum length.
Add an additional option to the menu. '110 or IFQ' that will give the user the option to print the income of each Fuel queue. (You can take price of a fuel liter as 430).
Then add a waiting list to your Fuel Queue class version.
Modify your '102 or ACQ Add customer to a Queue' and '104 or PCQ: Remove a served customer' as follows:
• When you press '102 or ACQ' to add a new customer, the customer should be added to the Waiting List queue if the Fuel queues are full.
• When you press '104 or PCQ' to remove a served customer, the next customer in the Waiting List queue should be automatically placed in the fuel queue. Extra marks will be awarded if you implement the waiting list queue as a circular queue.
These are the menu options;
100 or VFQ: View all Fuel Queues.
101 or VEQ: View all Empty Queues.
102 or ACQ: Add customer to a Queue.
103 or RCQ: Remove a customer from a Queue. (From a specific location)
104 or PCQ: Remove a served customer.
105 or VCS: View Customers Sorted in alphabetical order (Do not use library sort routine)
106 or SPD: Store Program Data into file. 107 or LPD: Load Program Data from file. 108 or STK: View Remaining Fuel Stock.
109 or AFS: Add Fuel Stock.
999 or EXT: Exit the Program.
Fuel Center will have exactly 6600 liters in their stock. For each customer added to the queue, stock should be updated. (Assume each customer is served with 10 liters), and a warning message should be displayed when the stock reaches a value of 500 liters.
Please do not use array lists.
If you can provide comments to understand the code it will be much appreciated.