Write a tennis registration program that admits members who are either a student or a staff. Design an object-oriented program which consists of the following three classes: Member (member count), Student(name, tel_no, id, fees_owing) & Staff (name, tel_no, id, fees_owing). {member's the base class, student & staff are it's derived classes).
Your registration program should be able to perform the following tasks:
1. Display on screen “Welcome to c-Tennis register! Maximum : 10 members.”
Declare a Member array pointer of size 10.
2. Prompt user to enter the names and contact numbers of each member.
Use cin and cout commands.
3. Determine if the new member is a student or a staff. The student id must also be provided and stored if the member is a student.
Create appropriate Staff or Student objects for the Member reference pointer.
4. Registration for a staff is at a rate of RM12, while a student’s rate is RM8. They may pay any amount of fees up to their respective rates during registration. If they have paid enough, display “Thanks for paying RM12.” (or RM8 for students). If they have an outstanding payment, display “You still owe RM” followed by the remainder.
Write a function called pay_fees in Member that takes in the fees as its only parameter and performs the required task as mentioned above.
5.Once a new member has been successfully registered, display a summary of this member including his / her name, contact number, as well as any outstanding fees. If the member is a student, further display his / her student id. Do not display the contact number.
Demonstrate the use of polymorphism here. Write a display function that displays different messages according to the actual type of the member, i.e., whether the member is a student or a staff.
6. Keep count of how many members have been registered.
Use a static variable to achieve this, placing the static variable in the correct class.
7. This registration process may be repeated up until a maximum of 10 members. You may terminate program at any time if no more members are to be registered.
That's how much i have done so far. I can't seem to integrate the payment method into the system. Like both staff and student inherits fee_owing from member how do i set fee_owing to 12 for staff and 8 for student?