40 lines
893 B
C#
40 lines
893 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);
|
|
}
|
|
}
|