szimulacio/SzimulacioOOP/Auto.cs

27 lines
696 B
C#
Raw Permalink Normal View History

2024-09-24 11:00:05 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SzimulacioOOP
{
internal class Auto
{
public String Nev { get; set; }
public Sofor Vezeto { get; set; }
public double Fogyasztas { get; set; }
public double Uzemanyag { get; set; }
public double TankMeret { get; private set; }
public int Ut { get; set; }
public Auto(String Nev) {
this.Nev = Nev;
TankMeret = 50;
2024-10-01 11:00:31 +00:00
Random rd = new Random();
Fogyasztas = rd.NextDouble() *7.5 + 2.5;
Uzemanyag = rd.NextDouble() * 50;
2024-09-24 11:00:05 +00:00
}
}
}