Question
C# There are a number of national and state parks available to tourists. Create a Park class. Include data members, such as the name of
C#
There are a number of national and state parks available to tourists. Create a Park class. Include data members, such as the name of park (string), address (string), type of facility (either national, state, or local), phone number (string), opening hours (string), and entrance fee for adults (decimal) without a pass. Create separate instance methods that (1) Display the name of the park, the type of the park, the opening hours, and the fee of the park; (2) Display the name of the park, the type of the park, the address, and the phone number; and (3) Return the cost of the park for a given number of visitors, i.e.,
Create a constructor that can initialize all these data members (name of park, address, type of facility, phone number, opening hours, and entrance fee).
In your console applications Main method, test your class by creating at least five new objects using the constructor youve created in your Park class. Each object will represent a specific park. You will need to search on the web for several parks.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started