Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 4 50 points (Note: This is considered a challenging lab) Purpose: To practice using character and structures and binary files For this lab, please

image text in transcribed
image text in transcribed
image text in transcribed
Lab 4 50 points (Note: This is considered a challenging lab) Purpose: To practice using character and structures and binary files For this lab, please write a program that uses a structure to store the following inventory data in a file: (2 points for each item 2 x 4-6 total points) 1. Item Description 2. Quantity on Hand 3. Wholesale Cost You must use the driver program below and you should not add anything to main. Just write the code for: 1. addRecord 2. viewRecord 3. changeRecord (10 points) (8 points) (10 points) Input validation for Item Quantity and Cost (4 X 3 = 12 points) Must be numeric 1. 2. Must not be negative Must be greater than zero (4 points each) (4 points each) (4 points each) 3. There is no validation for Item Description. File specifications: (2 points) You should provide a test file (with reasonable inventory names) that you have used to test your program The test file should have at least 5 entries and have an extension of ".dat The file should be located in "C:temp" The file format MUST be binary On Exit: (2 Points. NOTE: this requirement is not represented on the sample output below) Print to the screen: "Thank you for visiting is your FIRST name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions