Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Write a program that simulates a checkout line at a supermarket. The line is a queue object. Customers( i.e customer objects) arrive in random integer intervals of 1-4 minutes. Also each customer is served in random integer intervals of 1-4 minutes. Obviously, the rates need to be balanced. If the average arrival rate is larger than the average service rate, the queue will grow infinitely. Even with " Balanced" rates, randomness can still cause long lines. Run the supermarket simulation for a 12 hour day(720 minutes) using the following algorithm:
1) choose a random integer between 1 and 4 to determine the minute at which the first customer arrives.
2) At the first customer's arrival time:Determine customer's service time (random integer from 1 to 4);Begin servicing the customer;Schedule arrival time of next customer (random integer 1 to 4 added to the current time).
3) For each minute of the day;If the next customer arrives,Say so,Enqueue the customer;Schedule the arrival time of the next customer;If service was completed for the last customer;Say soDequeue next customer to be servicedDetermine customer's service completion time( random integer from 1 to 4 added to the current time).Now run your simulation for 720 minutes and answer each of the following:
a) What's the maximum number of customers in the queue at any time?b) What's the longest wait any one customer experiences?c) What happens if the arrival interval is changed from 1-4 minutes to 1-3 minutes?
Write an HTML form that prompts the user to enter a value. In PHP, write a script to determine whether the value contains an integer , a decimal-place number.
Design the logic for an application for a company that wants a report containing a breakdown of payroll by department.
Write and implement the generic Set class with attributes you find essential and with the following methods. Set class has nonduplicate elements.
Use a one-dimensional array to solve the folloing problem: Write a script (using an array of counters) that obtains the gross sales for each employee through an XHTML form and determines how many of the salespeople earned salaries
Design function named max that accepts two integer values as arguments and returns the value that is the greater of the two. for example if 7 and 12 are passed as arguments to the function the function should return 12.
Write a program which prompts the user to enter three sides of a triangle and your program will display the three sides and its category of either equilateral, isosceles or all unequal.
Write a program that uses the curve class hierarchy. The program should define several different objects, output their area, circumference, etc. It should also use the printcurve function.
Create class Rectangle. The class has attributes length and width, each of which defaults to 1. It has read-only properties that calculate the Perimeter and the Area of the rectangle.
Design a psuedocode program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day.
How would you write a program using the getline command, prompting the user to enter their first and then their last name. Also, using a float variable to enter their weight in lbs and height in inches.
A program which accepts the candy name (for example, "chocolate-covered cherries"), price per pound, and number of pounds sol in average month, and displays item's data only if it is best-selling item.
Hubspot: Inbound Marketing and Web 2.0
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd