
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The instructions for part 1 of cmps 1053 program 3, which involves creating an inventory class and demonstrating it through a main program. Students are required to create the class, initialize objects, set member properties, and output the values. Part 2 of the project will involve creating an application that uses the class.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!
CMPS 1053 - Program 3 – Spring 2009 Part 1 – Inventory Class
Due: Friday, February 27
Create a project including your main program (described below), Inventory.h, and Inventory.cpp. They are to be constructed as described in the text and in class.
Part 1 of this project is to develop the class Inventory and simply demonstrate it through a main program that demonstrates all member functions. Part 2 will be an application that will use the class.
An overview of main is shown below. You will add all the additional code, comments, etc. to complete the program. Use the data shown in the code.
int main ( ) { Inventory Item1, Item2(53872, 17, 1.42);
Item1.setItemNumber(23415); Item1.setQuantity (120); Item1.setCost (2.01); Item1.setTotal ( );
// Output is to be with appropriate comments telling what each value represents, // spacing, $, alignment, etc. Output must includes the following for both // Item1 and Item.
Outfile << Item1.getItemNumber( ) << Item1.getQuantity( ) << Item1.getCost << Item1.getTotalCost; }