Question: Define the class MyList creating an empty list in the constructor. In the body of the class implemet the following methods: -- add(x) prnt(). rem

Define the class MyList creating an empty list in the constructor. In the body of the class implemet the following methods: -- add(x) prnt(). rem () top(). empty() Appends element x to the list. prints the list Removes and returns the last element. Gets the last element. Returns a Boolean answering whether the list is empty or not. Add three elements 1,2 and 3, and playing with the methods demonstrate that all your methods work correctly
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
