Question: CSC 326 Data Structures-Project 1- Implementation of Queue Based on Linked Nodes A company with fully automated car-washing machinery can wash a car in I

 CSC 326 Data Structures-Project 1- Implementation of Queue Based on Linked
Nodes A company with fully automated car-washing machinery can wash a car
in I to 10 minutes. The company would like to analyze the
efficiency of its equipment: if it uses its fast setting, one car
will be washed for I minutes but the quantity water and soap

CSC 326 Data Structures-Project 1- Implementation of Queue Based on Linked Nodes A company with fully automated car-washing machinery can wash a car in I to 10 minutes. The company would like to analyze the efficiency of its equipment: if it uses its fast setting, one car will be washed for I minutes but the quantity water and soap required at such speed will be high. A slower settings use less soap and water but the washing time per car is higher The company wants to know haw many customers will have to wait in line when the washing equipment is set to one of the slower speeds. Car Wash Simulation-Specification Input. The program has three inputs: a) the total amount of the time needed to wash one car (in seconds); b) the probability that a new customer arrives during any given 3 seconds (we assume that at most one customer arrives in 3 seconds); c) the total length of time to be simulated (in seconds). Output. Our test program should produce at least the following outputs: a) the number of customers serviced in the simulated time; b) the average time that a customer spent in line during the simulation (in seconds). The header file provides the class declarations of the three classes that you need: bool source, averager and washer and is given below. /File washing.h I CLASSES PROVIDED: bool source, averager, washer Il II CONSTRUCTOR for the bool source class: // bool source(double p.. 0.5) // Precondition: 0p l. II Postcondition: The bool source has been initialized so that p is the II approximate probability of returming true in any subsequent activation II of queryO) Il //CONSTANT MEMBER FUNCTION for the boolsource class: Il bool query) const II Postcondition: The return value is either true or false, with the II probability of a true value being approximately p (from the constructor). - Il CONSTRUCTOR for the averager class II averager II Postcondition: The averager has been initialized so that it II is ready to accept a sequence of numbers to average. II MODIFICATION MEMBER FUNCTION for the averager class: II void next number(double value) II Postcondition: The averager has accepted value as the next Il number in the sequence of numbers which it is averaging. II CONSTANT MEMBER FUNCTIONS for the averager class: Il size_t how many_numbers() const l Postcondition: The value returned is a count of how many Il times next_ number has been activated

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!