Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. from parks import *
  2.  
  3. print()
  4. # Creating and printing the Park Object.
  5.  
  6. park = Park("General Park", "NS", 300, 1963)
  7. print(park._str_())
  8. print()
  9.  
  10. # Modifying area and finding the entry fee for 2 days at general park.
  11. park.getEntryFee(2)
  12. print()
  13. park.setArea(400)
  14. print()
  15.  
  16. # creating and printing the three provincial parks.
  17. provincial1 = ProvincialPark("Big park", "NL", 200, 1950, 3)
  18. provincial2 = ProvincialPark("Small Park", "ON", 150, 1980, 2)
  19. provincial3 = ProvincialPark("Medium Park", "BC", 165, 1992, 3)
  20. print(provincial1.Park_str_())
  21. print()
  22. print(provincial2.Park_str_())
  23. print()
  24. print(provincial3.Park_str_())
  25.  
  26. # Updating the rating of the first provincial park
  27. print()
  28. provincial1.setParkRating(1)
  29.  
  30. # Finding the cost of visiting the 3 provincial parks for 3 days
  31. print()
  32. provincial1.getEntryFee(3)
  33. provincial2.getEntryFee(3)
  34. provincial3.getEntryFee(3)
  35. print()
  36.  
  37. # Creating and printing 2 National Parks.
  38. national1 = NationalPark("Gros Morne", "NL", 1805, 1973, "Freshwater Fjords")
  39. national2 = NationalPark("Banff", "AB", 6641, 1985, "Lake Louise")
  40.  
  41. print(national1.Park_str_())
  42. print()
  43. print(national2.Park_str_())
  44. print()
  45.  
  46. # Changing the special feature for Gros Morne and printing result
  47. national1.setknownFor("Tablelands")
  48. print()
  49.  
  50. # Finding the visiting costs for the 2 national parks
  51. national1.getEntryFee(3)
  52. national2.getEntryFee(3)
  53. print()
  54.  
  55. # Printing the total number of parks created.
  56. print("The total number of Parks is", Park.counter)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement