Page 1 of 1

PLEASE POST CODE WITH PROPER ALIGNMENT AND IN TEXT FORMAT TO COPY. THANK YOU Answer both part C and D

Posted: Fri Apr 29, 2022 6:48 am
by answerhappygod
PLEASE POST CODE WITH PROPER ALIGNMENT AND IN TEXT FORMAT TO
COPY. THANK YOU Answer both part C and D
Please Post Code With Proper Alignment And In Text Format To Copy Thank You Answer Both Part C And D 1
Please Post Code With Proper Alignment And In Text Format To Copy Thank You Answer Both Part C And D 1 (67.92 KiB) Viewed 20 times
(c) Implement a subclass, GolfingException of the Exception class. This class has no additional attribute or method. When the application encounters a golfing rule violation, an exception from this class is raised. (1 mark) (d) Implement the Flight class. The Flight class has: One instance variable:_golfers (list) represent the flight of golfers. Constructor accepts a list of golfers and assign to the instance variable golfers. The constructor must validate that (1) the number of golfers to be minimum 3 and maximum 4, (2) that the membership status for the flight of golfers is active. Otherwise, raise GolfingException with appropriate messages stating that a flight can only consists of 3 or 4 golfers, or indicate which golfer has inactive membership Using the parameter memberID, the searchGolfer method searches and returns the Golfer object if there is a golfer in the flight with the matching memberID. If not found, it returns None. : The getGolfersID method returns the flight's golfers' memberID in a List. Method getWeekend Eligibility return a Boolean value indicating if this flight of golfers can book a golf session on weekend. To book a weekend tee slot/time, all golfers of the flight must have “Full” memberships and their membership status should be "active". (6 marks)