

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
Material Type: Assignment; Class: Algorithms and Data Structures; Subject: Computer Science; University: University of Alabama - Birmingham; Term: Unknown 1989;
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Create a class named Rectangle with properties: length, breadth and functions: GetHeight(), GetLength, SetHeight(value), SetLength(value), GetArea(), GetPerimeter(). Create another class where an object of type Rectangle is instantiated. Set height and length and print the values: height, length, area and perimeter calling appropriate functions.
that you developed in your last assignment. Stack has two functions: Push(value) which puts a value to the top of stack , Pop() removes and returns the value in the top of stack. Queue has two functions: EnQueue(value) which puts a value to the end of queue , Pop() removes and returns the value from the beginning of the queue. a) Create a class MyStack with respective functions from above and required properties for Stack(you will need a linked list to store data). Create another class that creates object of MyStack. Use provided class for reading numbers from a file and store the values read into stack. Display the returned values as you pop out all the elements from the stack in a loop. b) Repeat above for Queue.