From 127695189ac8c6f521f04392d55b2c1706d2263a Mon Sep 17 00:00:00 2001 From: Leon <3010261@stud.hs-mannheim.de> Date: Tue, 1 Oct 2024 18:47:35 +0200 Subject: [PATCH] =?UTF-8?q?Anpassung=20der=20Parkhaus=20Klasse=20an=20Aufg?= =?UTF-8?q?abe=20durch=20l=C3=B6schung=20unn=C3=B6tiger=20Attribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Qualifier Parkhaus/src/Parkhaus.java | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Qualifier Parkhaus/src/Parkhaus.java b/Qualifier Parkhaus/src/Parkhaus.java index 022271e..b0746ed 100644 --- a/Qualifier Parkhaus/src/Parkhaus.java +++ b/Qualifier Parkhaus/src/Parkhaus.java @@ -1,25 +1,20 @@ import java.util.Date; - 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){ - this.freieParkplatz = freieParkplatz; - this.preis = preis; - this.opening = opening; - this.closing = closing; + private double preis; + + public Parkhaus(double preis){ + this.preis = preis;} + + public double getPreis() {return preis;} + + public void setPreis(double preis) { + this.preis = preis; } - public int getFreieParkplatz() {return freieParkplatz;} - public double getPreis() {return preis;} - public Date getOpening() {return opening;} - public Date getClosing() {return closing;} + public double berechneParkDauer (Auto auto){ - - public double parkKosten = ((Auto.getEinfahrtZeit() - Auto.getBezahlZeit())*preis); + }