Assume that a file named inventory, which contains the inventory of parts for the Legendary Lawn Mower

Question:

Assume that a file named "inventory", which contains the inventory of parts for the Legendary Lawn Mower Company (from Section 10.5), already exists with records of the following form:

part_Number (Integer), part_Name (String), quantity (Integer)

Also assume that the records in this file are ordered by increasing part number. For each part of this problem, write a program that performs the indicated task.

a. Input a part number from the user and delete the corresponding record from the "inventory" file.

b. Input a part number and a quantity from the user and modify the record corresponding to that part number by changing the value of its last field to the quantity input.

c. Input a new part number, part name, and quantity from the user and insert the corresponding record in the proper place in the "inventory" file.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Prelude To Programming

ISBN: 9780133741636

6th Edition

Authors: Stewart Venit, Elizabeth Drake

Question Posted: