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

17 lines
351 B
C#
Raw Normal View History

2023-04-09 18:20:58 +00:00
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();