예제 #1
0
    public void AddLincesPlate(LincensePlateInfo licensePlate)
    {
        bool lincesPlateAlreadyExists = licensePlate.Add(licensePlate);

        Console.BackgroundColor = ConsoleColor.DarkBlue;
        Console.ForegroundColor = ConsoleColor.Red;
        if (!lincesPlateAlreadyExists)
        {
            Console.WriteLine("the linces Plate: " + licensePlate + " already exist");
        }
        else
        {
            Console.WriteLine("Linces Plate was added into  the sytem");
        }
    }
예제 #2
0
        static void Main(string[] args)
        {
            DMV dmv = new DMV();

            LincensePlateInfo firstLicensePlate = new LincensePlateInfo();

            firstLicensePlate.LincensePlate = "YHG567";
            firstLicensePlate.State         = "TX";

            firstLicensePlate.LincensePlate = "IUE098";
            firstLicensePlate.State         = "TX";

            LincensePlateInfo secondLicensePlate = new LincensePlateInfo();

            dmv.AddLincesPlate(firstLicensePlate);
            dmv.AddLincesPlate(secondLicensePlate);
        }
예제 #3
0
 internal bool Add(LincensePlateInfo licensePlate)
 {
     throw new NotImplementedException();
 }
예제 #4
0
    public override bool Equals(object obj)
    {
        LincensePlateInfo comparerLincesPlate = obj as LincensePlateInfo;

        return(this.LincensePlate.Equals(comparerLincesPlate.LincensePlate));
    }