Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from parks import *
- print()
- # Creating and printing the Park Object.
- park = Park("General Park", "NS", 300, 1963)
- print(park._str_())
- print()
- # Modifying area and finding the entry fee for 2 days at general park.
- park.getEntryFee(2)
- print()
- park.setArea(400)
- print()
- # creating and printing the three provincial parks.
- provincial1 = ProvincialPark("Big park", "NL", 200, 1950, 3)
- provincial2 = ProvincialPark("Small Park", "ON", 150, 1980, 2)
- provincial3 = ProvincialPark("Medium Park", "BC", 165, 1992, 3)
- print(provincial1.Park_str_())
- print()
- print(provincial2.Park_str_())
- print()
- print(provincial3.Park_str_())
- # Updating the rating of the first provincial park
- print()
- provincial1.setParkRating(1)
- # Finding the cost of visiting the 3 provincial parks for 3 days
- print()
- provincial1.getEntryFee(3)
- provincial2.getEntryFee(3)
- provincial3.getEntryFee(3)
- print()
- # Creating and printing 2 National Parks.
- national1 = NationalPark("Gros Morne", "NL", 1805, 1973, "Freshwater Fjords")
- national2 = NationalPark("Banff", "AB", 6641, 1985, "Lake Louise")
- print(national1.Park_str_())
- print()
- print(national2.Park_str_())
- print()
- # Changing the special feature for Gros Morne and printing result
- national1.setknownFor("Tablelands")
- print()
- # Finding the visiting costs for the 2 national parks
- national1.getEntryFee(3)
- national2.getEntryFee(3)
- print()
- # Printing the total number of parks created.
- print("The total number of Parks is", Park.counter)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement