Professional Documents
Culture Documents
COURSEWORK
NAME STUDENT ID
IMPORTANT
The Sunway Diploma Studies requires students to adhere to submission deadlines for any
form of assessment. Penalties are applied in relation to unauthorised late submission of work.
- Coursework submitted after the deadline but within 1 week will be considered as late
submission.
- Work handed in following the extension of 1 week after the original deadline will be
regarded as a non-submission and marked zero.
Academic Honesty Acknowledgement
"We verify that this paper contains entirely my own work. We have not consulted with any
outside person or materials other than what was specified (an interviewee, for example) in the
assignment or the syllabus requirements. Further, we have not copied or inadvertently copied
ideas, sentences, or paragraphs from another student. we realise the penalties (refer to the
student handbook diploma and undergraduate programme) for any kind of copying or
collaboration on any assignment."
2
Group Member Contribution
INSTRUCTION
The contribution must be signed by all members. 3 marks will be deducted from the total
marks awarded if the group fail to comply with this requirement.
3
Marking Scheme
Scale Excellent (5) Good (4) Satisfactory (3) Poor (2) Weak (1) Score
Introduction (3) Background is Background is Background with Background with Background with
included with included with little elaboration. limited very limited or
proper some Objectives are elaboration. without
elaboration. elaboration. stated and Objectives are elaboration.
Objectives are Objectives are slightly stated but Objectives are
clearly stated, clearly stated impractical. unrealistic. not stated.
realistic and and relevant.
achievable.
Class Diagram All necessary Most necessary Some classes Most classes are Very limited
Classes, classes are classes are are named with not described or classes are not
attributes, included and included and descriptive the names are described or the
methods, named with named with names. not descriptive. names are not
relationships descriptive descriptive Some attributes Many attributes descriptive.
and multiplicity names. names. are well are fairly Few or no
(10) Attributes are Most attributes described and described and attributes are
Discussion (5) well described are well include their data include their data included.
and include their described and types for most types for some Few or no
data types for all include their data classes. classes. methods are
classes. types for most Some methods Many methods included.
All methods classes. including including Few or no
including Most methods constructors are constructors are relationship and
constructors are including well described fairly described multiplicity are
well described constructors are and include their and include their included.
and include their well described data types and data types and Unclear or no
data types and and include their returns for most returns for many discussion made
returns for all data types and classes. classes on OO concept
classes. returns for most Some Many used in design
All relationships classes. relationships and relationships and
and multiplicities Most multiplicities are multiplicities are
are well relationships and well described. fairly described.
described. multiplicities are Brief discussion Limited
Comprehensive well described. made on OO discussion made
discussion made Detail discussion concept used in on OO concept
on OO concept made on OO design. used in design
used in design. concept used in
design.
Coding No errors. No errors. No errors. Contains logic Program not
Functionality Supports all Supports most Supports some errors. executable.
(10) necessary necessary necessary Supports limited Unable to
User- features. features. features. necessary support
friendliness (5) User friendly. Quite user Somewhat user features. necessary
Mapping in Fully mapped friendly. friendly. Not user friendly. features.
between with the class Mostly mapped Fairly mapped Difficult mapped Not user friendly.
design and diagram. with the class with the class with the class Not mapped with
implementation diagram. diagram. diagram. the class
(5) diagram.
Conclusion (2) Conclusion sum Conclusion sum Conclusion not Conclusion sum No conclusion
up what has up what has fully sum up up minor part of presented.
been done with been done. what has been what has been
justification. done. done.
Comments: Total (40 marks)
4
Introduction
During the COVID-19 pandemic, many businesses have changed their strategies. Selling
online has become a priority to many business owners as it is safe, convenient and does not
require face to face contact between seller and buyer. One of the examples is Secret Garden, a
bakery shop that offers a wide range of cakes and bread at a very affordable price. Secret
Garden has decided to take pre-orders via WhatsApp and WeChat and included add-on
options, including several options such as add-on services that include customisation of
design, custom made candles, and so on. The shop eventually has come to the point where
pre-orders have massively increased over time due to increased demand. Secret Garden
started to face difficulties managing orders. It is crystal clear that the company needs a
computerised system to make the pre-order process faster and more efficient. The owner of
"Secret Garden", Ms Ayumi Lucas, requested our company to design and develop a pre-order
system for the company. Based on requirements given by Ms Ayumi Lucas, our team will
build and create a fully computerised system for pre-orders for "Secret Garden".
Class Diagram
A class diagram is a type of static structure diagram that describes the structure of a system
by demonstrating the system's classes, attributes, methods, and the relationship among
objects.
For Secret Garden's programme, the class diagram consists of various classes that assist in
performing its tasks. The following capture displays the overall class diagram for Secret
Garden's bakery shop system:
5
6
As it can be seen above, the following classes Bread and Cake, represent the products of
Secret Garden. The class Cake has two subclasses which are Candle and Design. These are
additional items that can be purchased if the customer orders a cake. Additionally, the
subclass Design has a subclass called 'WrittingMsg'. This is an extra design that displays a
message such as "Happy Birthday!", "Happy Graduation!" and "Happy Anniversary". The
class Member represents the discount entitled to the members of Secret Garden.
/**
*
* @author user
*/
public class Bread {
String type;
double weight;
int quantity;
static double price;
7
public void setType(String type) {
this.type = type;
}
8
public static void print(){
System.out.println("Your Total for bread is: RM"+price);
}
}
/**
*
* @author user
*/
public class Cake {
String flavour;
double weight;
String shape;
int quantity;
static double price;
public Cake(String flavour, double weight, String shape, int quantity, double price) {
this.flavour = flavour;
this.weight = weight;
this.shape = shape;
this.quantity = quantity;
this.price = price;
}
9
public void setFlavour(String flavour) {
this.flavour = flavour;
}
10
return price;
}
/**
*
* @author user
*/
public class Candle {
String color;
String design;
int quantity;
11
public String getColor() {
return color;
}
/**
12
*
* @author user
*/
public class Checkout {
}
/**
*
* @author user
*/
public class Design {
String pattern;
String color;
13
public String getColor() {
return color;
}
package oomassignment;
/**
*
* @author user
*/
public class Member {
14
}
}
package oomassignment;
import java.util.*;
/**
*
* @author user
*/
public class OOMAssignment extends Checkout{
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int checkout1 ;
15
System.out.println(" # # #");
System.out.println("#### ##### ");
do{
System.out.println("What would you like to do?");
System.out.println("-----------------------");
System.out.println("|1-Order Bread |\n-----------------------\n"
+ "|2-Order Cake |\n-----------------------\n"
+ "|3-Renew Membership |\n-----------------------\n"
+ "|4-Display All Product|");
System.out.println("-----------------------");
switch(item1){
case 1:{
16
case 1:{
Bread product = new Bread("Rye Bread",300,1,2.50);
System.out.println("You ordered "+product.type+"\nWeight:
"+product.weight+"\nQuantity: "+product.quantity);
break;
}
case 2:{
Bread product = new Bread("Sour Dough",300,1,3.00);
System.out.println("You ordered "+product.type+"\nWeight:
"+product.weight+"\nQuantity: "+product.quantity);
break;
}
case 3:{
Bread product = new Bread("White Bread",300,1,1.70);
System.out.println("You ordered "+product.type+"\nWeight:
"+product.weight+"\nQuantity: "+product.quantity);
break;
}
case 4:{
Bread product = new Bread("Whole Wheat Bread",300,1,2.70);
System.out.println("You ordered "+product.type+"\nWeight:
"+product.weight+"\nQuantity: "+product.quantity);
break;
}
case 5:{
Bread product = new Bread("Butter Bread",300,1,3.50);
System.out.println("You ordered "+product.type+"\nWeight:
"+product.weight+"\nQuantity: "+product.quantity);
break;
}
default:{
System.out.println("Error");
17
return;
}
break;
}
case 2:{
System.out.println("Please choose your favourite cake:\n------------------------\n"
+ "|1-Chocolate Cake:RM54 |\n------------------------\n"
+ "|2-Strawberry Cake:RM45|\n------------------------\n"
+ "|3-Cheese Cake:RM60 |\n------------------------\n"
+ "|4-Red Velvet Cake:RM65|\n------------------------\n");
Scanner cake = new Scanner(System.in);
int cake1 = cake.nextInt();
switch(cake1){
case 1:{
Cake product = new Cake("Chocolate",500,"Square",1,54);
System.out.println("You ordered "+product.flavour+"\nWeight:
"+product.weight+"\nQuantity: "+product.quantity+"\nShape: "+product.shape);
break;
}
case 2:{
Cake product = new Cake("Strawberry",500,"Round",1,45);
System.out.println("You ordered "+product.flavour+"\nWeight:
"+product.weight+"\nQuantity: "+product.quantity+"\nShape: "+product.shape);
break;
18
}
case 3:{
Cake product = new Cake("Cheese",500,"Rectangle",1,60);
System.out.println("You ordered "+product.flavour+"\nWeight:
"+product.weight+"\nQuantity: "+product.quantity+"\nShape: "+product.shape);
break;
}
case 4:{
Cake product = new Cake("Red Velvet",500,"Trangle",1,65);
System.out.println("You ordered "+product.flavour+"\nWeight:
"+product.weight+"\nQuantity: "+product.quantity+"\nShape: "+product.shape);
break;
}
default:{
System.out.println("Error");
return;
}
}
System.out.println("Please choose your design: \n----------------\n"
+ "|1-Flower |\n----------------\n"
+ "|2-Braid |\n----------------\n"
+ "|3-Comtemporary|\n----------------\n");
Scanner design = new Scanner(System.in);
int design1 = design.nextInt();
switch(design1){
case 1:{
Design onCake = new Design("Flower","Red");
break;
}
case 2:{
19
Design onCake = new Design("Braid","Green");
break;
}
case 3:{
Design onCake = new Design("Contemporary","Blue");
break;
}
default:{
System.out.println("Error");
return;
}
}
System.out.println("Please choose your candle design: \n------------\n"
+ "|1-Standard|\n------------\n"
+ "|2-Numbers |\n------------\n"
+ "|3-Shapes |\n------------\n");
Scanner Candle = new Scanner(System.in);
int candle1 = Candle.nextInt();
switch(candle1){
case 1:{
Candle onCakeCandle = new Candle("Red","Standard",10);
break;
}
case 2:{
Candle onCakeCandle = new Candle("Blue","Numbers",10);
break;
}
case 3:{
Candle onCakeCandle = new Candle("Green","Shapes",10);
break;
20
}
default:{
System.out.println("Error");
return;
}
}
System.out.println("Please choose your messages: \n-----------------------\n"
+ "|1-Happy BirthDay!! |\n-----------------------\n"
+ "|2-Happy Anniversary!!|\n-----------------------\n"
+ "|3-Happy Graduation!! |\n-----------------------\n");
Scanner WrittingMsg = new Scanner(System.in);
int msg1 = WrittingMsg.nextInt();
switch(msg1){
case 1:{
WrittingMsg onCakeMsg = new WrittingMsg("Happy BirthDay!!","Red");
break;
}
case 2:{
WrittingMsg onCakeMsg = new WrittingMsg("Happy Anniversary!!","Red");
break;
}
case 3:{
WrittingMsg onCakeMsg = new WrittingMsg("Happy Graduation!!","Red");
break;
}
default:{
System.out.println("Error");
return;
}
}
21
break;
}
case 3:{
System.out.println("Would you like to renew your membership?\n1-Yes\n2-No");
Scanner mem = new Scanner(System.in);
String mem1 =mem.next();
switch(mem1){
case "Yes":{
System.out.println("Please input your member ID: ");
Scanner ID = new Scanner(System.in);
int ID1 = ID.nextInt();
if(ID1>0){
System.out.println("Your ID is: "+ID1);
System.out.println("Your renewal cost would be RM10");
Scanner pay = new Scanner(System.in);
String pay1 = pay.next();
switch(pay1){
case "pay":{
System.out.println("Thank you very much for renewing your
membership");
return;
}
default:{
System.out.println("Error");
return;
}
}
22
}
else{
System.out.println("Error");
return;
}
}
case 4:{
System.out.println("Cakes:\n1-Chocolate Cake:RM54\n2-Strawberry
Cake:RM45\n3-Cheese Cake:RM60\n4-Red Velvet Cake:RM65");
System.out.println("Breads:\n1-Rye Bread:RM2.50\n2-Sour Dough:RM3\n3-White
Bread:RM1.70\n4-Whole Wheat Bread:RM2.70\n5-Butter Bread:RM3.50");
return;
}
default:{
System.out.println("Error");
return;
}
23
System.out.println("Would you like to check out?(1-Yes/2-No)");
Scanner input = new Scanner(System.in);
checkout1 = input.nextInt();
}while(checkout1 != 1);
if(checkout1 == 1){
24
break;
}
case "2":{
Bread.print();
Cake.print();
break;
}
default:{
System.out.println("Error");
break;
}
}
}
else{
return;
}
}
}
/**
*
* @author user
*/
public class WrittingMsg {
25
String Message;
String color;
26
27
28
Conclusion
COVID-19 pandemic has affected many businesses, and business owners have had to change their
strategies to survive difficult times. Many business owners have decided to bring their business into
the online selling field. Due to lack of experience, many companies have suffered because some
applications could not handle many orders, add-on options, etc. As requested by Ms Ayumi Lucas,
our team has been assigned to create and build a computerised pre-order system for Secret Garden
bakery shop as it was clear that unprepared and irrelevant applications cannot fulfil the requirements
of business owners when selling their products. Our team has decided to build a system with all the
needed functions to make the pre-orders process more organised and faster. As a result, we have
created a system with pre-order functions and add-on options, and last but not least, customers can
now customise the design and choose custom-made products such as candles, cakes, etc.
29