Question: jua pur ( A Fa Q3: Define a class Point which is a three dimensional point having x, y and z coordinates. 1. Define a
jua pur ( A Fa Q3: Define a class Point which is a three dimensional point having x, y and z coordinates. 1. Define a default constructor which initializes coordinates by 0. 2. Define a constructor to pass the coordinates values. 3. Define a destructor to print "you are out of the point". . . Q4: 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
