Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Food and Order Data Abstraction Submission: Email your hand.cpp files A) Create a super dass named Order that contains the following data fields (private variables)

image text in transcribed
image text in transcribed
Food and Order Data Abstraction Submission: Email your hand.cpp files A) Create a super dass named Order that contains the following data fields (private variables) Order Number (int) Order Type (String) Include get and set methods for these fields, a default constructor with no parameter and an overloaded constructor that has two parameters, order number and order type. B) Create a subclass of Order Class named food that contains the following data fields (private variables) Food Type (String) Food Name (String) Quantity (int) Price (double) Include get and set methods for these fields, a default constructor with no parameter and an overloaded constructor that has six parameters, order number, order type, food type, food name, quantity and price. Create another method named subtotal that performs multiplication of price and quantity and return the result as double type. C) Create a cpp program (named Billing then create the following objects and display the objects based on the instruction below. Create a Food object named item1 using its default constructor. Use set method to assign the following values, 1, Dine-in, Appetizer, Fried Caramari, 1, and 6.95 to order number, order type, food type, food name, quantity and price respectively Create a Food object named item2 using its overloaded constructor with six parameters. Assign the following values, 1, Dine-in, Entree, Grilled Salmon, 2, and 15.99 to parameters, order number, order type, food type, food name, quantity and price respectively. Display billing summary by using get methods and subtotal method as shown below. Use 10% for tax. to sign le louwing value, Dine-in, Appetizer, Fried Caraman. 1. and 6.95 to order number, order type, food type, food name, quantity and price respectively Create a Food object named item using its overloaded constructor with six parameters. Assign the following values, 1, Dine-in, Entree, Grilled Salmon, 2, and 15.99 to parameters, order number, order type, food type, food name quantity and price respectively. Display billing summary by using set methods and subtotal method as shown below. Use 10% for tax Output From Billing.cpp Billing Summary - Dine-in Order No. 1 Appetizer Fried Caramari 1x6.95 6.95 Entree Grilled Salmon 2x15.99 31.98 Subtotal: 38.93 Tax: 3.89 Total: 42.82

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_2

Step: 3

blur-text-image_3

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

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions