(b) Implement the HandicappedGolfer and PCHolder classes. The HandicappedGolfer class is a subclass of Golfer, and it ha

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
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

Post by answerhappygod »

B Implement The Handicappedgolfer And Pcholder Classes The Handicappedgolfer Class Is A Subclass Of Golfer And It Ha 1
B Implement The Handicappedgolfer And Pcholder Classes The Handicappedgolfer Class Is A Subclass Of Golfer And It Ha 1 (48.07 KiB) Viewed 21 times
(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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply