Answered step by step
Verified Expert Solution
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
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 ArrayListStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started