Thread: Simulate the process of placing CD in CD container using QUEUE

  1. #1
    Registered User
    Join Date
    Sep 2014
    Posts
    3

    Question Simulate the process of placing CD in CD container using QUEUE

    I'm in need of the C program which will simulate the process of placing and removing CD's in CD container using QUEUE. It will be grateful if someone give me the whole program or atleast the logic.
    Thanks In Advance

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    Need is the wrong word, you want the program. But you wont get it here. Take a look at our forum guidelines and homework policy -- you know, your membership on this forum was contingent on you actually reading those policies, and abiding by them. I'm not sure why you thought asking for a free handout would work or was a good idea.

    We don't give out solutions. We're here to help you learn, which means you do the bulk of the work, and we help you when you run into trouble. And by trouble, I mean difficulty understanding or implementing some aspect of your assignment, not your poor time management skills or laziness. Ask us legitimate questions about things you don't understand on your assignment, and we're happy to help you and give you good, useful information.

    Note, your problem is very under-specified. We have no idea what "placing and removing CD's in CD container" means. What is a CD in this context? What type of container is this?

    Some links to get you started:
    Queue (abstract data type) - Wikipedia, the free encyclopedia
    FIFO - Wikipedia, the free encyclopedia

  3. #3
    Registered User
    Join Date
    Sep 2014
    Posts
    3
    Ya i know , that's why i've mentioned for logic. I'm not getting how to simulate the same in Queue. Well the CD is Compact Disk and its Container is mentioned.

  4. #4
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    Quote Originally Posted by vin32 View Post
    Ya i know , that's why i've mentioned for logic. I'm not getting how to simulate the same in Queue. Well the CD is Compact Disk and its Container is mentioned.
    You also asked for the whole program, implying you're not really that interested in learning the material or doing the work yourself. So I wont even give you logic.

    Now, if you actually made a serious attempt, and showed us your effort, then you might get some serious help.

    Even if we gave you logic or code, anything you get at this point would likely be wrong. There are still a lot of details left out. Is this a FIFO queue? A priority queue? Are you supposed to use an array or dynamic memory? What information do you need about the CDs? Posting your assignment, and telling us specifically what you do and don't understand, and showing us what you have tried would be good.

    One last piece of advice: don't try to just sit down and write an entire program. If you don't understand how to solve the problem, you can't program a computer to do it. Plan the whole thing out with paper and pencil. Then, break down your solution into sub-tasks, and keep breaking down sub-tasks into smaller sub-tasks, until you can't break it down anymore. Work on implementing one of those sub-tasks at a time. Write 5-10 lines of code, compile (at maximum warning level), fix all errors and warnings, then test it and fix any logic bugs. Keep repeating until you have implemented all the sub-tasks, and you should have a working program. One possible start to breaking it down is to separate out the functions of your queue (add, remove, etc) from the CD info (reading list of CDs from user, file, etc, printing out the CD info, etc).

  5. #5
    Registered User
    Join Date
    Sep 2014
    Posts
    3
    Quote Originally Posted by anduril462 View Post
    You also asked for the whole program, implying you're not really that interested in learning the material or doing the work yourself. So I wont even give you logic.

    Now, if you actually made a serious attempt, and showed us your effort, then you might get some serious help.

    Even if we gave you logic or code, anything you get at this point would likely be wrong. There are still a lot of details left out. Is this a FIFO queue? A priority queue? Are you supposed to use an array or dynamic memory? What information do you need about the CDs? Posting your assignment, and telling us specifically what you do and don't understand, and showing us what you have tried would be good.

    One last piece of advice: don't try to just sit down and write an entire program. If you don't understand how to solve the problem, you can't program a computer to do it. Plan the whole thing out with paper and pencil. Then, break down your solution into sub-tasks, and keep breaking down sub-tasks into smaller sub-tasks, until you can't break it down anymore. Work on implementing one of those sub-tasks at a time. Write 5-10 lines of code, compile (at maximum warning level), fix all errors and warnings, then test it and fix any logic bugs. Keep repeating until you have implemented all the sub-tasks, and you should have a working program. One possible start to breaking it down is to separate out the functions of your queue (add, remove, etc) from the CD info (reading list of CDs from user, file, etc, printing out the CD info, etc).
    kk i made the error free program . ty..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. (queue*)this)->queue::qput’ does not have class type
    By brack in forum C++ Programming
    Replies: 13
    Last Post: 11-11-2010, 03:41 PM
  2. Replies: 1
    Last Post: 01-23-2006, 07:12 PM
  3. Simulate Start->Run->OK
    By caduardo21 in forum Windows Programming
    Replies: 2
    Last Post: 01-13-2006, 11:48 PM
  4. Replies: 4
    Last Post: 03-21-2004, 03:34 PM

Tags for this Thread