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,
- A 'equals' method,
- A 'hashCode' method, and
- A 'compareTo' method.
Test the upgraded classes using the application 'TestStudentName.java' located in 'Lab1_StartUp.zip'.
Be sure to include output messages in both the 'finalize' method and the 'dispose' method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
