Advertisement
Danny_Berova

10. - Engine

Feb 14th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. public class Engine
  2. {
  3.     private string model;
  4.     private double power;
  5.     private string displacement;
  6.     private string efficiency;
  7.  
  8.     public Engine(string model, double power)
  9.     {
  10.         this.Model = model;
  11.         this.Power = power;
  12.         this.Displacement = "n/a";
  13.         this.Efficiency = "n/a";
  14.     }
  15.  
  16.     public string Model
  17.     {
  18.         get => this.model;
  19.         set => this.model = value;
  20.     }
  21.  
  22.     public double Power
  23.     {
  24.         get => this.power;
  25.         set => this.power = value;
  26.     }
  27.  
  28.     public string Displacement
  29.     {
  30.         get => this.displacement;
  31.         set => this.displacement = value;
  32.     }
  33.  
  34.     public string Efficiency
  35.     {
  36.         get => this.efficiency;
  37.         set => this.efficiency = value;
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement