Question: Need help with #1 Implement the classes in the following UML: elist: double elength : int List List(len: int + addiele: int): void + print):

Need help with #1  Need help with #1 Implement the classes in the following UML:

Implement the classes in the following UML: elist: double elength : int List List(len: int + addiele: int): void + print): void Stack Queue StackD Stackllen: int) remove(): double +Queuellen: int) eremove): double TestProgram mainargs: String D: void 1. List dlass includes: 1) constructor List 0:Create an empty list with a maximum length of 100 2) constructor List (len: int): Create an empty List with a user specified maximum length 3) add(elerint): add an element to the end of the list Hint: double i it new double [i001 Hint: double 1 list-new double [lenla 4) print: display the list 2. Stack cdass includes: two constructors:similar to the constructors in List 2) 1) remove ): remove an element at the end of the list and return this element 3. Queue class includes 1) two constructors: similar to the constructors in List 2) remove () : remove an element at the beginning of the list and return this element 4.Test Program: main method conduct the following tasks: 1) creates a stack and a queue with 10 random numbers using the add method. 2) display the stack and the queue. 3) Remove two elements from the stack and the queue 4) display the two elements removed from the stack 5) display the two elements removed from the queue 6) display stack and the queue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!