TMC1433/1434 Data Structure and Algorithms Semester 1

Assignment 1

This is a group assignment with 3-4 students per group and it contributes to 10% of the total grade of this course.

2. Objectives

  • To evaluate student’s skills at writing an object-oriented program using C++ programming language.
  • To develop problem-solving skills in object-oriented development.
  • To work as a team to solve problems.

3. Assignment 1 [10% marks]

3.1. Assignment Introduction

YY Burger is a mini burger store owned by Yuri Yun situated nearby UNIMAS campus. YY Burger is popular for its delicious burgers with reasonable price and most importantly is the excellent customer services provided in this store.

YY Burger only serves four (4) types of burgers, namely the Basic Cheese Burger, Beef Burger, Chicken Burger and Steak Burger. Basically, all burgers contain same main ingredient except the patty. Each type of burger contains five (5) main ingredients; bun a piece of cheese, salads, sauce and patty (either beef or chicken or steak according to burger type). However, YY Burger allows customers to choose their favorite type of bun and sauce for their burgers. YY Burger provides two (2) types of buns and various types of sauces choices for customers (Please refer to menu below). For instance, customer A would like to order a chicken burger on white bread, with tomato sauce and without any salad on it. Customer B prefers a double cheese Steak Burger with BBQ sauce and whole meal bun.

Following is the burger menu with ingredient details sell in YY Burger:

a) Basic Cheese Burger – Bun, Salads, Cheese, Sauce

RM 1.50

b) Chicken Burger – Bun, Salads, Cheese, Sauce, Chicken patty

RM 3.00

c) Beef Burger – Bun, Salads, Cheese, Sauce, Beef patty

RM 3.00

d) Steak Burger – Bun, Salads, Cheese, Sauce, Steak patty with different cooked levels [Rare or Medium or Well Done]


Bun [ Whole Meal or White]

Sauce [None, Tomato or BBQ or Hot Chili]

Cheese [0 -2 pieces] * RM0.70 charge for every additional piece

**No discount for any removal of ingredient

RM 5.00

3.2. Task

Write a program to demonstrate your ability to apply object-oriented principles; encapsulation, inheritance and polymorphism concepts in designing programming solutions for burgers classes sell in YY Burger store. Your program should meet the following requirements:

  1. Program must consist at least 2 levels of class inheritance;
  2. At least one class contain overloading class constructors;
  3. Perform overriding methods;
  4. Each class should has at least a method to set new values and to retrieve the values of the class attributes;
  5. Create an array(s) with maximum size of 10 to store or record the objects you have created from burger classes.
  6. Your program should allow you to create various type of burgers sell in YY

Burger continuously;

  1. The key features that MUST be included in your program are:



Display main menu options

Add function


Ability to add new burger.

Delete function


Ability to delete particular burger from record.

Edit function


Ability to edit burger detail of particular record.


Eg. change bun type or sauce or burger type



Ability to view all the burgers in the record.



Ability to calculate the number of burgers (based on burger types).


Ability to calculate the total amount of price for each type of burgers recorded.

4. Submission

  • All documents must be submitted via the link provided in Morpheus latest by 22 October 2014 at 55pm. Any late submission will get 15 penalty marks per day.
  • Submit your answer in Zip files containing your report (.pdf) and working C++ source codes (.cpp). Use the following naming format for submission:


  • Each group is required to submit only one copy of group assignment.
  • Files submitted with incorrect format will not be entertained.
  • Any plagiarism (similarity between two files that is over 50%) will be graded as a zero for the two files.

5. Marking Scheme

The total marks for this assignment marking scheme is 100 (Will be converted into 10%). The marking scheme for this assignment is as follows:






Working Program (65%)

Your program must be able to execute and satisfy all of the assigned requirements. A working program which satisfies all of the requirements automatically receives 65% of the total assignment mark.

Complete all functions with correct output (Add, Delete, Update and View with Calculation)


Effective use of control structures


Effective use and design of data structures such as arrays


Object-oriented concept

Implement at least 2 levels of inheritance class

Efficiency of OO concept implementation

Use of data type

Overriding & Overloading



Creativity/Reusability E.g. design interface, user friendly, dynamic design, and etc



Programming Style (18%)

Your program should use of appropriate name and comment style. Your code should be formatted in a readable way, with appropriately named variables, and your own helper functions defined whenever appropriate. Appropriate file management and use of header files are recommended. You should provide comments to explain each function defined in the program. You should write comments describing the purpose of that function or class.

i. Comments on each file (Student name and matric number, Assignment number, and Date etc)


ii. Appropriate variables name


iii. Readable code

(Standardization and use of white spaces)


iv. Class descriptions and comments on function


Report (17%)

Your report should include the UML class diagram of your program, the screenshot of your program output and also your C++ coding. You must upload your assignment in Morpheus. Your report should not exceed more than 5 pages (not including cover) and you MUST USE UNIMAS assignment cover.

Format: Times New Roman, font size 12, spacing 1.5, justified.

Submission format:

Zip files containing your report (.pdf) and C++ coding (.cpp). Use the following format for submission:


i. UML Diagram on class design


ii. Screenshot of output short description


iii. Correct submission format


iv. Program limitations