//a function to output material data in a good format to the console or a text file public static void printMaterialData(SandShip.Classes.warehouse warehouse, int Id) { var material = warehouse.getMaterialbyId(Id); //format the data and output Console.WriteLine("Name= {0} ,Description={1}", material.getName(), material.getDescription()); }
static void Main(string[] args) { //Do some testing var warehouse = new SandShip.Classes.warehouse(); HelperFnc.helper.printWarehouseData(warehouse); var newmat = new SandShip.Classes.Material("test", "test", 10); warehouse.addMaterial(newmat); HelperFnc.helper.printMaterialData(warehouse, 0); }
{ // a function to output warehouse data public static void printWarehouseData(SandShip.Classes.warehouse warehouse) { //as warehouse does not contain lets just print the amounth of materials it containts Console.WriteLine(warehouse.getMaterialCount()); }