Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(JAVA) Programming Assignment 3 There are a number of zoos available to tourists. 1. Create a Zoo class. Include data fields such as name of

(JAVA) Programming Assignment 3

There are a number of zoos available to tourists.

1. Create a Zoo class. Include data fields such as name of zoo, location, size, fee for the past 12 months, number of visitors recorded for the past 12 months, admission rates per visitor and annual budget. (20 points)

2. Include at least two mutators and two accessors. (15 points)

3. Include one default constructor and one more constructor. (15 points)

4. Write separate instance methods that implement: (30 points) a) return a string representing name of the zoo, the location and type of zoo; b) compute total admission based on admission rates and the number of visitors during the last 12 months; c) compute revenue from fees for the past year and total admission.

5. Create a second class to test your Zoo class. (20 points)

In your second classs Main method, test your class by creating at least three new objects using the constructors or mutators youve created in your Zoo class. Each object will represent a specific zoo. Calculate and print revenue for each zoo.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions