











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Computer Science - Exercise & Assignment
Typology: Exercises
1 / 19
This page cannot be seen from the preview
Don't miss anything!












2. Entity Class Diagram
3. Implementation of Entity Class(es) Order.java
4. ADT Specification
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.