public static void Main()
Car carA = new Car("Honda", "Crv", "RegistrationA", "2014", 21000);
public string _registration;
public Car(string make, string type, string registration, string year, double currentValue){
_registration = registration;
CurrentValue = currentValue;}
public string Year{get { return _year; }set { this._year = value; }}
public double CurrentValue { get; set; }
public string Make { get { return _make; } }
public string Type { get { return _type; } }
public string GetRegistration(){return _registration;}
public void SetRegistration(string registration){_registration = registration;}
public override string ToString(){
"Car Registration:"+_registration+"\n"+
"Current Value:"+CurrentValue+"\n";}
public string Stop(){return "Car has stopped.";}}}
public class Toyota : Car{
public Toyota(string type, string registration, string year, double currentValue) : base("Toyota", type, registration, year, currentValue){}
public string OnlyToyotaCanDo(){
return "This is an action or method which ONLY " + this.Make + " can do.";}
public override string Stop(){
return this.Make + " Car is Stop.";}}}
public Mazda(string type, string registration, string year, double currentValue) : base("Mazda", type, registration, year, currentValue){}
public string OnlyMazdaCanDo(){
return "This is an action or method which ONLY " + this.Make + " can do.";}}}