(b) Implement the HandicappedGolfer and PCHolder classes. The HandicappedGolfer class is a subclass of Golfer, and it has: One additional instance variable: _handicap (float) that represents the golfer's ability. Golf handicap is generally between 0 and 36. The method get Handicap returns the handicap number for this golfer. The_str_method returns a string representation of a HandicappedGolfer object. This is an example in the suggested format: Member ID: 1 Name: Tommy Woods Membership: Full(A) Handicap: 7.2 The PCHolder class is also a subclass of Golfer. One additional instance variable: expiry Date (datetime) that represents the validity date for the Proficiency Certificate. Method getMembershipStatus returns False if the expiry date of the Proficiency Certificate has lapsed (compare to current datetime). Otherwise, it returns the membership status of this golfer. The method renew accepts and set a new expiry date for the Proficiency Certificate.
Implements getHandicap method to return 99.9 for PC Holders. The_str_method returns a string representation of a PCHolder object. This is an example in the suggested format: Member ID: 5 Name: Phil Stenson Membership: Basic(I) Expiry: 30-Nov-2022 (10 marks)
(b) Implement the HandicappedGolfer and PCHolder classes. The HandicappedGolfer class is a subclass of Golfer, and it ha
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
(b) Implement the HandicappedGolfer and PCHolder classes. The HandicappedGolfer class is a subclass of Golfer, and it ha
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!