0% found this document useful (0 votes)
32 views

Assignment Stacks Queues 2021

The document provides instructions for an assignment to create a menu-driven program in Java that implements a generic stack or queue data structure using an ArrayList or LinkedList. Students must create classes for the stack/queue, objects being stored (e.g. Book), and a main class. The stack/queue class must include standard functions like isEmpty() as well as additional functions like push() and pop(). The program must be submitted by the due date and students will demonstrate their program to the tutor.

Uploaded by

Yadav Sookur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Assignment Stacks Queues 2021

The document provides instructions for an assignment to create a menu-driven program in Java that implements a generic stack or queue data structure using an ArrayList or LinkedList. Students must create classes for the stack/queue, objects being stored (e.g. Book), and a main class. The stack/queue class must include standard functions like isEmpty() as well as additional functions like push() and pop(). The program must be submitted by the due date and students will demonstrate their program to the tutor.

Uploaded by

Yadav Sookur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ALGORITHMICS ASSIGNMENT 1

STACKS/QUEUES based on Standard Library Class (ArrayList or LinkedList)

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:

ADT Stack or Queue or PriorityQueue


Underlying Data Structure ArrayList or LinkedList
Object involved:
Eg Book (In a Separate class)
Book, Student, Employee, Appointment, Customer
with at least two attributes
and two methods
Standard Functions (Must be present)
1. isEmpty()
2. isFull()
3. display()
4. menu()
Operations involved: 5. search()
6. peek()
7. reset()
Additional Functions (As required by the ADT)
8. push(), insert()
9. pop(), remove()
etc.

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

AMIC UdM 2021


ALGORITHMICS ASSIGNMENT 1
For Example, a stack of books, your menu may look like:

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()

AMIC UdM 2021

You might also like