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:
1. Make a parameter constructor that receives all the attributes of the class. (5 pts.)
2. Make the setters and getters of the attributes. (5 pts. each)
3. You will have an abstract method called getPaymentAmount() that will return a number
type double. (5 pts.)
4. It will have an abstract method called askInfo() of type void. (5 pts.)
5. Make an override to the toString() method where it will print the attributes of the class. (5
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 6.7.
8.9.
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. (10 pts.) Make an override to the askInfo() method, this method will ask the attributes of the class. (15 pts.)
Make an override to the toString() method where it will print all the attributes. (5 pts.) Make an override to the getPaymentAmount() method that will return a double. This method will be calculated as follows: (5 pts.)
credits * paymentByClass
10. Make a class that contains a main. You must implement polymorphism, declare an array of type CommunityMember of size 3, 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. (25 pts.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!