Question: **IN JAVA** Define a class Diploma and its subclass DiplomaWithHonors, so that the statements Diploma diploma1 = new Diploma(Murray Smith, Gardening); System.out.println(diploma1); System.out.println(); Diploma diploma2

**IN JAVA**

Define a class Diploma and its subclass DiplomaWithHonors, so that the statements Diploma diploma1 = new Diploma(Murray Smith, Gardening); System.out.println(diploma1); System.out.println(); Diploma diploma2 = new DiplomaWithHonors(Lisa Smith, Evolutionary Psychology); System.out.println(diploma2); System.out.println(); Display This certifies that Murray Smith has completed a course in Gardening This certifies that Lisa Smith has completed a course in Evolutionary Psychology *** with honors *** Make your class definitions consistent with the information-hiding principle (declare fields as private) and avoid duplication of code. Write THREE classes: Diploma, DiplomaWithHonors, and DiplomaTest (or Main).

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!