Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class called Order. Order class has following attributes: - Order_no (integer) - QuotedPrice (double) Methods: - Order number assigned by the computer automatically,

image text in transcribed

Create a class called Order. Order class has following attributes: - Order_no (integer) - QuotedPrice (double) Methods: - Order number assigned by the computer automatically, starts from 100 and increments by 1. Quoted price accepts data from main( ) as parameter when object is created. (Constructor) - Show_Order( ) function displays order number and quoted price to the screen. Create a class called Invoice. Invoice class has following attributes: - Invoice_no (integer) - Quantity (integer) - UnitPrice(double) Methods: - All Invoice data members accept data from main( ) as parameters when object is created. (Constructor) - Write Calculate_Total( ) function that calculates and returns total price of invoice according to the formula: - Total_Price=Quantity*UnitPrice - Show_Invoice( ) function displays invoice number, quantity, unit_price and total price to the screen. Create a class called Customer. Customer class has the following attributes. - Customer_id - Customer_name - Phone_no - GivenOrder (Order) - ReceivedInvoice(Invoice) Methods: - All Customer data members accept data from main( ) as parameters when object is created. (Constructor) - Show_Customer( ) function displays customer id, customer name, phone number, given order information and received invoice information to the screen. MAIN( ) Write a program that calculates and prints all information of a Customer to the screen with the following format: CUSTOMER ORDER: Id:1 Name: Jane Doe Phone: 05228885555 Order No: 101 Quoted Price:1500 YTL CUSTOMER INVOICE Invoice No: 1003 Quantity: 2 Unit Price: 1500 YTL Total Price: 3000 YTL

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions