Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions

Question

What will be displayed after the following code is executed? 6

Answered: 1 week ago