Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

(JAVA) Programming Assignment

There are a number of zoos available to tourists.

1. Create a Zoo class. Include data fields such as name of zoo, location, size, cost incurred in running the zoo for the past 12 months, number of visitors recorded for the past 12 months, ticket price per visitor and annual profit. (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 size of the zoo;

b) compute total income based on ticket price and the number of visitors during the last 12 months;

c) compute annual profit from cost and total income.

5. Create a second class(with main method) 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. Print the name, location and size of the zoo. Calculate and print annual profit 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: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain in detail how the Mughal Empire was established in India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I - -[ze dx

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = 1- 1 dx 9

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago