[ A student who needs help ]

This is a discussion on [ A student who needs help ] within the C Programming forums, part of the General Programming Boards category; we have this requirement in school that we have to create a program that will able to solve the cpu ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    3

    Exclamation [ A student who needs help ]

    we have this requirement in school that we have to create a program that will able to solve the cpu scheduling (first come first serve, 1st job done and we need it to gant chart it). please teach me how to create a simple chart...


    it suppose to be like:


    Process Burst time Arrival time
    A 5 1
    B 6 2
    C 10 3



    and that chart should be like:


    ___________0___5___6_____10_______________________ ______
    A ] //////
    B ] //////
    C ] //////////


    the faded will skip the previous time and should only be in the current time,
    like in C, 6-10...... and i need it in C++
    Please Help Thanks

  2. #2
    Registered User
    Join Date
    Aug 2007
    Posts
    3
    I Repost it sorry

    it suppose to be like:


    Process ____________________Burst time________________ Arrival time
    A _________________________ 5_______________________1
    B _________________________ 6 ______________________ 2
    C _________________________10 _____________________ 3



    and that chart should be like:


    ___________0___5___6_____10_______________________ ______
    A ] ___//////
    B ] _______//////
    C ] ___________ //////////


    the faded will skip the previous time and should only be in the current time,
    like in C, 6-10...... and i need it in C++
    Please Help Thanks



    in the chart _ (underscroll) should be black or empty space

  3. #3
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Well, first of all, if you need this in C++, it should be in the C++ section of the forums, so a moderator will probably move it over.

    But as to your question, draw the chart one line at a time. You have the numbers, so it's easy to tell where to put everything. First line is the nice line consisting of '_' (or ' ') chars and the numbers. Draw that line one char at a time in a loop, and then put the numbers where they need to go.

    As for the processes, it should be pretty easy to draw the necessary '/' chars depending upon the numbers. Again, do them char by char.

    How's that for a start?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Updating in a sequential file?
    By Ronnyv1 in forum C Programming
    Replies: 1
    Last Post: 03-24-2009, 05:41 PM
  2. Database assignment is Killing me!
    By Boltrig in forum C Programming
    Replies: 2
    Last Post: 11-29-2007, 03:56 AM
  3. LinkList Sorting in C
    By simly01 in forum C Programming
    Replies: 3
    Last Post: 11-25-2002, 01:21 PM
  4. Creating a student grade book-how?
    By Hopelessly confused in forum C Programming
    Replies: 5
    Last Post: 10-03-2002, 09:43 PM
  5. A few tips please...
    By gems in forum C++ Programming
    Replies: 4
    Last Post: 04-11-2002, 03:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21