Assign4S09

Assign4S09 - Assignment #4 Due: Feb. 28, 2009 (By 11:59 pm...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment #4 Due: Feb. 28, 2009 (By 11:59 pm submitted electronically) You are asked to develop a solution and design a C++ program to maintain inventory for a shop. 1) You need to design a class that declares variables to hold the following data fields describing an inventory item: Item number (8 digit number), quantity on hand, unit price, and item name (it may contain several words separated by spaces maximum 25 characters long). Use the following UML to develop the class. Inventory - Prod_Name : string - Prod_Id : long - Quantity : int - Price : float - Cost : float + Inventory() // Set values to 0 + Inventory(string name, long id , float qu, float pr) // Set values to passed values + Set_Name(string n) : void //Set name to n + Set_Id(long id) : void //Set product id to id + Set_Price(float pr) : void //Set product unit price to pr + Set_Quantity(int qu) : void //Set quantity on hand to qu + Get_Name(void) : string // Return name of the product + Get_Id(void) : long // Return the product Id
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/03/2009 for the course CSCI 101L taught by Professor Ghyam during the Spring '07 term at USC.

Ask a homework question - tutors are online