elektroniakieszkozok/elektronikaieszkozok/Eszkoz.cs
Nándor Árgyelán 97864aa841 dadw
2024-09-26 11:29:40 +02:00

41 lines
894 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace elektronikaieszkozok
{
internal abstract class Eszkoz
{
public string name { get; set; }
public string marka { get; set; }
public string allapot { get; set; }
public Eszkoz(string name, string marka, string allapot)
{
this.name = name;
this.marka = marka;
this.allapot = allapot;
}
public void bekapcsolas()
{
allapot = $"{name} bekapcsolva";
}
public void kikapcsolva()
{
allapot = $"{name} kikapcsolva";
}
public override string ToString()
{
return $"{name}, {marka}, {allapot}";
}
public abstract double energiafogyasztas(double uzemora);
}
}