Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using JAVA please! THANKS! Write a program that has a class named Person with instance variable fields for holding person's name (String), and the birth

image text in transcribed

Using JAVA please!

THANKS!

Write a program that has a class named Person with instance variable fields for holding person's name (String), and the birth year (String). Write a constructor and appropriate accessors and mutators for the class's fields. Next, write a class named Engineer that extends the Person class. The Engineer should have the following members: An attribute for the maximum number of building designs A constructor that initializes all the instance variables (Engineer variables and the inherited variables) A to String method that displays the Engineer's attributes Next, write a class named Student that extends the Person class. The Student class should have the following members: An attribute for the number of courses A constructor that initializes all the instance variables A toString method that displays the Student's attributes Then write a program that creates three Engineer objects and two Student objects and store them in an ArrayList. Use a loop to display the attribute values of each object in the ArrayList. Also check and display the type of the object in each element of the ArrayList

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

What roles have these individuals played in your life?

Answered: 1 week ago

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago