Question: 2. Consider the Museum and City classes partially defined as follows: public class Museum ( public class City f private ArrayList museums private float fee:

 2. Consider the Museum and City classes partially defined as follows:

2. Consider the Museum and City classes partially defined as follows: public class Museum ( public class City f private ArrayList museums private float fee: private int exhibits; // # exhibits // in museum /.. remaining code omitted (a) [4 marks] Assuming that all getter methods are available in each class, complete the following method in the City class so that it returns the total number of exhibits available in the city's museums: public int totalNumberOfExhibits) (b) [6 marks] Write a proper public instance method in the City class called bargain Tour(float money) that returns an ArrayList of all the Museums whose fee is less than or equal to the input money value. The order of the museums in the output ArrayList does not matter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!