filmov
tv
Assignment on Static Level 3 |Assignment Set-4|Object Oriented Programming Using Python|NM|Infosys

Показать описание
#naanmudhalvan #infosys #springboard
#answers
#objectorientedprogrammingusingpython
#answersdotcom
#staticlevel3
Problem Statement
"WonderLand" water theme park wants to generate tickets for its customers.
Complete the implementation of the requirement based on the given class diagram and code.
Class Description:
Theme Park class: Complete the class based on comments given in starter code
Ticket class: Complete the class based on comments given in starter code
Customer class:
Initialize points_earned, food_coupon and ticket to 0, "No" and a Ticket object respectively in the constructor
play_game():
Calculate total points based on the list of games played by the customer
Update attribute, points_earned with the calculated value
ThemePark allows a free ride on Game 2 if the customer has opted for Game 3. If this is satisfied, add "Game2" to list_of_games and include its points to total points
update_food_coupon(): They provide food coupon to a customer who has opted Game 4 and has earned more than 15 points.
Update attribute, food_coupon status to "Yes" if the above rule is satisfied
book_ticket():
Calculate ticket amount
If amount can be calculated, generate ticket id, play game, update food coupon and return true
Else, return false
Note: Perform case sensitive string comparison
#answers
#objectorientedprogrammingusingpython
#answersdotcom
#staticlevel3
Problem Statement
"WonderLand" water theme park wants to generate tickets for its customers.
Complete the implementation of the requirement based on the given class diagram and code.
Class Description:
Theme Park class: Complete the class based on comments given in starter code
Ticket class: Complete the class based on comments given in starter code
Customer class:
Initialize points_earned, food_coupon and ticket to 0, "No" and a Ticket object respectively in the constructor
play_game():
Calculate total points based on the list of games played by the customer
Update attribute, points_earned with the calculated value
ThemePark allows a free ride on Game 2 if the customer has opted for Game 3. If this is satisfied, add "Game2" to list_of_games and include its points to total points
update_food_coupon(): They provide food coupon to a customer who has opted Game 4 and has earned more than 15 points.
Update attribute, food_coupon status to "Yes" if the above rule is satisfied
book_ticket():
Calculate ticket amount
If amount can be calculated, generate ticket id, play game, update food coupon and return true
Else, return false
Note: Perform case sensitive string comparison
Комментарии