Slide 2
Slide 2 text
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 2
jgs
Homework 04
This assignment is about implementing (from Scratch) the Classes MyNode, MyList, MyStack, and MyQueue.
These classes should be Generic, i.e., use parametrized types. Implement the following methods:
a) For MyList: instertFirst(), insertAt(), insertLast(), removeFirst(), removeAt(), removeLast(), printAll()
b) For MyStack: push(), pop()
c) For MyQueue: enqueue(), dequeue()
Finally, create a Class Main with a method main() in which you
a) create objects MyList, MyStack and MyQueue with data of type String. Insert, remove and print elements
using your methods. Test all of them.
b) reuse a class Student or Triangle or similar from previous assignments and create objects MyList, MyStack
and MyQueue with data of that type. Insert, remove and print elements using your methods. Test all of them.
Total Number of Classes to submit: ~7