public static void Main(string[] args)
double[] arr = new double [10];
MotorCycle moto= new MotorCycle();
AutoMobile auto=new AutoMobile();
Customer[] cust = new Customer[3];
cust[0] = new Customer() { FirstName = "Joe", LastName = "Smith", orders = new Order[2] };
cust[0].orders[0] = new Order() { Price = 2000, Quantity = 1, veh = new Vehicle() { Wheels = 2, Description = "Bullet", HorsePower = 500 } }; arr[0] = moto.CargoCapacity(20, 23);
cust[0].orders[1] = new Order() { Price =30000 , Quantity = 2, veh = new Vehicle { Wheels=4, Description="Scorpio", HorsePower=800 } };arr[1] = auto.CargoCapacity(23,34,54);
cust[1] = new Customer() { FirstName = "Sally", LastName = "Jones", orders = new Order[2] };
cust[1].orders[0] = new Order() { Price = 1500, Quantity = 1, veh = new Vehicle { Wheels = 2, Description = "Pulser", HorsePower = 200 } }; arr[2] = moto.CargoCapacity(24,54);
cust[1].orders[1] = new Order() { Price = 45000, Quantity = 1, veh = new Vehicle {Wheels=4, Description="Venza", HorsePower=700 } }; arr[3] = auto.CargoCapacity(34,67,21);
cust[2] = new Customer() { FirstName = "Rick", LastName = "White", orders = new Order[2] };
cust[2].orders[0] = new Order() { Price = 2000, Quantity = 1, veh = new Vehicle { Wheels = 2, Description = "Yamaha", HorsePower = 200 } };arr[4] = moto.CargoCapacity(21,22);
cust[2].orders[1] = new Order() { Price = 2000, Quantity = 1, veh = new Vehicle { Wheels = 4, Description = "Edge", HorsePower = 700 } };arr[5] = auto.CargoCapacity(24, 21, 34);
for(int i=0; i<cust.Length;i++)
Console.WriteLine("--------------------------------------------------------------------------------");
Console.WriteLine("{0} {1} " ,cust[i].FirstName, cust[i].LastName );
Console.WriteLine("--------------------------------------------------------------------------------");
Console.WriteLine("Orders");
for(int j=0; j< cust[i].orders.Length ; j++)
Console.WriteLine("{0,5} {1,10:c} {2,15} {3,20} {4,25} ", cust[i].orders[j].Quantity, cust[i].orders[j].Price, cust[i].orders[j].veh.Wheels, cust[i].orders[j].veh.Description, cust[i].orders[j].veh.HorsePower);
Console.WriteLine("{0,23} {1} ","Cargo Capacity:", arr[j]);
Console.WriteLine("--------------------------------------------------------------------------------");
public Vehicle veh{get;set;}
public int Wheels { get; set; }
public string Description { get; set; }
public double HorsePower { get; set; }
public double CargoCapacity()
public double CargoCapacity(double l, double w, double h)
public double CargoCapacity(double r, double h)
double cc = (Math.PI * (r * r) * h) * 2;