Untitled
unknown
plain_text
9 months ago
1.2 kB
2
Indexable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp8
{
internal class Flight
{
private int id;
private int origin;
private int destination;
private string Fclass;
private int miles;
public Flight (int id, int origin, int destination)
{
this.id = id;
this.origin = origin;
this.destination = destination;
}
public int GetId()
{
return id;
}
public int GetOrigin()
{
return origin;
}
public int GetDestination()
{
return destination;
}
public string GetFclass()
{
return Fclass;
}
public int GetMiles()
{
return miles;
}
public bool IsSame (Flight other)
{
if (other.origin == origin && other.destination == destination && other.Fclass == Fclass)
{
return true;
}
return false;
}
}
}
Editor is loading...
Leave a Comment