using System.Collections.Generic;
using System.Threading.Tasks;
static void Main(string[] args)
vehicle cookie= new vehicle("toyota",1998, "cookie");
car wahoo = new car("front wheel", true, "honda", 2023, "shagmobile");
Console.WriteLine(cookie.display());
Console.WriteLine(wahoo.display());
ArrayList vs=new ArrayList();
vs.Add(cookie); vs.Add(wahoo);
vs.Add(new car("fw", false, "audi", 2013, "big sexy"));
for(int i=0; i<vs.Count; i++)
Console.WriteLine(((vehicle)vs[i]).START());
internal class car : vehicle
public car(string drive, bool collapsable, string make, int year, string name) : base(make, year, name)
this.collapsable = collapsable;
public override String display()
return base.display()+" with "+drive+" drive and "+(collapsable?"with":"without")+" collapsable seats";
public override String START()
return "VRRRMM VRM VRM VRMMMMMMMM VRM VRMMMM VRM VRMVMVRMVRVMRM VVVVVVVVVVVVVVVVVVRM";
public vehicle(string make, int year, string name)
public virtual String display()
return "\""+name+"\" "+ year + " " + make;
public virtual String START()
return "Vehicle is starting";