Data Structures and Algorithms Assignment: Food Ordering System, Exercises of Computer Science

Computer Science - Exercise & Assignment

Typology: Exercises

2018/2019

Uploaded on 02/17/2022

xiao-tong-wong
xiao-tong-wong 🇲🇾

3 documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
BACS2063 Data Structures and Algorithms
ASSIGNMENT 202021
Student Name : Chiu Jen Nam
Student ID : 20WMR08905
Programme : REI2
Tutorial Group : G3
Application Name : Food Ordering system
Declaration
I confirm that I have read and complied with all the terms and conditions of
Tunku Abdul Rahman University College’s plagiarism policy.
I declare that this assignment is free from all forms of plagiarism and for all
intents and purposes is my own properly derived work.
________nam________
Student’s signature
______18/3/2021_____
Date
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Data Structures and Algorithms Assignment: Food Ordering System and more Exercises Computer Science in PDF only on Docsity!

BACS2063 Data Structures and Algorithms

ASSIGNMENT 202021

Student Name : Chiu Jen Nam

Student ID : 20WMR

Programme : REI

Tutorial Group : G

Application Name : Food Ordering system

Declaration

● I confirm that I have read and complied with all the terms and conditions of

Tunku Abdul Rahman University College’s plagiarism policy.

● I declare that this assignment is free from all forms of plagiarism and for all

intents and purposes is my own properly derived work.

________nam________

Student’s signature

______18/3/2021_____

Date

Table of Contents

    1. Introduction to the Business Unit
    1. Entity Class Diagram
    1. Implementation of Entity Class(es) 5-
    1. ADT Specification
    1. ADT Implementation 9-
    1. Implementation of Client Program 16-
  • 7.Output 18-

2. Entity Class Diagram

3. Implementation of Entity Class(es) Order.java

4. ADT Specification

Hash Set

void put(K newKey,V data) Precondition : hash key must be not null; Description : Add new elements into the hash table. Precondition : newKey must be not null and object cannot be the same; Postcondition : New Data has been inserted to the hash table. V get(K key) Description : get element by the key given. Postcondition : element successfully extract. Returns : return element when key found otherwise return null. boolean remove(K deleteKey) Description : Remove an element based on the given key in the table. Precondition :the delete key must not null after hashing. Postcondition : The object have been removed. Returns : return true if successfully removed otherwise return null. K contain(K key) Description : Check whether have this key inserted to the table.. Precondition : key must be not null after hashing. Returns : return key if the key founded otherwise return null. int getLength() Description : Get the size of the table. Returns : return the size of the table.

6. Implementation of Client Program Hashset By declaration of HashSetInterface<Interger,Order> orderList.This is use to insert the object to store a set of object list. This above code in the next button function in the main.java is corporation with the custList.When user press next it will find the id of the customer and set the order status like preparing or complete to have a clear that what order is already complete.

The above code in paymentDialog.java is use to when the user has been press the pay button and it is successfully. It will store the order to the hash set.