Question
Solution Preview
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
package hw1;/**
*
* @author
*/
public class City {
private String cityName;
private int hostelCost;
/**
* The cost to mail a postcard from a city is this fraction times the city's
* hostel cost (rounded to the nearest integer).
*/
public static final double POSTCARD_COST = 0.05;
/**
* Constructs a new City with the given name and lodging cost per night.
*
* @param givenCityName city name
* @param givenHostelCost lodging cost per night
*/
public City(String givenCityName, int givenHostelCost) {
cityName = givenCityName;
hostelCost = givenHostelCost;
}...