This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_2023_Stanislav_Mykhailenko/Lesson_4/Task_4/Program.cs
Stanislav Mykhailenko 3f6406ab69
Add Lesson 4 Task 4
2023-04-09 21:20:58 +03:00

16 lines
351 B
C#

using LiskovSubstitution.Vehicles;
// A plane has an engine, and is able to fly
Plane plane = new Plane();
plane.Fly();
plane.StartEngine();
// A car cannot fly, CS1061 if attempted
Car car = new Car();
// car.Fly();
car.StartEngine();
// Same for motorcycle
Motorcycle motorcycle = new Motorcycle();
// motorcycle.Fly();
motorcycle.StartEngine();