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

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 Programming Questions!