Question: The CommunityMember class is an abstract class. It will have the following private attributes: fullName full name of the person of type String. ssn person's
The CommunityMember class is an abstract class. It will have the following private attributes:
fullName full name of the person of type String.
ssn person's social security number of type String.
Make the CommunityMember abstract class:
Make a parameter constructor that receives all the attributes of the class. pts
Make the setters and getters of the attributes. pts each
You will have an abstract method called getPaymentAmount that will return a number
type double. pts
It will have an abstract method called askInfo of type void. pts
Make an override to the toString method where it will print the attributes of the class.
pts
The Employee class is a concrete class. It will have the following attribute:
position will save the position of the employee of type String.
The Faculty class is an abstract class. It will have the following attribute: className saves the teacher's subject of type String.
The Teacher class is a concrete class. It will have the following attributes:
Do
credits saves the academic load of type integer. paymentByClass saves the payment per class offered of type double.
the concrete class Teacher:
Make a parameter constructor that receives all the attributes of the class. pts Make an override to the askInfo method, this method will ask the attributes of the class. pts
Make an override to the toString method where it will print all the attributes. pts Make an override to the getPaymentAmount method that will return a double. This method will be calculated as follows: pts
credits paymentByClass
Make a class that contains a main. You must implement polymorphism, declare an array of type CommunityMember of size which will be assigned objects of type Employee, Teacher and Teacher. You must make a loop that prints the toString of each object where it includes all the attributes plus the PaymentAmount. pts
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
