Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConAuto
- {
- class KlasseAuto
- {
- public double DblTankfuellung { get; set; }
- public int IntKmStand { get; set; }
- public string StrAutomarke { get; private set; }
- public string StrFarbe { get; set; }
- public double DblReifendruck { get; set; }
- public KlasseAuto() // Standartkonstruktor
- {
- }
- public KlasseAuto(string marke) //Konstuktor || Automarke übergeben
- {
- this.StrAutomarke = marke;
- }
- public void StreckeFahren(int strecke) //Methode || Strecke fahren
- {
- this.IntKmStand = this.IntKmStand + strecke;
- }
- public void Tanken(double tanken) // Methode || Tanken
- {
- this.DblTankfuellung = this.DblTankfuellung + tanken;
- }
- public void Lackieren(string Farbe)
- {
- this.StrFarbe = Farbe;
- }
- public void ReifenAufpumpen(double druck)
- {
- this.DblReifendruck = this.DblReifendruck + druck;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement