FoodOrder # date: Date # foodOrderID: int |- foodPrice: double # DISCOUNT: double + FoodOrder() + FoodOrder(orderlD: int, foodPrice; |double) + setFoodPrice(foodPrice: double) + getFoodPrice(): double + calculatePayment(): double + toString(): String Delivery Dineln |- address: Address - distance: double - tableNO: int - TAX: double Address |- deliveryFee: double + Dineln() + DineIn(foodOrderID: int, foodPrice: double, tableNO: int) + calculateTax(): double + getDineSubTotal(): double + calculateDineDiscount(): double + calculatePayment(): double + toString(): String + addressLine1: String + addressLine2: String + Delivery() + Delivery(foodOrderID: int, foodPrice: double, address: Address, |distance: double) + getDeliveryFee(): double + getDeliverySubTotal(): double + calculateDeliveryDiscount(): double + Address() + Address(addressLine1: String, addressLine2: String) + calculatePayment(): double + toString(): String

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

How to use java to implement ALL the classes. The formula for calculating total payment for each class is shown
below:

Requirements:
− Delivery and Dine-Incustomer will be given 5% DISCOUNT for Food Price with delivery
fee or tax that is more than RM100

Online Order Customer:
ADDRESS LINE 1: No. 8 Jalan Cempaka
ADDRESS LINE 2: Lorong Bersatu 2
DISTANCE (KM): 6.00
DATE: Mon Sep 06 22:54:34 SGT 2021
FOOD ORDER ID: 1234
FOOD PRICE: RM 49.00
DELIVERY FEE: RM 5.00
SUBTOTAL: RM 54.00
DISCOUNT: RM 0.00
TOTAL: RM 54.00
Transcribed Image Text:Online Order Customer: ADDRESS LINE 1: No. 8 Jalan Cempaka ADDRESS LINE 2: Lorong Bersatu 2 DISTANCE (KM): 6.00 DATE: Mon Sep 06 22:54:34 SGT 2021 FOOD ORDER ID: 1234 FOOD PRICE: RM 49.00 DELIVERY FEE: RM 5.00 SUBTOTAL: RM 54.00 DISCOUNT: RM 0.00 TOTAL: RM 54.00
FoodOrder
# date: Date
# foodOrderID: int
- foodPrice: double
# DISCOUNT: double
+ FoodOrder()
+ FoodOrder(orderlID: int, foodPrice;
double)
+ setFoodPrice(foodPrice: double)
+ getFoodPrice(): double
+ calculatePayment(): double
+ toString(): String
Delivery
Dineln
|- address: Address
|- distance: double
|- deliveryFee: double
|- tableNO: int
- TAX: double
Address
+ Dineln()
+ DineIn(foodOrderID: int,
foodPrice: double, tableNO: int)
+ calculateTax(): double
+ getDineSubTotal(): double
+ calculateDineDiscount(): double
+ calculatePayment(): double
+ toString(): String
+ addressLine1: String
+ addressLine2: String
+ Delivery()
+ Delivery(foodOrderID: int,
foodPrice: double, address: Address,
distance: double)
+ getDeliveryFee(): double
+ getDeliverySubTotal(): double
+ calculateDeliveryDiscount():
double
+ Address()
+ Address(addressLine1: String,
addressLine2: String)
+ calculatePayment(): double
+ toString(): String
Transcribed Image Text:FoodOrder # date: Date # foodOrderID: int - foodPrice: double # DISCOUNT: double + FoodOrder() + FoodOrder(orderlID: int, foodPrice; double) + setFoodPrice(foodPrice: double) + getFoodPrice(): double + calculatePayment(): double + toString(): String Delivery Dineln |- address: Address |- distance: double |- deliveryFee: double |- tableNO: int - TAX: double Address + Dineln() + DineIn(foodOrderID: int, foodPrice: double, tableNO: int) + calculateTax(): double + getDineSubTotal(): double + calculateDineDiscount(): double + calculatePayment(): double + toString(): String + addressLine1: String + addressLine2: String + Delivery() + Delivery(foodOrderID: int, foodPrice: double, address: Address, distance: double) + getDeliveryFee(): double + getDeliverySubTotal(): double + calculateDeliveryDiscount(): double + Address() + Address(addressLine1: String, addressLine2: String) + calculatePayment(): double + toString(): String
Expert Solution
steps

Step by step

Solved in 5 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY