public Taxi(int seats, int time, int bank)
public int Get_passengers()
public int start(int passengers)
this.passengers = passengers;
bank = bank + (5*this.passengers);
bank = bank + (10*this.passengers);
Console.WriteLine("number of seats: " + seats);
Console.WriteLine("its day time");
Console.WriteLine("its night time");
Console.WriteLine("Money :" + bank);
public static void Main()
Console.WriteLine("build number of seats to your taxi (taxi a)");
int Taxi_a_seats = int.Parse(Console.ReadLine());
Console.WriteLine("its day or night? (if day type :'1', if night type :'2' ");
int Taxi_a_time = int.Parse(Console.ReadLine());
Console.WriteLine("How much money is there in the bank?");
int Taxi_a_bank = int.Parse(Console.ReadLine());
Taxi a = new Taxi(Taxi_a_seats,Taxi_a_time,Taxi_a_bank);
Console.WriteLine("type a number of passengers who want to travel :");
pass = int.Parse(Console.ReadLine());
if (a.Get_seats()>= pass)
Console.WriteLine(pass +" passengers enter to taxi a successfully!");
else if (b.Get_seats()>= pass)
Console.WriteLine(pass +" passengers enter to taxi b successfully!");
Console.WriteLine("there is no space for " + pass + " passengers.");
Console.WriteLine("the trip was over");
Console.WriteLine("now the program will change the time");
Console.WriteLine("taxi a change the time to night");
Console.WriteLine("taxi a change the time to day");
Console.WriteLine("taxi b change the time to night");
Console.WriteLine("taxi b change the time to day");
Console.WriteLine("status of taxi a: ");
Console.WriteLine("status of taxi b: ");
Console.WriteLine("new trip-");
Console.WriteLine("type a number of passengers who want to travel :");
pass = int.Parse(Console.ReadLine());
if (a.Get_seats()>= pass)
Console.WriteLine(pass +" passengers enter to taxi a successfully!");
else if (b.Get_seats()>= pass)
Console.WriteLine(pass +" passengers enter to taxi b successfully!");
Console.WriteLine("there is no space for " + pass + " passengers.");
Console.WriteLine("status of taxi a: ");
Console.WriteLine("status of taxi b: ");