Dvd

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bheki
    New Member
    • Sep 2007
    • 2

    #1

    Dvd

    Greetings

    I have a c++ problem that i have to solve in one week,
    Can anyone of you guys help?




    The program should be-menu-driven with the following options:

    1. Purchase a DVD

    2. Search for a DVD

    3. Remove a DVD from Stock

    4. Exit

    Include a member function called display that will display the details in the
    following format:

    DVD Number : 1234
    Title : Father of the bride 2
    Category : Comedy
    Price : R 79.00
    Number of copies : 10



    1.PURCHASE A DVD

    This program should prompt the user to enter the DVD Number of the DVD that the user
    wishes to purchase and the number of copies they wish to buy. Program must search
    the text file for that DVD and update the text file, depending on how many DVDs are
    purchased. If the DVD does not exist, a message must be displayed and the user must
    be allowed to make another purchase.


    2. SEARCH FOR A DVD
    When this option is selected, the user is allowed to search for a DVD. the user must
    select whether they wish to search for a DVD by number or title. if the DVD is found
    in the textile, display the details of the DVD using the display method.


    3. REMOVE DVD FROM STOCK
    The user must provide the either the DVD number or title. The DVD must be removed
    from dvds.txt textile and written to a new file called deleteddvds.txt . The new
    textile must store the DVD number, title, category, price and no. of copies.




    A DVD object is not allowed to have less than 2 copies of a DVD stored in the object.
    If they are then the number of copies must be reset to 10. The user must be allowed
    to purchase as many DVDs as the could.
  • Meetee
    Recognized Expert Contributor
    • Dec 2006
    • 928

    #2
    So what is your problem?

    Comment

    • bheki
      New Member
      • Sep 2007
      • 2

      #3
      My problem is how do I write such a program?

      Comment

      • Nepomuk
        Recognized Expert Specialist
        • Aug 2007
        • 3111

        #4
        Originally posted by bheki
        My problem is how do I write such a program?
        First of all, you need to know some C++. If you don't, buy yourself a book about it or at least go through some tutorials.

        Then you do as much as you can and ask here if you get stuck.

        Greetings,
        Nepomuk

        Comment

        • sicarie
          Recognized Expert Specialist
          • Nov 2006
          • 4677

          #5
          Originally posted by bheki
          My problem is how do I write such a program?
          Identify your problem
          Break your problem down into an algorithm
          Create pseudocode from algorithm
          Code pseudocode

          Comment

          Working...