37 lines
910 B
C#
37 lines
910 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Auto
|
|
{
|
|
public class Auto
|
|
{
|
|
|
|
|
|
public string Marka { get; set; }
|
|
public string Tipus { get; set; }
|
|
public int GyartasiEv { get; set; }
|
|
public int FutottKm { get; set; }
|
|
public string Rendszam { get; set; }
|
|
|
|
//Készítsen paraméteres konstruktort a propertyk beállításához
|
|
public Auto(string marka, string tipus, int gyartasiEv, int futottKm, string rendszam)
|
|
{
|
|
Marka = marka;
|
|
Tipus = tipus;
|
|
GyartasiEv = gyartasiEv;
|
|
FutottKm = futottKm;
|
|
Rendszam = rendszam;
|
|
}
|
|
|
|
//Készítsen metódust, amely visszaadja az Autó korát!
|
|
public int AutoKor()
|
|
{
|
|
return DateTime.Now.Year - GyartasiEv;
|
|
}
|
|
|
|
}
|
|
}
|