A car model class under package:package 3 with the following attributes
class Car {
private String licenceNumber;
private String model;
private double currentMileage;
private int engineSize;
public Car() {
}
/***
* Constructor
*
* @param licenceNumber
* @param model
* @param currentMileage
* @param engineSize
*/
public Car(String licenceNumber, String model, double currentMileage, int engineSize) {
this.licenceNumber = licenceNumber;
this.model = model;
this.currentMileage = currentMileage;
this.engineSize = engineSize;
}
/**
* @return the licenceNumber
*/
public String getLicenceNumber() {
return licenceNumber;
}
/**
* @param licenceNumber the licenceNumber to set
*/
public void setLicenceNumber(String licenceNumber) {
this.licenceNumber = licenceNumber;
}
/**
* @return the model
*/
public String getModel() {
return model;
}
/**
* @param model the model to set
*/
public void setModel(String model) {
this.model = model;
}
/**
* @return the currentMileage
*/
public double getCurrentMileage() {
return currentMileage;
}
/**
* @param currentMileage the currentMileage to set
*/
public void setCurrentMileage(double currentMileage) {
this.currentMileage = currentMileage;
}
/**
* @return the engineSize
*/
public int getEngineSize() {
return engineSize;
}
/**
* @param engineSize the engineSize to set
*/
public void setEngineSize(int engineSize) {
this.engineSize = engineSize;
}
}
Comments
Leave a comment