using System.Collections.Generic;
public static void Main (string[] args)
Company rainforest = new Company ("Rainforest, LLC");
Console.WriteLine("----------------------");
Console.WriteLine(rainforest.name);
Console.WriteLine("----------------------");
WarehousingGroup austin = new WarehousingGroup("Austin Warehousing Group", 2);
WarehousingGroup houston = new WarehousingGroup("Houston Warehousing Group", 3);
WarehousingGroup dallas = new WarehousingGroup("Dallas Warehousing Group", 1);
WarehousingGroup sanantonio = new WarehousingGroup("San Antonio Warehousing Group", 3);
rainforest.warehousingGroups.Add(austin);
rainforest.warehousingGroups.Add(houston);
rainforest.warehousingGroups.Add(dallas);
rainforest.warehousingGroups.Add(sanantonio);
Warehouse northAustin = new Warehouse("\tNorth Austin", 2);
Warehouse southAustin = new Warehouse("\tSouth Austin", 2);
Warehouse northHouston = new Warehouse("\tNorth Houston", 2);
Warehouse southHouston = new Warehouse("\tSouth Houston", 2);
Warehouse centralHouston = new Warehouse("\tCentral Houston", 2);
Warehouse centralDallas = new Warehouse("\tCentral Dallas", 2);
Warehouse northSanantonio = new Warehouse("\tNorth San Antonio", 2);
Warehouse southSanantonio = new Warehouse("\tSouth San Antonio", 2);
Warehouse centralSanantonio = new Warehouse("\tCentral San Antonio", 2);
austin.warehouses.Add(northAustin);
austin.warehouses.Add(southAustin);
houston.warehouses.Add(northHouston);
houston.warehouses.Add(southHouston);
houston.warehouses.Add(centralHouston);
dallas.warehouses.Add(centralDallas);
sanantonio.warehouses.Add(northSanantonio);
sanantonio.warehouses.Add(southSanantonio);
sanantonio.warehouses.Add(centralSanantonio);
Container nAu = new Container("\t\tContainer-01", 2);
northAustin.containers.Add(nAu);
Container sAu = new Container("\t\tContainer-02", 2);
southAustin.containers.Add(sAu);
Container nHou = new Container("\t\tContainer-01", 3);
northHouston.containers.Add(nHou);
Container sHou = new Container("\t\tContainer-02", 3);
southHouston.containers.Add(sHou);
Container cenHou = new Container("\t\tContainer-03", 3);
centralHouston.containers.Add(cenHou);
Container cenDal = new Container("\t\tContainer-01", 1);
centralDallas.containers.Add(cenDal);
Container nSA = new Container("\t\tContainer-01", 3);
northSanantonio.containers.Add(nSA);
Container sSA = new Container("\t\tContainer-02", 3);
southSanantonio.containers.Add(sSA);
Container cenSA = new Container("\t\tContainer-03", 3);
centralSanantonio.containers.Add(cenSA);
Item milk = new Item("\t\t\tDairy:\n" + "\t\t\tmilk", 3.99);
Item paper = new Item("\t\t\tPaper Goods:\n" + "\t\t\tpaper towels", 3.99);
Item coffee = new Item("\t\t\tBeverages:\n" + "\t\t\tcoffee", 8.99);
Item tea = new Item("\t\t\ttea", 4.99);
Item vegetables = new Item("\t\t\tCanned Goods:\n" + "\t\t\tvegetables", 0.99);
cenHou.items.Add(vegetables);
cenSA.items.Add(vegetables);
cenDal.items.Add(vegetables);
Item sauce = new Item("\t\t\tspagetti sauce", 0.69);
rainforest.GenerateManifest();
public List<WarehousingGroup> warehousingGroups;
public Company (string name)
this.warehousingGroups = new List<WarehousingGroup> ();
public string WarehousingGroup
public void AddWarehousingGroup (WarehousingGroup warehousingGroup, int location)
warehousingGroups[location] = warehousingGroup;
public void GenerateManifest()
foreach(WarehousingGroup warehousingGroups in this.warehousingGroups)
Console.WriteLine(String.Format("\n{0}:", warehousingGroups.location));
foreach(Warehouse warehouses in warehousingGroups.warehouses)
Console.WriteLine(String.Format("{0}:", warehouses.location));
foreach(Container containers in warehouses.containers)
Console.WriteLine(String.Format("{0:}", containers.id));
foreach(Item item in containers.items)
Console.WriteLine(String.Format("{0}, {1}", item.name, item.price));
public List<Warehouse> warehouses;
public WarehousingGroup (string location, int size)
this.location = location;
this.warehouses = new List<Warehouse>();
public List<Warehouse> Warehouses
public void AddWarehouse (Warehouse warehouse, int location)
warehouses[location] = warehouse;
public List<Container> containers;
public Warehouse (string location, int size)
this.location = location;
this.containers = new List<Container>();
public List<Container> Containers
public Container (string id, int size)
this.items = new List<Item> ();
public Item (string name, double price)