Question: Using Python Programming: 2 (15 points) Define a class FrequentFlyer in FrequentFlyer.py (11 pts) that has the following . Two data fields: flyerName(String), milesBalance (integer)
2 (15 points) Define a class FrequentFlyer in FrequentFlyer.py (11 pts) that has the following . Two data fields: flyerName(String), milesBalance (integer) .A constructor that creates a flyer with the specified name and miles flown. . Standard methods: getName, setName, getMiles, setMiles .Additional methods: getstatus method to determine the membership status based on the miles balance, 10000 miles: bronze status 10000 to 19999: silver status >-20000: gold status Write a test program TestFlyer.py (4 pts) that Create a flyer object. Flyer name is Jane Smith with 17025 miles. Print the flyer information including name, miles balance and status . Ask user for miles for the current trip. Update the flyer's miles balance. . . .Print out the updated flyer information Sample Output: Flyer: Jane Smith Enter miles for this trip: 3050 Miles Balance: 17025 Status: Silver Updated information Flyer: Jane Smith Miles Balance: 20075 Status: Gold
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
