Question: Java MyLinkedList Application All instance methods in MyLinkedList should be implemented before you start the application. a. Create an abstract class named Student. Include a
Java
MyLinkedList Application All instance methods in MyLinkedList should be implemented before you start the application. a. Create an abstract class named Student. Include a String field for the students id number, name, and a double field for the registration fees. Within the class, include a constructor that requires the id number, and name. Add three get methods for the three data field. Include an abstract method named setFees(). b. Create two child classes of Student: PartTime and FullTime. Each must include a setFees() method that sets the fees for all PartTime students to $700 and for all FullTime students to $1200. Write a toString() method and a constructor for each subclass, and include a call to setFees() within each. c. Write an application demonstrating that:
4. Add a PartTime student to the list then remove the last FullTime student from the list. Display the list. 5. Add a new PartTime student at index 2 in the list then remove the student at index 1 from the list. Display the list 6. Check if the newly added PartTime student is in the list using contains method, then display its index which should be 1. // contains, indexOf 7. Change the title of the name of the newly added student to John Doe. // set 8. Construct a MyLinkedList object from an array of mixed students then display the list.
public interface MyList
public void clear();
public boolean isEmpty();
public boolean contains(E object);
public int indexOf(E object);
public E get(int index);
public E set(E e, int index);
public int size();
public void add(int index, E object);
public E remove(int index);
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
