//CONSTRUCTOR THAT ADDS A NEW UTILITY DROID public void addDroid(string ModelType, string MaterialType, string PaintColor, bool HasToolbox, bool ComputerConnected, bool HasArm) { Utility newDroid = new Utility(ModelType, MaterialType, PaintColor, HasToolbox, ComputerConnected, HasArm); droidCollection.Add(newDroid); }
public void AddUtility(string Model, string Material, string Color, bool ToolBox, bool ComputerConnection, bool Arm) { droidArray[counter] = new Utility(Material, Model, Color, ToolBox, ComputerConnection, Arm); counter++; }
//*************************END ADD PROTOCOL METHOD************************// //*************************ADD UTILITY METHOD*****************************// public void AddUtility() { DroidOptions("Utility"); //ADD NEW UTILITY TO DROID COLLECTION AND DISPLAY CONFIRMATION Console.WriteLine(); Droid newUtility = new Utility(materailSelectionString, "Utility", colorSelectionString, toolBox, computerConnection, arm); droidCollection.AddNewDroid(newUtility); newUtility.CalculateBaseCost(); newUtility.CalculateTotalCost(); totalCost += newUtility.totalCost; Console.WriteLine(newUtility + " has been added to droid collection.\n"); }
//Add new Utility Droid to the Droid Collection and increase the length variable. public void NewDroid(String model, String material, String color, Boolean toolbox, Boolean computerConnection, Boolean arm) { droids[droidsLength] = new Utility(model, material, color, toolbox, computerConnection, arm); droidsLength++; }