Question
Ethans Car Wash Project 6 140 points Due Tuesday November 21 (Changes are highlighted in yellow) ********************************** This project may be done in pairs, but
Ethans Car Wash Project 6 140 points Due Tuesday November 21 (Changes are highlighted in yellow) ********************************** This project may be done in pairs, but the pairs cannot be the same as on the final project. If the same pair does the final project together, there will be an automatic 50 point deduction on the final project. Individual submissions that are very similar to another individual submission will be given an automatic 50 point deduction. In particular, if more than 10 lines of code are identical or very similar to the code of another student who is not ones partner, 50 points will be automatically deducted from both students. Grading for this project only: Fully working program 80 points Good but limited use of comments 10 points Good Spacing within a line 10 points Use of vertical alignment 20 points Good variable names 10 points Good method names 10 points ********************************** Ethans Car Wash has decided to do a study of their business, which they believe has not been as good as they would have liked. Based on some data they have obtained, they assume the following: Customers arrive at the car wash in random integer intervals of 1 to 5 minutes. That is, when a customer arrives, the next customer will arrive in the next 1 to 5 minutes. Customers are served in random integer intervals of 2 to 5 minutes. That is, when a car is actually washed, it will take anywhere from 2 to 5 minutes to finish depending on the level of wash that was selected. The car wash can only hold up to 8 cars waiting to be serviced. If a customer arrives and there are 8 cars waiting, the customer will have to bypass the car wash. Ethan wants a program to implement a car wash simulation as follows: 1. Initialization: a. Read in the number of hours and number of minutes for the car wash shift. b. Read in the number of customers waiting in line when the car wash opens. 2. For each minute of the shift: a. If the time matches the next customers arrival time Record the fact that a customer has arrived if there are less than 8 cars waiting, enqueue the customer and record the arrival time. Schedule the arrival time for the next customer (in the next 1 to 6 minutes) b. If the time is the next customers finish time (i.e. the car wash becomes free) Record the fact that a customer has completed service Dequeue the next waiting customer Calculate this customers wait time Determine this customers service time (2 to 5 minutes) and Calculate this customers completion time (thus when a new customer can begin service). 3. At the completion of the shift, report the following information: a. Total number of customers served b. Number of minutes the car wash was idle c. Average wait time d. Longest wait time e. The number of customers that bypassed the car wash Ethan wants the program to simulate service for a shift of 8 hours (480 minutes), and of course, see the output. The service line must be implemented as a queue that will contain the customers arrival time (in minutes from the start of the 8 hour period). You must define your own class to implement a queue. // This IS required. Ethan requires that the program be implemented with a GUI. A very simple GUI will suffice. A GUI is NOT required. The GUI is for the Honors project. For the input, use three field's, one for input of the hours, one for input of the minutes, and one for the input of the number of cars waiting when the car wash opened. For the output, you may append all output to a simple window. For testing the program, use a much smaller time period (say 20 minutes), and consider printing a message when a customer arrives, step 2a, and when a customers car has started being serviced, step 2b.
If this could be done in Java please with No GUI that would be a great help
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started