i need to write this program

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
Topic archived. No new replies allowed.