super();
}
- public RuralHouse(int houseNumber, Owner owner, String description, String town , int nRooms,int nKitchens,int nBaths,
- int nLivings,int nParkings) {
+ public RuralHouse(int houseNumber, Owner owner, String description, String town ,HouseFeatures features) {
this.houseNumber = houseNumber;
this.description = description;
this.owner = owner;
this.town = town;
- this.features = new HouseFeatures(nRooms,nKitchens,nBaths,nLivings,nParkings);
+ this.features = features;
offers=new Vector<Offer>();
}
- public RuralHouse(int houseNumber, Owner owner, String town , int nRooms,int nKitchens,int nBaths,
- int nLivings,int nParkings) {
+ public RuralHouse(int houseNumber, Owner owner, String town , HouseFeatures features) {
this.houseNumber = houseNumber;
this.description = null;
this.owner = owner;
this.town = town;
- this.features = new HouseFeatures(nRooms,nKitchens,nBaths,nLivings,nParkings);
+ this.features = features;
offers=new Vector<Offer>();
}
public void setTown(String town) {
this.town=town;
}
-
+ public HouseFeatures getFeatures() {
+ return features;
+ }
+
+ public void setFeatures(HouseFeatures features) {
+ this.features = features;
+ }
public String toString() {
return this.houseNumber + ": " + this.town;
}
return availableOffers;
}
+
/**
* This method obtains the offer that match exactly with a given dates that has not been booked
*