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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

Students also viewed these Databases questions

Question

What is the correct formula to calculate error bound with t scores?

Answered: 1 week ago