Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write in java with comments please Create an abstract class called Person that includes private data fields for lastname, firstname, and age. It should include

Write in java with comments please

Create an abstract class called Person that includes private data fields for lastname, firstname, and age. It should include all necessary methods to retrieve the data (no set methods) and a constructor that can set the data fields at the time of instantiation of an object. It also includes an abstract method for displaying information. Create a subclass called OlympicAthlete that inherits from the Person base class and includes an additional data field for Number of Gold Medals. Implement all the required methods to retrieve the data and a constructor that can initialize the data field at the time of instantiation of the object. Instantiate an object using the OlympicAthlete class and pass all the data items through the constructor. Display all the information to the console.

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

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

What is an audit and why is it important?

Answered: 1 week ago