0% found this document useful (0 votes)
11 views2 pages

Ass Skip 232

Uploaded by

azizibergaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Ass Skip 232

Uploaded by

azizibergaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

NasiAyam-Yummy Restaurant specializes in serving a unique homemade chicken rice dish.

With a
growing number of loyal customers, the restaurant manager has decided to expand the business by
offering delivery services to customers in Alor Setar and its surrounding areas within a 20-kilometer
radius. In order to efficiently manage this new service, the manager intends to launch a system for
handling daily food orders for delivery. You have been appointed as the programmer responsible for
designing and developing this system, named "NasiAyam- Yummy Food Ordering System."
For the initial design of the system, three classes need to be created: two user-defined classes and one
client/driver class. The first user-defined class will serve as a template for customer objects, capturing
details such as customer name, address, and phone number. The second user-defined class will act as
a blueprint for FoodOrdering objects, each containing information about a specific food order, including
order ID, quantity, unit price, and any relevant details.
In this initial version of the system, it will be tested to manage three food orders only. The system will
calculate a specific service charge for each delivery order based on the total price of the order is
implemented as follows.

Location Service charge

around Alor Setar (<10km) 10%

Nearest area outside Alor Setar 20%


(between 10 – 20 km)

The first user-defined class MUST contain the following:


a) constructor(s)
b) any relevant setter(s)
c) any relevant getter(s)
d) a toString() method to return details of each customer

The second user-defined class MUST contain the following:


a) constructor(s)
b) any relevant setter(s)
c) any relevant getter(s)
d) a method to calculate the total of service charge for each food ordering
e) a method to calculate the total of price for each food ordering
f) a toString() method to return details of each food’s ordering

The client/driver class (with a main() method) MUST be able to invoke all the related methods in the
second user-defined class and it should be able to manage THREE (3) food orderings for a testing.
Based on the above scenario:
1. Identify the objects involved in this problem.
2. Draw a UML class diagram for all the identified object with their respective data members and
operations as well as their relationship.
3. Write a class declaration and definition representing each of the identified object.
4. Write a client program representing the client/driver class as described above.
*** Note: Copy all the solutions and source code produced and a sample of running input and output
into a Microsoft Word file. Upload this file as for the submission. As usual, plagiarism is a very serious
issue. You MUST avoid the issue. ***

***Do not forget to include your MATRIC NO. and NAME on the first page of the submitted document***

You might also like