Question

In: Computer Science

Design and build objects to be used by a real estate company for listing the properties for sale. A base object of a property is necessary.

IN JAVA OOP

Design and build objects to be used by a real estate company for listing the properties for sale. A base object of a property is necessary. Decide what common about all properties and include these in the property object. Different type of properties are land, commercial and residential. A residential property can be single family and multi family. A commercial can be a commercial can be either a farm or non-farm.

Look at real estate websites and decide what to include in each object. Provide the UML that shows the objects and the relationship. Write the code for all the objects and submit hard copy of the UML and the code.

Solutions

Expert Solution

import java.awt.Image;
import java.util.ArrayList;

class Property {
   protected int length;
   protected int width;
   protected String owner, address, ownerPhone, typeOfOwnership;
   public int getLength() {
       return length;
   }
   public void setLength(int length) {
       this.length = length;
   }
   public int getWidth() {
       return width;
   }
   public void setWidth(int width) {
       this.width = width;
   }
   public String getOwner() {
       return owner;
   }
   public void setOwner(String owner) {
       this.owner = owner;
   }
   public String getAddress() {
       return address;
   }
   public void setAddress(String address) {
       this.address = address;
   }
   public String getOwnerPhone() {
       return ownerPhone;
   }
   public void setOwnerPhone(String ownerPhone) {
       this.ownerPhone = ownerPhone;
   }
   public String getTypeOfOwnership() {
       return typeOfOwnership;
   }
   public void setTypeOfOwnership(String typeOfOwnership) {
       this.typeOfOwnership = typeOfOwnership;
   }
   public long getPrice() {
       return price;
   }
   public void setPrice(long price) {
       this.price = price;
   }
   public long getAgeOfProperty() {
       return ageOfProperty;
   }
   public void setAgeOfProperty(long ageOfProperty) {
       this.ageOfProperty = ageOfProperty;
   }
   protected long price;
   protected long ageOfProperty;
}

class Land extends Property {
  
}

class Commercial extends Property {
   protected String electricityAvailability, waterAvailability;

   public String getElectricityAvailability() {
       return electricityAvailability;
   }

   public void setElectricityAvailability(String electricityAvailability) {
       this.electricityAvailability = electricityAvailability;
   }

   public String getWaterAvailability() {
       return waterAvailability;
   }

   public void setWaterAvailability(String waterAvailability) {
       this.waterAvailability = waterAvailability;
   }
  
}

class Farm extends Commercial {
   protected boolean rainWaterHarvesting;
   protected ArrayList suitableForCrops;
   public boolean isRainWaterHarvesting() {
       return rainWaterHarvesting;
   }
   public void setRainWaterHarvesting(boolean rainWaterHarvesting) {
       this.rainWaterHarvesting = rainWaterHarvesting;
   }
   public ArrayList getSuitableForCrops() {
       return suitableForCrops;
   }
   public void setSuitableForCrops(ArrayList suitableForCrops) {
       this.suitableForCrops = suitableForCrops;
   }
}

class NonFarm extends Commercial {
   protected boolean currentlyLeasedOut;
   public boolean isCurrentlyLeasedOut() {
       return currentlyLeasedOut;
   }
   public void setCurrentlyLeasedOut(boolean currentlyLeasedOut) {
       this.currentlyLeasedOut = currentlyLeasedOut;
   }
   public String getSuitableFor() {
       return suitableFor;
   }
   public void setSuitableFor(String suitableFor) {
       this.suitableFor = suitableFor;
   }
   protected String suitableFor;
}

class Residential extends Property {
   protected String furnishing, possesion, condition;

   public String getFurnishing() {
       return furnishing;
   }

   public void setFurnishing(String furnishing) {
       this.furnishing = furnishing;
   }

   public String getPossesion() {
       return possesion;
   }

   public void setPossesion(String possesion) {
       this.possesion = possesion;
   }

   public String getCondition() {
       return condition;
   }

   public void setCondition(String condition) {
       this.condition = condition;
   }
}

class Single extends Residential {
   protected int numBedrooms, numBathrooms;
   protected boolean hall, kitchen, petsAllowed;
   public int getNumBedrooms() {
       return numBedrooms;
   }
   public void setNumBedrooms(int numBedrooms) {
       this.numBedrooms = numBedrooms;
   }
   public int getNumBathrooms() {
       return numBathrooms;
   }
   public void setNumBathrooms(int numBathrooms) {
       this.numBathrooms = numBathrooms;
   }
   public boolean isHall() {
       return hall;
   }
   public void setHall(boolean hall) {
       this.hall = hall;
   }
   public boolean isKitchen() {
       return kitchen;
   }
   public void setKitchen(boolean kitchen) {
       this.kitchen = kitchen;
   }
   public boolean isPetsAllowed() {
       return petsAllowed;
   }
   public void setPetsAllowed(boolean petsAllowed) {
       this.petsAllowed = petsAllowed;
   }
}

class MultiFamily extends Residential {
   protected Image FloorPlan;
   protected int numberOfFlats;
   public int getNumberOfFlats() {
       return numberOfFlats;
   }
   public void setNumberOfFlats(int numberOfFlats) {
       this.numberOfFlats = numberOfFlats;
   }
}


Related Solutions

Design and build objects to be used by a real estate company for listing the properties for sale.
Design and build objects to be used by a real estate company for listing the properties for sale. A base object of a property is necessary. Decide what common about all properties and include these in the property object. Different type of properties are land, commercial and residential. A residential property can be single family and multi family. A commercial can be a commercial can be either a farm or non-farm.Look at real estate websites and decide what to include...
Sales Manager has an excel workbook listing properties for sale. If a property is sold, Select...
Sales Manager has an excel workbook listing properties for sale. If a property is sold, Select National Properties Group will finance the property loan for 30 years as 7.5% interest. If the monthly payment of a property is greater than $3000,000 the company will give the buyer a 1% discount on the selling price. Assignment: Calculated the column using the PMT Function to calculate the monthly payment for each of the properties. Then insert a calculated column using the IF...
Draw a class diagram for a real estate firm that lists property for sale. The following...
Draw a class diagram for a real estate firm that lists property for sale. The following describes the organization: The firm has a number of sales offices in several states; location is an attribute of sales office. Each sales office is assigned one or more employees. Attributes of employee include employeeID and employeeName. An employee must be assigned to only one sales office. For each sales office, there is always one employee assigned to manage that office. An employee may...
Betty is a real estate dealer and has numerous properties for sale, many of which she...
Betty is a real estate dealer and has numerous properties for sale, many of which she owns. Her son is finishing his education and plans to go into the consulting business. Betty has committed at least $25,000 to help him out until the business becomes self-sufficient. Betty plans to dispose of one of the properties but wants to know if there is any way the gain on the property can be taxed at capital gains rates rather than as ordinary...
Gulf Real Estate Properties, Inc., is a real estate firm in southwest Florida. The company monitors...
Gulf Real Estate Properties, Inc., is a real estate firm in southwest Florida. The company monitors condominium sales by collecting data on location, list price, sale price, and the number of days it takes to sell each unit. Each condo is classified as Gulf View if it is located directly on the Gulf of Mexico or No Gulf View if it is located on the bay or a golf course. The data set contains sales data for 40 Gulf View...
Discuss your understanding of determining value for a real estate property using the Sale Comparison Approach,...
Discuss your understanding of determining value for a real estate property using the Sale Comparison Approach, the Cost Approach and the Income Approach from both the residential (personal home) perspective and the commercial investment property perspective.
On May 1, Corporate Properties, Inc., a commercial property owner, asks Erik Woodruff, a real estate...
On May 1, Corporate Properties, Inc., a commercial property owner, asks Erik Woodruff, a real estate agent, to help market and sell Corporate Properties’ office building. Under the terms of Corporate Properties’ offer, if a buyer makes a serious offer to buy the building within sixty days, Corporate Properties must pay Erik’s commission. Erik puts signs on the building, ads in real estate pamphlets and a locally focused Web site, features the property in a “walking” tour online, and shows...
A real estate investor buys two properties. Monthly net income from the first property (an apartment...
A real estate investor buys two properties. Monthly net income from the first property (an apartment building) is $1,000 times the number of apartments that are rented out, minus $1,800 in property taxes and maintenance expenses. The number of apartments that are rented out is a random variable, X, with mean 20 and standard deviation 3. Monthly net income from the second property (a parking lot) is ninety percent of revenue (the management company takes the other ten percent), minus...
A property management company manages individual properties they will build to rent, and charges them a...
A property management company manages individual properties they will build to rent, and charges them a management fee as the percentages of the monthly rental amount. The properties cannot overlap each other, and each property must be within the limits of the management company’s plot. Write an application that lets the user create a management company and add the properties managed by the company to its list. Assume the maximum number of properties handled by the company is 5 Project...
A property management company manages individual properties they will build to rent, and charges them a...
A property management company manages individual properties they will build to rent, and charges them a management fee as the percentages of the monthly rental amount. The properties cannot overlap each other, and each property must be within the limits of the management company’s plot. Write an application that lets the user create a management company and add the properties managed by the company to its list. Assume the maximum number of properties handled by the company is 5 Concepts...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT