Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

jua pur ( A Fa Q3: Define a class Point which is a three dimensional point having x, y and z coordinates. 1. Define a

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

12-5 How will MIS help my career?

Answered: 1 week ago