Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a program for a Fuel center which have 3 pumps where maximum 6 customers can be hold simultaneously in a queue. Implement the following

 Design a program for a Fuel center which have 3 pumps where maximum 6 customers can be hold simultaneously in a queue. Implement the following functionalities as separate procedures. You can build up your test cases as you develop your program (see testing and Report section below). 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. Operator should be able to perform the following tasks by selecting from a console menu. 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. Display all the menu options to the operator, When the operator types 102 or ACQ, it should do the addmethod. When the operator types 103 or RCQ, it should do the remove method.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Heres a basic Java program design for the Fuel Center import javautilArrayList import javautilScanner import javaioFile import javaioFileWriter import javaioIOException import javautilCollections publ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Management for Public Health and Not for Profit Organizations

Authors: Steven A. Finkler, Thad Calabrese

4th edition

133060411, 132805669, 9780133060416, 978-0132805667

More Books

Students also viewed these Programming questions

Question

How is vacation and sick time accrued?

Answered: 1 week ago

Question

An object hyperlink appears as underlined text. True False

Answered: 1 week ago

Question

What are the various types of short- term debt that are available?

Answered: 1 week ago