Yoe are the oaner of a hardaare store and need to kevp an inventory that can tell you whet diflerent tools you he, how Rtany of cach you have on hand and the cust of euch one. W rite a program with me to process Random- Aerv File. The menu las several options First option is to open a random-avess file. The program should prunp the user to enter the nane of the file. If the file does not erist, the program should creute the file with 100 eapty recurks. The second optio is to displery all the valid records in the nendom-ess file. The thind option is to ask aser to enter data for a new remrd. If the remrd already erists in the same record number, the new rerord uvll overarie the old reeord. The fourth eption is to ezit the program The Ranekons-Access Datet File keeps the inventory of a lardavare Skore. The file sturs the pert nunber or recunl number betaeen I m100, the tool nane, the quantity on hand, and the enst of ench Requirements: a) Your prograN mast praduer the prompt and the utpat the se as ge b) Jour pregrann shonld ereate a chass wamend lardareData containing the recond data. Make sure yoa crente get and set functions for ech class member data e Your program hand pp files eeds. seperate Sample Run: Enter 1 for opening data file. Enter 2 for listing all the reordk Fnter 3 for entering new rerords Enter i to erit the program Choice: Enter File name: Ilarlaare.dat File does ot erist. Creating the data file Choice 2 Recond landware daNa ae Quantity Cost Choice: 3 Enter the part nuosber 0.99, -1 to endt input: 5 Enter tool samr: Hammer Enter part number: 0.9, to end:9 Enter tool name: Nails Enter Quantity and Priee: 1000 5.50 Enter part mumber: - Choice: 2 Revard Hardwaredata nae Quntity Price Wrench 7.99 Nails 5.50

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Quick
You are the oaRer of a hardaare store and need to keep an
inventory that ean tell you what different tools yvu have, hev
Rany of each you have on hand and the cost of each one. W rite a
program withi me to process Random- AeY File. The menu las
several options First option is to oppen a random-avers file. The
program shonld prony the ser to enter the name of the file. I
the file does not erist, the program should create the file with 100
Capty recurds. The second optioni is to displery all the valid records
in the rankom-cess file. The third aption is to ask aser to enter
data for a new reord. If the remrd already erists in the same
record numher, the new recond uvilloveravite the old record. The
fiurth eption is o crit the program.
The Ranckon-Aecess Datt File keeps the inventery of a hardaare
Store. The file stares the part nmber or recrd umber between !
to100), the tool name, the quantity on hand, and the cnst of each
Reguirements:
a) Your proygram st preduce the promps and the ostpal the
Se as gieen
b) Tour program should ereate a class named IlardwareData
Containing the record datea. Make sure yoa create get and set
fiunctions for each cdass member data.
c Your program eds seperate h and .epp files.
Sample Ran:
Enter 1 for opening data file.
Enter 2 for listing oll the recordk
Enter 3 for entering ew reords
Enter í to erit the program.
Choice:
Enter File name: /lardavare.dat
File does ot erist, Creating the data file.
Choice: 2
Record
Ilordware data naae
Quantity
Cost
Choice: 3
Enter the part mmber 0-99, -1 to end inpt: 5
Enter tool wame: lammer
Enter part nuber: 0.9, -I to end: 9
Fnter tool name: Nails
Enter Quantity and Price: 1000 5.50
Enter port wumber: -
Choice: 2
Record
Hardwaredata name
Quantity
Price
Il'rench
5
7.99
9
Nails
5.50
Transcribed Image Text:You are the oaRer of a hardaare store and need to keep an inventory that ean tell you what different tools yvu have, hev Rany of each you have on hand and the cost of each one. W rite a program withi me to process Random- AeY File. The menu las several options First option is to oppen a random-avers file. The program shonld prony the ser to enter the name of the file. I the file does not erist, the program should create the file with 100 Capty recurds. The second optioni is to displery all the valid records in the rankom-cess file. The third aption is to ask aser to enter data for a new reord. If the remrd already erists in the same record numher, the new recond uvilloveravite the old record. The fiurth eption is o crit the program. The Ranckon-Aecess Datt File keeps the inventery of a hardaare Store. The file stares the part nmber or recrd umber between ! to100), the tool name, the quantity on hand, and the cnst of each Reguirements: a) Your proygram st preduce the promps and the ostpal the Se as gieen b) Tour program should ereate a class named IlardwareData Containing the record datea. Make sure yoa create get and set fiunctions for each cdass member data. c Your program eds seperate h and .epp files. Sample Ran: Enter 1 for opening data file. Enter 2 for listing oll the recordk Enter 3 for entering ew reords Enter í to erit the program. Choice: Enter File name: /lardavare.dat File does ot erist, Creating the data file. Choice: 2 Record Ilordware data naae Quantity Cost Choice: 3 Enter the part mmber 0-99, -1 to end inpt: 5 Enter tool wame: lammer Enter part nuber: 0.9, -I to end: 9 Fnter tool name: Nails Enter Quantity and Price: 1000 5.50 Enter port wumber: - Choice: 2 Record Hardwaredata name Quantity Price Il'rench 5 7.99 9 Nails 5.50
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY