Anpassung der Parkhaus Klasse an Aufgabe durch löschung unnötiger Attribute
parent
e722310a11
commit
127695189a
|
@ -1,25 +1,20 @@
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class Parkhaus {
|
public class Parkhaus {
|
||||||
private int freieParkplatz;
|
|
||||||
private double preis;
|
|
||||||
private Date opening;
|
|
||||||
private Date closing;
|
|
||||||
|
|
||||||
public Parkhaus(int freieParkplatz,double preis, Date opening, Date closing){
|
private double preis;
|
||||||
this.freieParkplatz = freieParkplatz;
|
|
||||||
this.preis = preis;
|
public Parkhaus(double preis){
|
||||||
this.opening = opening;
|
this.preis = preis;}
|
||||||
this.closing = closing;
|
|
||||||
|
public double getPreis() {return preis;}
|
||||||
|
|
||||||
|
public void setPreis(double preis) {
|
||||||
|
this.preis = preis;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFreieParkplatz() {return freieParkplatz;}
|
public double berechneParkDauer (Auto auto){
|
||||||
public double getPreis() {return preis;}
|
|
||||||
public Date getOpening() {return opening;}
|
|
||||||
public Date getClosing() {return closing;}
|
|
||||||
|
|
||||||
|
}
|
||||||
public double parkKosten = ((Auto.getEinfahrtZeit() - Auto.getBezahlZeit())*preis);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue