Question: need 1&2 For problems #1-5, create a single console application. In it (and outside the curly brackets of class program), create a class MyLab06. All

 need 1&2 For problems #1-5, create a single console application. In need 1&2

For problems #1-5, create a single console application. In it (and outside the curly brackets of "class program"), create a class "MyLab06". All the following functions (Q#1-5) must be defined in this new class with public scope. Also illustrate calling each function from void main in the class "program". Each problem is worth 20pts. 1. Develop a public function that displays a prompt to a user to enter a numeric value, checks that it is a numeric value within a specified range (if not, displays an error message and again displays the prompt), and returns the result (as type double). The prompt to display must be passed as an argument to the function. The range should also be passed as optional min and max arguments (use largest negative and positive double values as defaults). 2. Develop a public function that calculates and returns the average length of a server queue. For an M/M/1 queue (single server, exponential processing and arrival rates), La = o, while for an M/G/1 queue (single 22o +p server, exponential arrival rate and any distribution for processing rate) Lq server (a value > 0 and 0), and os is the standard deviation of the server processing time (value > 0). These values should be passed to the function (a and os should be optional arguments). Use an enumeration to define the queue type. The function should print an error message and then throw an exception if any of the arguments are out of range. molto p is utilization of the

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!