[text] jbroker

Viewer

  1. public class Property {
  2.  
  3.         private String propertyId;
  4.         private String propertyType;
  5.         private double propertyValue;
  6.         private String propertyStatus;
  7.         public Property(String propertyId, String propertyType, double propertyValue) {
  8.                 super();
  9.                 this.propertyId = propertyId;
  10.                 this.propertyType = propertyType;
  11.                 this.propertyValue = propertyValue;
  12.                 this.propertyStatus = "available";
  13.  
  14.         }
  15.         public String getPropertyId() {
  16.                 return propertyId;
  17.         }
  18.         public void setPropertyId(String propertyId) {
  19.                 this.propertyId = propertyId;
  20.         }
  21.         public String getPropertyType() {
  22.                 return propertyType;
  23.         }
  24.         public void setPropertyType(String propertyType) {
  25.                 this.propertyType = propertyType;
  26.         }
  27.         public double getPropertyValue() {
  28.                 return propertyValue;
  29.         }
  30.         public void setPropertyValue(double propertyValue) {
  31.                 this.propertyValue = propertyValue;
  32.         }
  33.         public String getPropertyStatus() {
  34.                 return propertyStatus;
  35.         }
  36.         public void setPropertyStatus(String propertyStatus) {
  37.                 this.propertyStatus = propertyStatus;
  38.         }
  39.         
  40.         public double getOfferPrice(){
  41.                 double offerValue = 0;
  42.                 if(propertyValue>30000 && propertyValue<50000){
  43.                         
  44.                         offerValue = propertyValue+(propertyValue*20)/100;
  45.                 }else if(propertyValue>50001 && propertyValue<100000){
  46.                         offerValue = propertyValue+(propertyValue*40)/100;
  47.                 }else if(propertyValue>100000){
  48.                         offerValue = propertyValue+(propertyValue*50)/100;
  49.                 }else{
  50.                         offerValue = propertyValue+(propertyValue*10)/100;
  51.                 }
  52.                         
  53.                 return offerValue;
  54.         }
  55.         
  56. }

Editor

You can edit this paste and save as new: