CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Location
    Pakitan
    Posts
    1

    can any one please help me doing my assignment please please please please

    Write a program that takes care of a printer queue. Your program will simulate and evaluate the printing. The arrival pattern of print jobs will be represented in a file as the arrival times (in printing time intervals (you can think fo these as some number of seconds or a minute)) of each print job and its number of pages. The file will be specified in a command line parameter to your program. Your program will take no input other than the test file name as the command line parameter. You will simply open the file, process the print jobs, print out the results, and exit. You may assume that the arrival times in the file are in order. It takes one time interval to print each page. You should process the jobs in the file and then print out the total number of jobs processed, the total number of pages printed, and the average waiting time per job. Waiting time is the number of intervals from arrival time to beginning of printing. The job at the head of the queue is currently being printed and is not dequeued until printing completion. Use a linked list to implement your queue. There are many List templates available (for example, the Standard Template Library offers a list template). However, for this assignment, when you use a linked list, it will be your own code so that you can practice your programming and learn the concepts thoroughly.

    NOTE - Be aware of the precision of the average waiting time per job. You must print the average waiting time with a precision of 4 significant digits. HINT - use iomanip

    A sample file is shown below (a 0 specifies the end of the processing):

    1 4
    3 3
    8 1
    8 2
    12 10
    19 1
    20 2
    26 5
    26 1
    0

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: can any one please help me doing my assignment please please please please

    See this FAQ.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured