Assignment Stacks Queues 2021
Assignment Stacks Queues 2021
Name:
Group :
You are required to write a complete menu-driven console program in Java, by yourself, up to
programming standards (well formatted and documented) including a main() function to
implement an ADT class for a GENERIC Stack or Queue (or variant) based on Java Standard
Library Class (ArrayList or LinkedList) and demonstrate the following:
Submission:
The program must be submitted as a printout of the program source code appropriately
documented with comments on Moodle. Late submission will be penalized. Plagiarism
shall be severely dealt with.
Date of submission: Sunday 16 January 2022 on Moodle by 23:59 for all students.
Assessment:
You must perform a formal demonstration of your program to your tutor in the
computer laboratory. Use a simple menu to demonstrate the execution of the program.
You may wish to add any additional methods (e.g. constructors, destructors, aggregation,
association, inheritance etc) that you feel necessary for the proper working of the
program. Remember to keep the program as simple, but complete, as possible.
Presentation: To be announced.
Resources:
You can use any resources you want – books, lecture notes, internet – provided you are
able to explain what your program does. You must mention any resources in references
if you use them. Do NOT use any other classes in the package java.util apart from
ArrayList or LinkedList. You must contact your lecturer in case of any
doubt/queries/problems. Start today!! And finish promptly…
Date: 16/12/2021
STACK OF BOOKS
MENU
1. Display
2. Peek
3. Pop
4. Push
5. Reset
6. Search
7. Quit
Your Choice:
Your program must consist of the following classes for a stack of books:
1. Stack
2. Book
3. StackMain
Note:
For the concrete objects to be manipulated in the ADT, e.g. Book, you have to add the
following additional methods: clone(), equals(), compareTo(), toString()