/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package rulespecs2; /** * * @author denis */ public class City extends Country{ protected String nameCity; public City(String nameCity, String nameCountry) { super(nameCountry); this.nameCity = nameCity; } @Override public String toString() { return "City{" + "nameCountry=" + nameCountry + "nameCity=" + nameCity + '}'; } }