@@ -10,16 +10,10 @@ public Vehicle(string brand)
1010    } 
1111
1212    // Implemented method - provides functionality that all vehicles share 
13-     public  string  GetInfo ( ) 
14-     { 
15-         return  $ "This is a { _brand }  vehicle."; 
16-     } 
13+     public  string  GetInfo ( )  =>  $ "This is a { _brand }  vehicle."; 
1714
1815    // Another implemented method 
19-     public  virtual  void  StartEngine ( ) 
20-     { 
21-         Console . WriteLine ( $ "{ _brand }  engine is starting...") ; 
22-     } 
16+     public  virtual  void  StartEngine ( )  =>  Console . WriteLine ( $ "{ _brand }  engine is starting...") ; 
2317
2418    // Abstract method - must be implemented by derived classes 
2519    public  abstract  void  Move ( ) ; 
@@ -33,10 +27,7 @@ public class Car : Vehicle
3327    public  Car ( string  brand )  :  base ( brand )  {  } 
3428
3529    // Implementation of abstract method 
36-     public  override  void  Move ( ) 
37-     { 
38-         Console . WriteLine ( $ "{ _brand }  car is driving on the road.") ; 
39-     } 
30+     public  override  void  Move ( )  =>  Console . WriteLine ( $ "{ _brand }  car is driving on the road.") ; 
4031
4132    // Implementation of abstract property 
4233    public  override  int  MaxSpeed  =>  200 ; 
@@ -47,10 +38,7 @@ public class Boat : Vehicle
4738    public  Boat ( string  brand )  :  base ( brand )  {  } 
4839
4940    // Implementation of abstract method 
50-     public  override  void  Move ( ) 
51-     { 
52-         Console . WriteLine ( $ "{ _brand }  boat is sailing on the water.") ; 
53-     } 
41+     public  override  void  Move ( )  =>  Console . WriteLine ( $ "{ _brand }  boat is sailing on the water.") ; 
5442
5543    // Implementation of abstract property 
5644    public  override  int  MaxSpeed  =>  50 ; 
0 commit comments