X-Git-Url: https://xp-dev.com/git/RRRRHHHH_Code/blobdiff_plain/d23286250fb8e8263d35aeef5e6d1683be5ac968..5538790d8fc54f60de9b5c989eae82b446374aca:/ruralHouses/src/domain/RuralHouse.java diff --git a/ruralHouses/src/domain/RuralHouse.java b/ruralHouses/src/domain/RuralHouse.java index d499c88..50e46fa 100644 --- a/ruralHouses/src/domain/RuralHouse.java +++ b/ruralHouses/src/domain/RuralHouse.java @@ -20,23 +20,21 @@ public class RuralHouse implements Serializable { 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(); } - 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(); } @@ -71,7 +69,13 @@ public class RuralHouse implements Serializable { 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; } @@ -136,6 +140,7 @@ public class RuralHouse implements Serializable { return availableOffers; } + /** * This method obtains the offer that match exactly with a given dates that has not been booked *