cplusplus.com cplusplus.com
cplusplus.com   C++ : Forums : General C++ Programming : i need to write this program
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Forums
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programm...
Articles
Lounge
Jobs

-

post  i need to write this program

andel (2)
2. Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. The Invoice class should include four data members – a part number (type string), part description (type string), quantity of items purchased (type int), and the price per item (type float). Your class should have a constructor that initializes the four data members. Provide set and get functions for each member. In addition, provide a member function named getInvoiceAmount that calculates the invoice amount (price * quantity) and return the value in double. If the quantity is not zero, it should be set to 0. if the price per item is not positive, it should be set to zero. Write a test program that demonstrates class Invoice’s capabilities
|
Zaita (1577)
http://www.cplusplus.com/forum/articles/1295/
|

This topic is archived - New replies not allowed.
Home page | Privacy policy
© cplusplus.com, 2000-2009 - All rights reserved - v2.2
Spotted an error? contact us