public abstract class ComputerObject {
private int usefulLife = 1;
private String stockCode = "XXXXXXXX";
private int purchasingCost = 10000;
private String staffNumber = "XXXXXXXX";
private String serialNumber = "ABCDEFG";
private String cpuType = "Multicore Parallel Threading";
private int ramAmount = 12;
protected ComputerObject() { }
protected ComputerObject(int usefulLife, String stockCode,int purchasingCost,String staffNumber,String serialNumber ,String cpuType, int ramAmount) {
setUsfulLife(usefulLife);
setPurchasingCost(purchasingCost);
setRamAmount(ramAmount);
setStockCode(stockCode);
setStaffNumber(staffNumber);
setCpuType(cpuType);
setSerialNumber(serialNumber);
}
public int getUsfulLife(){
return usefulLife;
}
public void setUsfulLife(int usefulLife){
this.usefulLife = usefulLife;
}
public int getPurchasingCost(){
return purchasingCost;
}
public void setPurchasingCost(int purchasingCost){
this.purchasingCost = purchasingCost;
}
public int getRamAmount(){
return ramAmount;
}
public void setRamAmount(int ramAmount){
this.ramAmount = ramAmount;
}
public String getStockCode(){
return stockCode;
}
public void setStockCode(String stockCode){
this.stockCode = stockCode;
}
public String getStaffNumber(){
return staffNumber;
}
public void setStaffNumber(String staffNumber){
this.staffNumber = staffNumber ;
}
public String getCpuType(){
return cpuType;
}
public void setCpuType(String cpuType){
this.cpuType = cpuType ;
}
public String getSerialNumber(){
return serialNumber;
}
public void setSerialNumber(String serialNumber){
this.serialNumber = serialNumber ;
}
public abstract double AnnualDepreciation();
}