Rev 94 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
// Specific implementation of CityRecord that stores coordinates and a city namepublic class CityRecord implements Record {private String name; // City nameprivate int x; // X-coordinateprivate int y; // Y-coordinate// Constructor initializing a new CityRecordpublic CityRecord(String name, int x, int y) {this.x = x;this.y = y;this.name = name;}// Encapsulation methodspublic String getName() {return name;}public int getX() {return x;}public int getY() {return y;}}