Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the answer, and pictures for simple run the code in java * If you can explain it by commenting, I would be grateful

image text in transcribedimage text in transcribed

Please write the answer, and pictures for simple run

the code in java

* If you can explain it by commenting, I would be grateful to you

Write Java code to implement the following inheritance hierarchy: Person - firstName : String - lastName : String - address : String # id : int + Person() + Person(firstName : string, lastName : string, address : string, id : int) + setters/getters + display() : void Student - gpa : double + Student(gpa : double) + setters/getters + display() : void Employee - job Title : string + Employee (job Title : string) + setters/getters + display() : void The two sub classes Student and Employee should override display() method. In Student, display() should show GPA and the other attributes in the super class. And in Employee, display() should show the job title and the other attributes in the super class. Write a main program that should do the following: 1- Create an instant of class Student and an instant of class Employee with proper values for the attributes. 2- Display the content of each class using display() method

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

Step: 3

blur-text-image

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago