¥class
GovernmentEntry extends CityEntry {
¥ String city, state, government;
¥ GovernmentEntry(String n, String a,
String p, String c, String s, String g) {
¥ super(n,a,p);
¥ this.city = c;
¥ this.state = s;
¥ this.government = g;
¥ }
¥ String getCity() { return
this.city; }
¥ String getState() { return
this.state; }
¥ String getGovernment() { return
this.government; }
¥ public String toString() {
¥ return "Government[" +
this.getName() + "," + this.getAddress() + "," +
¥ this.getPhone()
+ "," + this.city + "," + this.state + "," +
¥ this.government
+ "]";
¥ }
¥}
¥
¥class
ResidentialEntry extends CityEntry {
¥ ResidentialEntry(String n, String a,
String p) { super(n,a,p); }
¥ public String toString() {
¥ return "Residential[" +
this.name + "," + this.address + "," + this.phone +
¥ "]";
¥ }
¥}
¥