jgs CSE 205 Object-Oriented Programming and Data Structures Lecture 19: Stack and Queue Dr. Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
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
Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 11 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
jgs CSE 205 Object-Oriented Programming and Data Structures Javier Gonzalez-Sanchez, Ph.D. [email protected] Fall 2021 Copyright. These slides can only be used as study material for the class CSE205 at Arizona State University. They cannot be distributed or used for another purpose.