Student Performance Objectives: To review text file I/O To review modular design
ID: 3618157 • Letter: S
Question
Student Performance Objectives:
To review text file I/O
To review modular design
To review partially-filled arrays
To review call by reference
To review transaction processing
To employ an ordered linear search
To use strings
To use a union structure
To implement an array of hierarchical structures
Problem Scenario:
An art gallery, Free 2 Express, Inc., has requested a program to keep track of its paintings, prints, and photographs. It keeps at most 50 artworks in its inventory. The gallery owner has requested a program to help maintain the inventory record for the artworks.
Assignment Requirements:
1. The program must use text file input and file output using ifstream and ofstream. The files must be checked for successful open. If the files do not open, then exit the program. Close all files when appropriate.
INPUT FILE: ASCII text file, Gallery.data
Artwork
Identification Code
Integer max 5 digits
Height
Real max 999.99
Inches
Width
Real Max 999.99
Inches
Room
Placement
Code
Integer
Medium Code
Integer
Price
Real
Max 9999999.99
First Name
20 characters
max
No spaces
Last Name
20 characters
max
No Spaces
INPUT FILE: ASCII test file, Transactions.data,
Data records are in random order with spaces between fields. Each transaction record is in the following format:
Artwork
Identification
Transaction
Artwork
Identification Code
Integer max 5 digits
Height
Real max 999.99
Inches
Width
Real Max 999.99
Inches
Room
Placement
Code
Integer
Medium Code
Integer
Price
Real
Max 9999999.99
First Name
20 characters
max
No spaces
Last Name
20 characters
max
No Spaces