Question: Create a class for Plane having functionalities (methods) startengine(), fly() and land(). When ever engine starts it should reset the attribute TTK (Total travel kilometer)
Create a class for Plane having functionalities (methods) startengine(), fly() and land(). When ever engine starts it should reset the attribute TTK (Total travel kilometer) to zero and attribute Fuel to 100. On fly() it should add 10 kilometers if the Fuel attribute is greater than zero and decrement Fuel by 20.On land() it should print total distance covered. Write the code providing all necessary details. And then show working object of Plane in main(). C# In OOP
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
