public Vehicle(string name){
public Vehicle(string name, int capacity){
this.capacity = capacity;
public virtual double Fare{
get{ return this.capacity * 100;}
public class Bus:Vehicle{
public Bus(string name): base(name, 40){
public override double Fare{
get{ return (this.capacity * 100) * 1.1;}
public static void Main() {
Vehicle bus = new Bus("School Volvo");
Console.WriteLine("The seating capacity of a bus is {0} passengers", bus.capacity);
Console.WriteLine("Total bus fare is: {0}", bus.Fare);
Vehicle v = new Vehicle("Standard Vehicle", 4);
Console.WriteLine("Total vehicle fare is: {0}", v.Fare);