Starting from:

$34.99

CSE201 Advanced Programming Solution

Assignment 02
Indraprastha Institute of Information Technology, Delhi
https://www.iiitd.ac.in/sites/default/files/docs/education/AcademicDishonesty.pdf
NOTE: We won’t respond to any query because you missed to read the description carefully. We will ONLY respond to valid questions. Make sure you ask all your doubts in advance and not at the last minute.
Please follow the following good programming practices that are as follows.
● All the fields in the class should be private unless there is a good reason to have otherwise.
● Every field should have a getter and a setter.
● All the methods of the class should be public unless there is a good reason to have otherwise (for example, helper methods need not be public).
● Every class should be public.
● Add comments to the class and methods except the getter and setter methods.
● Follow the naming conventions for classes, fields, methods, objects, and variables (including constants).
Topic: Interfaces, Polymorphism & Object Class
Welcome to ZOOtopia!
You must employ Object-Oriented Programming (OOP) principles, such as interfaces, inheritance, abstract classes, and polymorphism, to design the application effectively.
Application Flow:
The application will have a user-friendly command-line interface where you can enter as either an admin or a visitor.
Visitors can enjoy different levels of zoo experiences: "Basic," "Premium,". These levels offer varying perks and access to different areas of the zoo.
Admins can manage the zoo's attractions, animals, and visitor information. They can also add special events and discounts.
Admin Functionalities:
Enter as Admin: Admins must provide their username and password to access all admin privileges. Make use of a constant for username and password with fixed values to be compared against.
Manage Attractions/Events: Admins can view, add, modify, or remove attractions in the zoo. Each attraction should have a unique ID. Attractions can be any cultural exhibit, such as a safari experience, a botanical garden, a dinosaur show, etc. The attractions are free of cost for the premium members. However, the basic members have to buy a ticket for a fixed price for each attraction.
Manage Animals: Admins can add animals to specific attractions. They can also update animal details and remove animals when necessary. Animals can be of 3 types - Mammals, Amphibians and Reptiles. Note that there must be at least 2 kinds of animals for each type. For e.g., elephants and monkeys could be the 2 kinds of mammals required. When adding any new animal to the zoo, the animal should belong to one of these 3 categories only.
Set Discounts: Admins can set discount codes on ticket prices for different visitor categories and attractions, such as minors or seniors.
● Every minor visitor to the zoo (<18) should get a 10% discount on their tickets and membership amount.
● Every senior citizen (>60) should get a 20% discount on their tickets and membership amount
Admin should be able to add or remove any of these discounts as required.
● If a person buys more than 2 attractions, they get a special discount of 15% on the total amount
● If a person buys more than 3 attractions, they get a special discount of 30% on the total amount
Admin should be able to add or remove any of these deals as required.
View Visitor Stats: Admins can access statistics on the number of visitors, revenue, and popular attractions.
View Feedback: Admins should also be able to see the feedback left by the visitors.
Visitor Functionalities:
Register: Visitors can register by providing their name, age, phone number, balance, email, and password.
Log In: Registered visitors can log in using their email and password to access their account.
Explore the Zoo: Visitors can browse through different attractions and learn about the animals.
Buy Membership: Visitors can purchase tickets based on their chosen experience level (Basic, Premium).
Buy Tickets: Only basic users can buy tickets for each attraction they want to visit. They can buy tickets for as many attractions as they want and also get special deals. The ticket is a one-time usage ticket and will be invalid after a visit to the attraction.
View Discounts: During the purchase of tickets, visitors can see all the discounts available and select the appropriate discount code.
Apply Discounts: Visitors can apply any available discount (using the discount codes) to their ticket purchase if they satisfy the eligibility criteria.
Visit Animal: The visitor will choose to visit an animal, this functionality will, in turn, ask the visitor to either choose to feed the animal or read about the animal. Choosing to feed the animal will result in the animal making a noise, for example, if you choose to feed a lion it will “Roar”, reading about the animal will return a brief passage about the animal’s history.
Visit Attractions/Visit Event: Visitors can access attractions based on their experience level and the ticket bought to enjoy unique experiences. A simple “Welcome to the attraction X” statement is enough to be counted as a visit to the attraction.
Provide Feedback: Visitors can leave feedback about their zoo experience and suggest improvements.
Sample Run
Welcome to ZOOtopia!
1. Enter as Admin
2. Enter as a Visitor
3. View Special Deals
Enter your choice: 1
Enter Admin Username: admin Enter Admin Password: admin123 Logged in as Admin.
Admin Menu:
1. Manage Attractions
2. Manage Animals
4. Set Discounts
5. Set Special Deal
6. View Visitor Stats
7. View Feedback
8. Exit Enter your choice: 1
Manage Attractions:
1. Add Attraction
2. View Attractions
3. Modify Attraction
4. Remove Attraction
5. Exit
Enter your choice: 1
Enter Attraction Name: Jungle Safari
Enter Attraction Description: A thrilling adventure in the jungle. Attraction added successfully.
Admin Menu:
1. Manage Attractions
2. Manage Animals
4. Set Discounts
5. Set Special Deal
6. View Visitor Stats
7. View Feedback
8. Exit Enter your choice: 2
Manage Animals:
1. Add Animal
2. Update Animal Details
3. Remove Animal
4. Exit
Enter your choice: 1
Enter Animal Name: Lion
Enter Animal Type: Mammal Animal added to Zoo.
Admin Menu:
1. Manage Attractions
2. Manage Animals
4. Set Discounts
5. Set Special Deal
6. View Visitor Stats
7. View Feedback
8. Exit Enter your choice: 4
Set Discounts:
1. Add Discount
2. Modify Discount
3. Remove Discount
4. Exit
Enter your choice: 1
Enter Discount Category: Students Enter Discount Percentage (e.g., 20 for 20%): 15 Discount added successfully.
Admin Menu:
1. Manage Attractions
2. Manage Animals
4. Set Discounts
5. Set Special Deal
6. View Visitor Stats
7. View Feedback
8. Exit Enter your choice: 6
Visitor Statistics:
- Total Visitors: 1200
- Total Revenue: $15,000 - Most Popular Attraction: Jungle Safari
Admin Menu:
1. Manage Attractions
2. Manage Animals
4. Set Discounts
5. Set Special Deal
6. View Visitor Stats
7. View Feedback
8. Exit Enter your choice: 8 Logged out.
1. Enter as Admin
2. Enter as a Visitor
3. View Special Deals
Enter your choice: 2
1. Register
2. Login
Enter your choice: 1
Enter Visitor Name: Alice
Enter Visitor Age: 32
Enter Visitor Phone Number: 7568743321
Enter Visitor Balance: 100
Enter Visitor Email: alice@email.com
Enter Visitor Password: pass123 Registration is successful.
1. Register
2. Login
Enter your choice: 2
Enter Visitor Email: alice@email.com
Enter Visitor Password: pass123 Login Successful.
Visitor Menu:
1. Explore the Zoo
2. Buy Membership
3. Buy Tickets
4. View Discounts
5. View Special Deals
6. Visit Animals
7. Visit Attractions
8. Leave Feedback
9. Log Out Enter your choice: 1
Explore the Zoo:
1. View Attractions
2. View Animals
3. Exit
Enter your choice: 1
Attractions in the Zoo:
1. Jungle Safari
2. Botanical Garden
3. Dinosaur Show
Enter your choice: 1
ZOOtopia offers an adventure ride that allows you to explore unexplored trails. Buy your ticket now!
Explore the Zoo:
1. View Attractions
2. View Animals
3. Exit
Enter your choice: 3
Visitor Menu:
1. Explore the Zoo
2. Buy Membership
3. Buy Tickets
4. View Discounts
5. View Special Deals
6. Visit Animals
7. Visit Attractions
8. Leave Feedback
9. Log Out Enter your choice: 2
Buy Membership:
1. Basic Membership (₹20)
2. Premium Membership (₹50)
Enter your choice: 2
Apply Discount Code: None
Basic Membership purchased successfully. Your balance is now ₹80.
Visitor Menu:
1. Explore the Zoo
2. Buy Membership
3. Buy Tickets
4. View Discounts
5. View Special Deals
6. Visit Animals
7. Visit Attractions
8. Leave Feedback
9. Log Out
Enter your choice: 3
Buy Tickets:
Select an Attraction to Buy a Ticket:
1. Jungle Safari (₹10)
2. Botanical Garden (₹15)
3. Dinosaur Show (₹12)
Enter your choice: 1
The ticket for Jungle Safari was purchased successfully. Your balance is now ₹70.
Visitor Menu:
1. Explore the Zoo
2. Buy Membership
3. Buy Tickets
4. View Discounts
5. View Special Deals
6. Visit Animals
7. Visit Attractions
8. Leave Feedback
9. Log Out Enter your choice: 4
View Discounts:
1. Minor (10% discount) - MINOR10 2. Senior Citizen (20% discount) - SENIOR20
Visitor Menu:
1. Explore the Zoo
2. Buy Membership
3. Buy Tickets
4. View Discounts
5. View Special Deals
6. Visit Animals
7. Visit Attractions
8. Leave Feedback
9. Log Out Enter your choice: 5
Special Deals:
1. Buy 2 tickets and get 15% off
2. Buy 3 tickets and get 30% off
Visitor Menu:
1. Explore the Zoo
2. Buy Membership
3. Buy Tickets
4. View Discounts
5. View Special Deals
6. Visit Animals
7. Visit Attractions
8. Leave Feedback
9. Log Out Enter your choice: 7
Visit Attractions:
Select an Attraction to Visit:
1. Jungle Safari
2. Botanical Garden
3. Dinosaur Show
4. Exit
Enter your choice: 2
Ticket not available. Basic Members need to buy separate tickets for the attractions.
Select an Attraction to Visit:
1. Jungle Safari
2. Botanical Garden
3. Dinosaur Show
4. Exit
Enter your choice: 1 1 Ticket Used.
Thank you for visiting Jungle Safari. Hope you enjoyed the attraction.
Visitor Menu:
1. Explore the Zoo
2. Buy Membership
3. Buy Tickets
4. View Discounts
5. View Special Deals
6. Visit Animals
7. Visit Attractions
8. Leave Feedback
9. Log Out Enter your choice: 8
Leave Feedback:
Enter your feedback (max 200 characters): The Jungle Safari was terrific! Thank you for your feedback.
Visitor Menu:
1. Explore the Zoo
2. Buy Membership
3. Buy Tickets
4. View Discounts
5. View Special Deals
6. Visit Animals
7. Visit Attractions
8. Leave Feedback
9. Log Out
Enter your choice: 9 Logged out.

More products