1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need Help with C++ priogramming!

Discussion in 'Meet and Greet' started by roman_lara91@hotmail, Mar 26, 2010.

  1. roman_lara91@hotmail

    roman_lara91@hotmail New Member

    Joined:
    Mar 26, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi, I was wondering if anyone could help me get an assignment done for my C++ programming class...I am completely lost & don't know what to do..I am a beginner (I don't undertsand anything at all)..

    The following is the assignment:


    You are the owner of a hardware store and need to keep an inventory that can tell you
    • the different tools that you have,
    • how many of each tool you have on hand,
    • and the cost of each one.
    Write a program that does the following:
    • initializes a random access file called hardware.dat to 100 empty binary ‘records’,
    • lets you input the data concerning each tool,
    • enables you to list all of your tools,
    • lets you delete a record for a tool that you no longer have,
    • and lets you update any information in the file.
    The tool identification number should be the record number.


    Strategy:
    • Create a class that represents a tool record.
    • Create a class that represents a tools database.
    • In main.cpp initialize your database to hold the following:
    • Record #
    • Name
    • Quantity
    • Cost ($)
    • 1
    • Electric Sander
    • 7
    • 57.98
    • 2
    • Hammer
    • 76
    • 11.99
    • 3
    • Jig saw
    • 21
    • 11.00
    • 4
    • Lawnmower
    • 3
    • 79.50
    • 56
    • Power saw
    • 18
    • 99.99
    • 68
    • Screwdriver
    • 106
    • 6.99
    • 77
    • Sledge hammer
    • 11
    • 21.50
    • 83
    • Wrench
    • 34
    • 7.50
    • Use a pointer to an fstream within the tools database to perform your I/O.
    • Create a helper method in tools database that can skip to any record you want by index.
    • You will use the helper method a lot.
    If anyone is willing to help me get it done, I would highly appreciate it...
    Thanks....
     

Share This Page