Question: c++ using c++ 1. (Invoice Class) Create a class called Invoice that is used to represent an invoice for an item sold at the store.

c++
using c++
1. (Invoice Class) Create a class called Invoice that is used to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as private data members: A part number (type string), A part description (type string), A quantity of the item being purchased (type int) A price per item (type double). Your class should have a constructor that initializes the four data members. Provide a member function named getInvoiceAmount that calculates the invoice amount (i.e., multiplies the quantity by the price per item), then returns the amount as a double value. If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0. Write a test program that demonstrates class Invoice's capabilities
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
