Added Interface for EstateAgents and Estates
Added the Command Line Interface for EstateAgents and Estates without functionality. Added Data Structures for Estates, Apartments and Houses.
This commit is contained in:
40
02/src/de/dis2017/data/Apartment.java
Normal file
40
02/src/de/dis2017/data/Apartment.java
Normal file
@ -0,0 +1,40 @@
|
||||
package de.dis2017.data;
|
||||
|
||||
public class Apartment extends Estate{
|
||||
int floor;
|
||||
int rent;
|
||||
int rooms;
|
||||
boolean balcony;
|
||||
boolean builtinKitchen;
|
||||
|
||||
public int getFloor() {
|
||||
return floor;
|
||||
}
|
||||
public void setFloor(int floor) {
|
||||
this.floor = floor;
|
||||
}
|
||||
public int getRent() {
|
||||
return rent;
|
||||
}
|
||||
public void setRent(int rent) {
|
||||
this.rent = rent;
|
||||
}
|
||||
public int getRooms() {
|
||||
return rooms;
|
||||
}
|
||||
public void setRooms(int rooms) {
|
||||
this.rooms = rooms;
|
||||
}
|
||||
public boolean isBalcony() {
|
||||
return balcony;
|
||||
}
|
||||
public void setBalcony(boolean balcony) {
|
||||
this.balcony = balcony;
|
||||
}
|
||||
public boolean isBuiltinKitchen() {
|
||||
return builtinKitchen;
|
||||
}
|
||||
public void setBuiltinKitchen(boolean builtinKitchen) {
|
||||
this.builtinKitchen = builtinKitchen;
|
||||
}
|
||||
}
|
||||
61
02/src/de/dis2017/data/Estate.java
Normal file
61
02/src/de/dis2017/data/Estate.java
Normal file
@ -0,0 +1,61 @@
|
||||
package de.dis2017.data;
|
||||
|
||||
/**
|
||||
* EstateAgent data class
|
||||
*/
|
||||
public abstract class Estate {
|
||||
private int id = -1;
|
||||
private String city;
|
||||
private int postalcode;
|
||||
private String street;
|
||||
private int streetnumber;
|
||||
private int squarearea;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public int getPostalcode() {
|
||||
return postalcode;
|
||||
}
|
||||
|
||||
public void setPostalcode(int postalcode) {
|
||||
this.postalcode = postalcode;
|
||||
}
|
||||
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
|
||||
public void setStreet(String street) {
|
||||
this.street = street;
|
||||
}
|
||||
|
||||
public int getStreetNumber() {
|
||||
return streetnumber;
|
||||
}
|
||||
|
||||
public void setStreetnumber(int streetnumber) {
|
||||
this.streetnumber = streetnumber;
|
||||
}
|
||||
|
||||
public int getSquareArea() {
|
||||
return streetnumber;
|
||||
}
|
||||
|
||||
public void setSquareArea(int squarearea) {
|
||||
this.squarearea = squarearea;
|
||||
}
|
||||
}
|
||||
28
02/src/de/dis2017/data/House.java
Normal file
28
02/src/de/dis2017/data/House.java
Normal file
@ -0,0 +1,28 @@
|
||||
package de.dis2017.data;
|
||||
|
||||
public class House extends Estate {
|
||||
int floors;
|
||||
int price;
|
||||
boolean garden;
|
||||
|
||||
public int getFloors() {
|
||||
return floors;
|
||||
}
|
||||
public void setFloors(int floors) {
|
||||
this.floors = floors;
|
||||
}
|
||||
public int getPrice() {
|
||||
return price;
|
||||
}
|
||||
public void setPrice(int price) {
|
||||
this.price = price;
|
||||
}
|
||||
public boolean isGarden() {
|
||||
return garden;
|
||||
}
|
||||
public void setGarden(boolean garden) {
|
||||
this.garden = garden;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user