using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
abstract public class MotorVehicle
{
public string make;
public string model;
public MotorVehicle(string make, string model)
{
this.make = make;
this.model = model;
}
abstract public void Accelerate();
}
public class Car : MotorVehicle
{
public Car(string make, string model)
: base(make, model)
{
//do nothing
}
public override void Accelerate()
{
Console.WriteLine("In Car Accelerate() method");
Console.WriteLine(model + " accelerating");
}
}
static void Main(string[] args)
{
Console.WriteLine("Creating a Car object");
Car myCar = new Car("Toyata","MR2");
Console.WriteLine("Calling myCar.Accelerate()");
myCar.Accelerate();
string i = System.Console.ReadLine();
}
}
}