public static void Main(string[] args) { Console.WriteLine("----Task 1----"); Digit a = new Digit(); a.Value = 10; Digit b = new Digit(); b.Value = 20; Console.WriteLine(Program.Calc(a, b)); Console.WriteLine("----Task 2----"); StartButton startbutton1 = new StartButton(); Car car1 = new Car(startbutton1); Console.WriteLine(car1.Start()); Console.ReadLine(); }
public Car(StartButton startButton2) { this.startButton1 = startButton2; }