QUESTION 2 (15 MARKS) FunFood is an online food and grocery delivery platform operated in Malaysia. The platform allow t

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

QUESTION 2 (15 MARKS) FunFood is an online food and grocery delivery platform operated in Malaysia. The platform allow t

Post by answerhappygod »

Question 2 15 Marks Funfood Is An Online Food And Grocery Delivery Platform Operated In Malaysia The Platform Allow T 1
Question 2 15 Marks Funfood Is An Online Food And Grocery Delivery Platform Operated In Malaysia The Platform Allow T 1 (52.45 KiB) Viewed 26 times
QUESTION 2 (15 MARKS) FunFood is an online food and grocery delivery platform operated in Malaysia. The platform allow their customers to order food and drinks as well as groceries right from the comfort of their home. Given the following superclass named Delivery and subclasses named FoodDelivery and GroceryDelivery:
a) Write the definition of method calcCost() for both subclasses that calculate and return the delivery cost using the following information: For FoodDelivery, the delivery cost is the price of the food plus the additional cost as shown in Table 1. For GroceryDelivery, the delivery cost is the price of the item plus additional cost as shown in Table 2 .
b) Declare an array of type Delivery named deliveries with size 250. (1 mark) c) Assume 250 objects of FoodDelivery and GroceryDelivery are stored inside the array in b). Using the array, write program fragments for the following questions. I. Calculate total cost of all deliveries made by FunPro members. (3 marks) II. Print the restaurant name of all food deliveries. (3 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply