C++ ؟؟؟ عاااااااااااااااااااجل

تقليص
X
 
  • الوقت
  • عرض
إلغاء تحديد الكل
مشاركات جديدة
  • شمس عمان
    عضو جديد
    • Sep 2005
    • 23

    C++ ؟؟؟ عاااااااااااااااااااجل

    عاااااااااااااااجل .. اليوم اذا ممكن
    A line (queue) of customers at the bank can be simulated
    with an array Qarray that will hold the arrival time of each
    customers in the line (not the size of Qarray).
    Position 0 in the Qarray is the customer currently first
    in line.
    You simulate a customer being served by removing the first
    'arrival time 'from the queue (called a dequeue)
    You simulate the arrival of a new customer by placing
    the customer arrival time in the lineLenght position
    (the next position)in the Qarray and increasing
    lineLenght by 1 (called enqueu)
    You calculte the wait-time for each customer by finding
    the difference between
    customer entry-time and customer exit-time
    to/from the queue.
    On average,customers arrive every 5 minutes in groups
    of size that randomly generated by the function getCustomers()
    that function takes two values of arguments
    mean and standard deviation and will return the number
    of customers arriving.
    The mean and standard deviation are supplied (input)by user.
    we suggest that you pass 4 for the mean and 1 for the standard deviation.
    write a c++ program to simulate the above situation
    your program will :
    1-Make use of the supplied randome function to generate
    a group of customers every 5 minutes
    2-calculate the average wait time for each hour (60min)
    for a total time of 8 hours
    3- find the hour with the highest average wait time .
يعمل...