Question: 2) (C prgram NOT C++) Write and test the code for one of the following. Make sure you include an appropriate call to the new

2) (C prgram NOT C++) Write and test the code for one of the following. Make sure you include an appropriate call to the new function in main. For full credit you must write a function that is separate from main. a. Write a function called UpdateStock that finds all the items that are out of stock and allows the user to enter a new cost and part number for those items that are out of stock. The InStock field should also be updated to show that the new part is in stock. Print the BOM after the update.

b. Write a function called OrderParts that lists the part numbers of the out of stock parts and displays the total cost of the out of stock parts (total cost is the sum of quantity x cost for each part.) Finally it should print the total cost to order the parts including 6% for shipping and handling.

c. Write a function named UpdateParts that finds all items in the BOM with a part number that starts with INT and changes the part number so it starts with AMD instead. Print the BOM after the items have been updated.

d. Write a function called DeleteItem that asks the user for a part number and then deletes that item from the list.

e. Write a function named createPO that creates a file formatted as a purchase order. The file should be human readable and include a header and a row for each item in the BOM. Print out the file to show your output. An example is shown below. Part # Quantity Cost In Stock ============================================ INT-12345 10 $3.23 X Nd-84734 2 $0.12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!