Question: Using the Name.java and Student.java files, expand both classes to include the following methods: A copy constructor, A clone method, A finalize method, A dispose

Using the Name.java and Student.java files, expand both classes to include the following methods: A copy constructor, A clone method, A finalize method, A dispose method, and A hashCode method. A compareTo method

Test the upgraded classes using the application TestStudentName.java Be sure to include output messages in both the finalize method and the dispose method.

I have uploaded the following code files to start:

Name.java

Using the Name.java and Student.java files, expand both classes to include the

Student.java

following methods: A copy constructor, A clone method, A finalize method, A

TestStudentName.java

dispose method, and A hashCode method. A compareTo method Test the upgraded

classes using the application TestStudentName.java Be sure to include output messages in

public class Name private String first //first name private String last // last name public Name) this (, "" ); public Name String firstName, String lastName) 12 3 fi rst fi rst Name ; last = lastName ; public void setName(String firstName, String lastName) fi rst fi rst Name ; last = lastName ; public Name (Name obj) throws Nul I PointerException t/ Copy Constructor public void setFirst ( String firstName) { first = firstName public void setLast (String last Name ) { last = last Name: public String getFirst) public String getLast () publ ic String getName () public void giveLast NameTo Name aName) return first return last return toSt r ing) 30 aName.setLast ast; publ ic String toStr ing) return first ast public void finalize ) public void dispose // finalize method //dispose method [ 15/ end Name

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!