"refonte debut annee"
This commit is contained in:
50
2019-2020/src/openClosedPrinciples/core/Car.java
Normal file
50
2019-2020/src/openClosedPrinciples/core/Car.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package openClosedPrinciples.core;
|
||||
|
||||
/**
|
||||
* @author Mireille Blay-Fornarino
|
||||
*
|
||||
*/
|
||||
|
||||
public class Car {
|
||||
private String numberPlate;
|
||||
private double dayPrice;
|
||||
|
||||
|
||||
/// Constructeurs
|
||||
|
||||
public Car(String numberPlate, double dayPrice) {
|
||||
super();
|
||||
this.numberPlate = numberPlate;
|
||||
this.dayPrice = dayPrice;
|
||||
}
|
||||
|
||||
|
||||
/// Accesseurs et mutateurs
|
||||
|
||||
public String getNumberPlate() {
|
||||
return numberPlate;
|
||||
}
|
||||
|
||||
public void setNumberPlate(String numberPlate) {
|
||||
this.numberPlate = numberPlate;
|
||||
}
|
||||
|
||||
public double getDayPrice() {
|
||||
return dayPrice;
|
||||
}
|
||||
|
||||
public void setDayPrice(double dayPrice) {
|
||||
this.dayPrice = dayPrice;
|
||||
}
|
||||
|
||||
|
||||
/// Méthodes
|
||||
|
||||
// Afficher
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Car [numberPlate=" + numberPlate + // ", rentals=" + rentals +
|
||||
", dayPrice=" + super.toString() + "]";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user