Question: (1) Create a City class with the following instance variables and methods: Instance variables: name (String), province (String) Methods: constructor, get/set methods for the instance
(1) Create a City class with the following instance variables and methods: Instance variables: name (String), province (String) Methods: constructor, get/set methods for the instance variables, and toString method The City class implements the Comparable
Here is a list of cities / towns / places in Canada with same name but in different provinces:
Places in Canada with the same name in THREE provinces (8 cities/towns/places):
Borden - Ontario, Prince Edward Island, Saskatchewan
Beaumont - Alberta, Newfoundland, Quebec
Princeton - British Columbia, Newfoundland, Ontario
Richmond - British Columbia, Ontario, Quebec
Stratford - Ontario, Prince Edward Island, Quebec
Trout Lake - Alberta, British Columbia, Northwest Territories
Victoria - British Columbia, Newfoundland, Ontario
Windsor - Nova Scotia, Ontario, Quebec
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
