diff --git a/README.md b/README.md index cbc05fde1f5fdc44d40e386708d2bdcb7971cd27..958af5a7355045f496c3c379f14eaaff16755fcd 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,8 @@ It may be benificial for you to create extra methods within the droid sub classe ## Outside Resources Used - +https://msdn.microsoft.com/en-us/library/ah19swz4.aspx +https://msdn.microsoft.com/en-us/library/aa288471%28v=vs.71%29.aspx +* Structs for ease of organization. ## Known Problems, Issues, And/Or Errors in the Program diff --git a/cis237assignment3/Droid.cs b/cis237assignment3/Droid.cs index c4b9feea5e2aa6d530c47e58256319a28335ed54..18d54d9739cca65c0f52f67dc5dcf33ef95feeea 100644 --- a/cis237assignment3/Droid.cs +++ b/cis237assignment3/Droid.cs @@ -1,4 +1,6 @@ -using System; +// Brandon Rodriguez + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -7,18 +9,19 @@ using System.Threading.Tasks; namespace cis237assignment3 { /// <summary> - /// Abstract class for Droids. + /// Abstract class for Droids. Handles "higher level" thinking/rules. /// Derives from IDroid interface. /// </summary> abstract class Droid : IDroid { #region Variables - public string materialString; - public string modelString; - public string colorString; - public decimal baseCostDecimal; - public decimal totalCostDecimal; + protected string materialString; + protected string modelString; + protected string colorString; + protected decimal baseCostDecimal; + protected decimal totalCostDecimal; + protected decimal costPerFeature; // Standard cost per most features. #endregion @@ -45,8 +48,6 @@ namespace cis237assignment3 Material = material; Model = model; Color = color; - - baseCostDecimal = 10m; } #endregion @@ -89,11 +90,29 @@ namespace cis237assignment3 - #region Methods + #region Protected Methods + + + + #endregion + + + + #region Public Methods public abstract void CalculateTotalCost(); - public virtual string DisplayToString() + /// <summary> + /// Shortened string for displaying of many droids, each in single line format. + /// </summary> + /// <returns>String of short Droid information.</returns> + public abstract string DisplayShortToString(); + + /// <summary> + /// Full string for displaying of single droid spanning multiple lines. + /// </summary> + /// <returns>String of full Droid information.</returns> + public virtual string DisplayFullToString() { return materialString + " " + modelString + " : " + colorString; } diff --git a/cis237assignment3/DroidCollection.cs b/cis237assignment3/DroidCollection.cs index d723924de840bdd8efec6142abdd030f44db957d..2a738d623e13f54a01192bddb869b2c03695813e 100644 --- a/cis237assignment3/DroidCollection.cs +++ b/cis237assignment3/DroidCollection.cs @@ -1,4 +1,6 @@ -using System; +// Brandon Rodriguez + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -10,7 +12,20 @@ namespace cis237assignment3 { #region Variables + // Variables for getting/saving user input. + private string userInput; + private string selectedMaterialString; + protected string selectedModelString; + private string selectedColorString; + private int selectedLanguageInt; + private bool ToolBoxBool; + private bool computerConnectionBool; + private bool armBool; + private bool trashCompactorBool; + private bool vacuumBool; + private bool fireExtinguisherBool; + private int selectedNumberOfShipsInt; #endregion @@ -18,7 +33,19 @@ namespace cis237assignment3 #region Constructor + /// <summary> + /// Base constructor. + /// </summary> + public DroidCollection() + { + + } + + public DroidCollection(int userSelection) + { + + } #endregion @@ -32,9 +59,207 @@ namespace cis237assignment3 - #region Methods + #region Private Methods + + private void TypeSelection() + { + UserInterface.DisplayTypeSelectionMenu(); + userInput = UserInterface.GetUserInput(); + + switch (userInput) + { + case "1": + PurchaseProtocol(); + break; + case "2": + PurchaseUtility(); + break; + case "3": + PurchaseJanitor(); + break; + case "4": + PurchaseAstromech(); + break; + case "esc": + break; + default: + break; + } + } + + private void PurchaseGeneric() + { + ModelSelection(); + MaterialSelection(); + ColorSelection(); + + } + + private void PurchaseProtocol() + { + PurchaseGeneric(); + LanguageSelection(); + + } + + private void PurchaseUtility() + { + PurchaseGeneric(); + ToolBoxSelection(); + CompConnectionSelection(); + ArmSelection(); + } + + private void PurchaseJanitor() + { + PurchaseUtility(); + + } + + private void PurchaseAstromech() + { + PurchaseUtility(); + + } + + #region Individual Feature Selections + + private void ModelSelection() + { + UserInterface.DisplayModelSelectionMenu(Droid_Generic.MODEL_1_STRING, Droid_Generic.MODEL_2_STRING); + userInput = UserInterface.GetUserInput(); + + switch (userInput) + { + case "1": + selectedModelString = Droid_Generic.MODEL_1_STRING; + break; + case "2": + selectedModelString = Droid_Generic.MODEL_2_STRING; + break; + case "3": + break; + case "4": + break; + case "esc": + break; + default: + break; + } + } + + private void MaterialSelection() + { + UserInterface.DisplayMaterialSelectionMenu(Droid_Generic.MATERIAL_1_STRING, Droid_Generic.MATERIAL_2_STRING, Droid_Generic.MATERIAL_3_STRING, Droid_Generic.MATERIAL_4_STRING, Droid_Generic.MATERIAL_5_STRING); + userInput = UserInterface.GetUserInput(); + + switch (userInput) + { + case "1": + selectedMaterialString = Droid_Generic.MATERIAL_1_STRING; + break; + case "2": + selectedMaterialString = Droid_Generic.MATERIAL_2_STRING; + break; + case "3": + selectedMaterialString = Droid_Generic.MATERIAL_3_STRING; + break; + case "4": + selectedMaterialString = Droid_Generic.MATERIAL_4_STRING; + break; + case "5": + selectedMaterialString = Droid_Generic.MATERIAL_5_STRING; + break; + case "esc": + break; + default: + break; + } + } + + private void ColorSelection() + { + UserInterface.DisplayColorSelectionMenu(Droid_Generic.COLOR_1_STRING, Droid_Generic.COLOR_2_STRING, Droid_Generic.COLOR_3_STRING, Droid_Generic.COLOR_4_STRING, Droid_Generic.COLOR_5_STRING); + userInput = UserInterface.GetUserInput(); + + switch (userInput) + { + case "1": + selectedColorString = Droid_Generic.COLOR_1_STRING; + break; + case "2": + selectedColorString = Droid_Generic.COLOR_2_STRING; + break; + case "3": + selectedColorString = Droid_Generic.COLOR_3_STRING; + break; + case "4": + selectedColorString = Droid_Generic.COLOR_4_STRING; + break; + case "5": + selectedColorString = Droid_Generic.COLOR_5_STRING; + break; + case "esc": + break; + default: + break; + } + } + + private void LanguageSelection() + { + + } + + private void ToolBoxSelection() + { + + } + + private void CompConnectionSelection() + { + + } + + private void ArmSelection() + { + + } + + private void TrashCompactorSelection() + { + + } + + private void VacuumSelection() + { + + } + + private void FireExtinguisherSelection() + { + + } + + private void NumberOfShipsSelection() + { + + } + + #endregion + + #endregion + + + + #region Public Methods + public void PurchaseDroid() + { + + + } #endregion diff --git a/cis237assignment3/Droid_Astromech.cs b/cis237assignment3/Droid_Astromech.cs index 8274f2f95ea43a580e339e567c200af0d5a3c70d..c0ad91059771052dbd369a0da3f5c2d8e7672daa 100644 --- a/cis237assignment3/Droid_Astromech.cs +++ b/cis237assignment3/Droid_Astromech.cs @@ -1,4 +1,6 @@ -using System; +// Brandon Rodriguez + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -78,9 +80,22 @@ namespace cis237assignment3 base.CalculateTotalCost(); } - public override string DisplayToString() + /// <summary> + /// Shortened string for displaying of many droids, each in single line format. + /// </summary> + /// <returns>String of short Droid information.</returns> + public override string DisplayShortToString() + { + return "Astromech Droid: " + totalCostDecimal.ToString().PadLeft(10); + } + + /// <summary> + /// Full string for displaying of single droid spanning multiple lines. + /// </summary> + /// <returns>String of full Droid information.</returns> + public override string DisplayFullToString() { - return base.DisplayToString() + Environment.NewLine + + return base.DisplayFullToString() + Environment.NewLine + "Fire Extinguisher: " + YesNoString(hasFireExtinguisherBool) + Environment.NewLine; } diff --git a/cis237assignment3/Droid_Generic.cs b/cis237assignment3/Droid_Generic.cs new file mode 100644 index 0000000000000000000000000000000000000000..246091cc4b2182fd225abdde7d39d4d3292d98f8 --- /dev/null +++ b/cis237assignment3/Droid_Generic.cs @@ -0,0 +1,290 @@ +// Brandon Rodriguez + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace cis237assignment3 +{ + /// <summary> + /// Not Sure if needed? + /// </summary> + class Droid_Generic : Droid + { + #region Variables + + // All the necessary variables for material selection. + private string selectedMaterialString; + private decimal selectedMaterialDecimal; + public static const string MATERIAL_1_STRING = "Tin"; + public static const string MATERIAL_2_STRING = "Steel"; + public static const string MATERIAL_3_STRING = "Titanium"; + public static const string MATERIAL_4_STRING = "Mythril"; + public static const string MATERIAL_5_STRING = "Unobtanium"; + private decimal material1Decimal; + private decimal material2Decimal; + private decimal material3Decimal; + private decimal material4Decimal; + private decimal material5Decimal; + + // All the necessary variables for model selection. + protected string selectedModelString; + protected decimal selectedModelDecimal; + public static const string MODEL_1_STRING = "TI-84"; + public static const string MODEL_2_STRING = "TI-84"; + private decimal model1Decimal; + private decimal model2Decimal; + + // All the necessary variables for color selection. + private string selectedColorString; + private decimal selectedColorDecimal; + public static const string COLOR_1_STRING = "White"; + public static const string COLOR_2_STRING = "Black"; + public static const string COLOR_3_STRING = "Blue"; + public static const string COLOR_4_STRING = "Red"; + public static const string COLOR_5_STRING = "Green"; + private decimal color1Decimal; + private decimal color2Decimal; + private decimal color3Decimal; + private decimal color4Decimal; + private decimal color5Decimal; + + // Random variables for pricing creation. + Random random = new Random(); + private int randomNumberInt; + private int clearanceInt; + + #endregion + + + + #region Constructor + + /// <summary> + /// Base constructor. + /// </summary> + public Droid_Generic() + { + + } + + /// <summary> + /// + /// </summary> + /// <param name="material"></param> + /// <param name="model"></param> + /// <param name="color"></param> + public Droid_Generic(string material, string model, string color) + : base(material, model, color) + { + + } + + #endregion + + + + #region Properties + + + + #endregion + + + + #region Private Methods + + + + /// <summary> + /// Sets a clearance int for the program. This is the permanent discount for all items on clearance. + /// </summary> + private void SetClearancePrice() + { + if (clearanceInt == null) + { + clearanceInt = random.Next(1, 10); + } + } + + /// <summary> + /// Sets pricings of each material type. + /// </summary> + private void MaterialPricing() + { + SetClearancePrice(); + + randomNumberInt = random.Next(5); + decimal baseMaterialCost = baseCostDecimal * 10; + + // Set price of material 1. + if (randomNumberInt == 0) + { + material1Decimal = ((baseMaterialCost - clearanceInt) / 2) + AddCents(); + } + else + { + material1Decimal = (baseMaterialCost / 2) + AddCents(); + } + + // Set price of material 2. + if (randomNumberInt == 1) + { + material2Decimal = (baseMaterialCost - clearanceInt) + AddCents(); + } + else + { + material2Decimal = baseMaterialCost + AddCents(); + } + + // Set price of material 3. + if (randomNumberInt == 2) + { + material3Decimal = (baseMaterialCost - clearanceInt) + AddCents(); + } + else + { + material3Decimal = baseMaterialCost + AddCents(); + } + + // Set price of material 4. + if (randomNumberInt == 3) + { + material4Decimal = (baseMaterialCost - clearanceInt) + AddCents(); + } + else + { + material4Decimal = baseMaterialCost + AddCents(); + } + + // Set price of material 5. + if (randomNumberInt == 4) + { + material5Decimal = (baseMaterialCost - clearanceInt) + AddCents(); + } + else + { + material5Decimal = baseMaterialCost + AddCents(); + } + } + + /// <summary> + /// Sets pricings of each model. + /// </summary> + private void ModelPricing() + { + randomNumberInt = random.Next(2); + decimal baseModelCost = baseCostDecimal * 5; + + // Sets price of model 1. + if (randomNumberInt == 0) + { + model1Decimal = (baseModelCost - clearanceInt) + AddCents(); + } + else + { + model1Decimal = baseModelCost + AddCents(); + } + + // Sets price of model 2. + if (randomNumberInt == 1) + { + model2Decimal = (baseModelCost - clearanceInt) + AddCents(); + } + else + { + model2Decimal = baseModelCost + AddCents(); + } + } + + /// <summary> + /// Sets pricings of each color. + /// </summary> + private void ColorPricing() + { + randomNumberInt = random.Next(5); + decimal baseColorCost = baseCostDecimal / 2; + + // Sets price of color 1. + if (randomNumberInt == 0) + { + color1Decimal = (baseColorCost - clearanceInt) + AddCents(); + } + else + { + color1Decimal = baseColorCost + AddCents(); + } + + // Sets price of color 2. + if (randomNumberInt == 1) + { + color2Decimal = (baseColorCost - clearanceInt) + AddCents(); + } + else + { + color2Decimal = baseColorCost + AddCents(); + } + + // Sets price of color 3. + if (randomNumberInt == 2) + { + color3Decimal = (baseColorCost - clearanceInt) + AddCents(); + } + else + { + color3Decimal = baseColorCost + AddCents(); + } + + // Sets price of color 4. + if (randomNumberInt == 3) + { + color4Decimal = (baseColorCost - clearanceInt) + AddCents(); + } + else + { + color4Decimal = baseColorCost + AddCents(); + } + + // Sets price of color 5. + if (randomNumberInt == 4) + { + color5Decimal = (baseColorCost - clearanceInt) + AddCents(); + } + else + { + color5Decimal = baseColorCost + AddCents(); + } + } + + #endregion + + + + #region Protected Methods + + /// <summary> + /// Adds a random amount of change for each pricing. + /// </summary> + /// <returns>A random decimal between 0(inclusive) and 1(exclusive).</returns> + protected decimal AddCents() + { + double centsDouble = random.NextDouble(); + return Convert.ToDecimal(centsDouble); + } + + #endregion + + + + #region Public Methods + + public override void CalculateTotalCost() + { + throw new NotImplementedException(); + } + + #endregion + } +} diff --git a/cis237assignment3/Droid_Janitor.cs b/cis237assignment3/Droid_Janitor.cs index daca26d70ab55567684ab9e634c85ec304787458..d2631957515ad76c3a3a5775c7e24515444fb6c3 100644 --- a/cis237assignment3/Droid_Janitor.cs +++ b/cis237assignment3/Droid_Janitor.cs @@ -1,4 +1,6 @@ -using System; +// Brandon Rodriguez + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -78,9 +80,22 @@ namespace cis237assignment3 base.CalculateTotalCost(); } - public override string DisplayToString() + /// <summary> + /// Shortened string for displaying of many droids, each in single line format. + /// </summary> + /// <returns>String of short Droid information.</returns> + public override string DisplayShortToString() + { + return "Utility Droid: " + totalCostDecimal.ToString().PadLeft(10); + } + + /// <summary> + /// Full string for displaying of single droid spanning multiple lines. + /// </summary> + /// <returns>String of full Droid information.</returns> + public override string DisplayFullToString() { - return base.DisplayToString() + Environment.NewLine + + return base.DisplayFullToString() + Environment.NewLine + "Trash Compactor: " + YesNoString(hasTrashCompactorBool) + Environment.NewLine + "Vacuum: " + YesNoString(hasVacuumBool); } diff --git a/cis237assignment3/Droid_Protocol.cs b/cis237assignment3/Droid_Protocol.cs index ba93a391123ba52c18b901c638e09eaa58e97b3e..7a70b6bf88a752807fa61c0f426b509bed2d1322 100644 --- a/cis237assignment3/Droid_Protocol.cs +++ b/cis237assignment3/Droid_Protocol.cs @@ -1,4 +1,6 @@ -using System; +// Brandon Rodriguez + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -15,8 +17,8 @@ namespace cis237assignment3 #region Variables protected int numberOfLanguagesInt; - protected const decimal COST_PER_LANGUAGE = 1; // Temp cost placeholder. + protected decimal totalLanguageDecimal; #endregion @@ -57,20 +59,53 @@ namespace cis237assignment3 get { return numberOfLanguagesInt; } } + public decimal TotalLanguageCost + { + get { return numberOfLanguagesInt; } + } + + #endregion + + + + #region Private Methods + + /// <summary> + /// Determines total language cost for droid. + /// </summary> + private void CalculateLanguageCost() + { + totalLanguageDecimal = numberOfLanguagesInt * COST_PER_LANGUAGE; + } + #endregion - #region Methods + + #region Public Methods public override void CalculateTotalCost() { throw new NotImplementedException(); } - public override string DisplayToString() + /// <summary> + /// Shortened string for displaying of many droids, each in single line format. + /// </summary> + /// <returns>String of short Droid information.</returns> + public override string DisplayShortToString() + { + return "Protocol Droid: " + totalCostDecimal.ToString().PadLeft(10); + } + + /// <summary> + /// Full string for displaying of single droid spanning multiple lines. + /// </summary> + /// <returns>String of full Droid information.</returns> + public override string DisplayFullToString() { - return base.DisplayToString() + Environment.NewLine + + return base.DisplayFullToString() + Environment.NewLine + "Languages: " + numberOfLanguagesInt; } diff --git a/cis237assignment3/Droid_Utility.cs b/cis237assignment3/Droid_Utility.cs index 7874f3084dc7343d7d8bd0019e9aae6c905cca6c..c8cb9625502e4d6d835266d3d38356ccd0e1b006 100644 --- a/cis237assignment3/Droid_Utility.cs +++ b/cis237assignment3/Droid_Utility.cs @@ -1,4 +1,6 @@ -using System; +// Brandon Rodriguez + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -111,10 +113,22 @@ namespace cis237assignment3 throw new NotImplementedException(); } + /// <summary> + /// Shortened string for displaying of many droids, each in single line format. + /// </summary> + /// <returns>String of short Droid information.</returns> + public override string DisplayShortToString() + { + return "Utility Droid: " + totalCostDecimal.ToString().PadLeft(10); + } - public override string DisplayToString() + /// <summary> + /// Full string for displaying of single droid spanning multiple lines. + /// </summary> + /// <returns>String of full Droid information.</returns> + public override string DisplayFullToString() { - return base.DisplayToString() + Environment.NewLine + + return base.DisplayFullToString() + Environment.NewLine + "Toolbox: " + YesNoString(hasArmBool) + Environment.NewLine + "Computer Connection: " + YesNoString(hasComputerConnectiontBool) + Environment.NewLine + "Arm: " + YesNoString(hasArmBool); diff --git a/cis237assignment3/IDroid.cs b/cis237assignment3/IDroid.cs index d7979a0e5864a396f18263ec8332e93e9018db0c..076dcbea265d410bc4cf0f61990ac5a4ccb93313 100644 --- a/cis237assignment3/IDroid.cs +++ b/cis237assignment3/IDroid.cs @@ -1,4 +1,6 @@ -using System; +// Brandon Rodriguez + +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/cis237assignment3/Program.cs b/cis237assignment3/Program.cs index 04012e8a76abb4fc1ce50654e22aa04e446295f3..6e1ec0a6c5ad2dcd3ae70c8842e4e4a2df074c7b 100644 --- a/cis237assignment3/Program.cs +++ b/cis237assignment3/Program.cs @@ -1,4 +1,6 @@ -using System; +// Brandon Rodriguez + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,8 +10,13 @@ namespace cis237assignment3 { class Program { + /// <summary> + /// Main. + /// </summary> + /// <param name="args">Command-line args.</param> static void Main(string[] args) { + RunProgram run = new RunProgram(); } } } diff --git a/cis237assignment3/RunProgram.cs b/cis237assignment3/RunProgram.cs new file mode 100644 index 0000000000000000000000000000000000000000..0f83ecd918247ea5d410359aa91875cf2e185839 --- /dev/null +++ b/cis237assignment3/RunProgram.cs @@ -0,0 +1,106 @@ +// Brandon Rodriguez + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace cis237assignment3 +{ + /// <summary> + /// Handles main operations of program. + /// </summary> + class RunProgram + { + #region Variables + + private bool runProgram; + private string inputString; + + #endregion + + + + #region Constructor + + public RunProgram() + { + runProgram = true; + } + + #endregion + + + + #region Properties + + + + #endregion + + + + #region Methods + + /// <summary> + /// Holds program in loop until exit is chosen. + /// </summary> + private void Run() + { + while (runProgram) + { + UserInterface.DisplayMainMenu(); + inputString = UserInterface.GetUserInput(); + MainMenuSelection(); + } + } + + private void MainMenuSelection() + { + switch (inputString) + { + case "1": + PurchaseDroid(); + break; + case "2": + DisplayReciept(); + break; + case "3": + DisplaySingle(); + break; + case "4": + Exit(); + break; + case "esc": + Exit(); + break; + default: + break; + } + } + + private void PurchaseDroid() + { + + } + + private void DisplayReciept() + { + + } + + private void DisplaySingle() + { + + } + + private void Exit() + { + runProgram = false; + } + + #endregion + + } +} diff --git a/cis237assignment3/UserInterface.cs b/cis237assignment3/UserInterface.cs index d6dfe0349265ea5da3c837757929da8527f72130..9fe2a17b1ddd5a14513db1f5a1ee4147211c47d3 100644 --- a/cis237assignment3/UserInterface.cs +++ b/cis237assignment3/UserInterface.cs @@ -1,4 +1,6 @@ -using System; +// Brandon Rodriguez + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,12 +10,13 @@ namespace cis237assignment3 { /// <summary> /// Handles all display to user and reading of user input. + /// Having one class handle everything UI helps create consistency. /// </summary> static class UserInterface { #region Variables - private static string userInputString; + #endregion @@ -29,18 +32,174 @@ namespace cis237assignment3 #region Properties - public static string UserInput - { - get { return userInputString; } - } + #endregion - #region Methods + #region Private Methods + + + + #endregion + + + #region Public Methods + /// <summary> + /// Gets user input from console. + /// </summary> + /// <returns>String of user's input.</returns> + public static string GetUserInput() + { + return Console.ReadLine().Trim().ToLower(); + } + + + public static void DisplayLine(string displayString) + { + Console.WriteLine(displayString); + } + + /// <summary> + /// Struct to hold overbloated list of menus. + /// </summary> + public struct Menus + { + /// <summary> + /// Displays Main Menu to user. + /// </summary> + public static void DisplayMainMenu() + { + Console.WriteLine( + " Select an option: " + Environment.NewLine + + "" + Environment.NewLine + + " 1) Purchase Droid" + Environment.NewLine + + " 2) Display Full Reciept" + Environment.NewLine + + " 3) Display Single Item" + Environment.NewLine + + " 4) Exit"); + } + + public static void DisplayTypeSelectionMenu() + { + Console.WriteLine( + " Select a Droid Type: " + Environment.NewLine + + "" + Environment.NewLine + + " 1) Protocol Droid" + Environment.NewLine + + " 2) Utility Droid" + Environment.NewLine + + " 3) Janitor Droid" + Environment.NewLine + + " 4) Astromech Droid" + Environment.NewLine); + } + + public static void DisplayModelSelectionMenu(string model1, string model2) + { + Console.WriteLine( + " Select a Droid Model: " + Environment.NewLine + + "" + Environment.NewLine + + " 1) " + model1 + Environment.NewLine + + " 2) " + model2 + Environment.NewLine); + } + + public static void DisplayMaterialSelectionMenu(string material1, string material2, string material3, string material4, string material5) + { + Console.WriteLine( + " Select a Droid Material: " + Environment.NewLine + + "" + Environment.NewLine + + " 1) " + material1 + Environment.NewLine + + " 2) " + material2 + Environment.NewLine + + " 3) " + material3 + Environment.NewLine + + " 4) " + material4 + Environment.NewLine + + " 5) " + material5 + Environment.NewLine); + } + + public static void DisplayColorSelectionMenu(string color1, string color2, string color3, string color4, string color5) + { + Console.WriteLine( + " Select a Droid Color: " + Environment.NewLine + + "" + Environment.NewLine + + " 1) " + color1 + Environment.NewLine + + " 2) " + color2 + Environment.NewLine + + " 3) " + color3 + Environment.NewLine + + " 4) " + color4 + Environment.NewLine + + " 5) " + color5 + Environment.NewLine); + } + + public static void DisplayLanguageSelectionMenu() + { + Console.WriteLine( + " Select number of Built in Languages: " + Environment.NewLine + + "" + Environment.NewLine + + " 1) 1" + Environment.NewLine + + " 2) 3" + Environment.NewLine + + " 3) 7" + Environment.NewLine + + " 4) 12" + Environment.NewLine); + } + + public static void DisplayToolBoxSelectionMenu() + { + Console.WriteLine( + " Add Toolbox Functionality? " + Environment.NewLine + + "" + Environment.NewLine + + " 1) Yes" + Environment.NewLine + + " 2) No" +Environment.NewLine); + } + + public static void DisplayComputerConnectionSelectionMenu() + { + Console.WriteLine( + " Add Computer Connection Functionality? " + Environment.NewLine + + "" + Environment.NewLine + + " 1) Yes" + Environment.NewLine + + " 2) No" + Environment.NewLine); + } + + public static void DisplayArmSelectionMenu() + { + Console.WriteLine( + " Add Mechanical Arm Functionality? " + Environment.NewLine + + "" + Environment.NewLine + + " 1) Yes" + Environment.NewLine + + " 2) No" + Environment.NewLine); + } + + public static void DisplayTrashCompactorSelectionMenu() + { + Console.WriteLine( + " Add Trash Compactor Functionality? " + Environment.NewLine + + "" + Environment.NewLine + + " 1) Yes" + Environment.NewLine + + " 2) No" + Environment.NewLine); + } + + public static void DisplayVacuumSelectionMenu() + { + Console.WriteLine( + " Add Vacuum Functionality? " + Environment.NewLine + + "" + Environment.NewLine + + " 1) Yes" + Environment.NewLine + + " 2) No" + Environment.NewLine); + } + + public static void DisplayFireExtinguisherSelectionMenu() + { + Console.WriteLine( + " Add built in Fire Extinguisher? " + Environment.NewLine + + "" + Environment.NewLine + + " 1) Yes" + Environment.NewLine + + " 2) No" + Environment.NewLine); + } + + public static void DisplayNumberOfShipsSelectionMenu() + { + Console.WriteLine( + " How many ships do you need to outfit this kind of droid onto? " + Environment.NewLine + + "" + Environment.NewLine + + " 1)"); + } + + } #endregion diff --git a/cis237assignment3/cis237assignment3.csproj b/cis237assignment3/cis237assignment3.csproj index 658d33fa52d7b48604748f7ec0e81aaea4f2a81a..871a7d2bf8a113cfa76ee6f2f0c3ca372709e8fe 100644 --- a/cis237assignment3/cis237assignment3.csproj +++ b/cis237assignment3/cis237assignment3.csproj @@ -44,12 +44,14 @@ <Compile Include="Droid.cs" /> <Compile Include="DroidCollection.cs" /> <Compile Include="Droid_Astromech.cs" /> + <Compile Include="Droid_Generic.cs" /> <Compile Include="Droid_Janitor.cs" /> <Compile Include="Droid_Protocol.cs" /> <Compile Include="Droid_Utility.cs" /> <Compile Include="IDroid.cs" /> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="RunProgram.cs" /> <Compile Include="UserInterface.cs" /> </ItemGroup> <ItemGroup>