Data Structures

profileAngiebriseno28
GoodMorningweek4.zip

Good Morning.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.28010.2003 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Good Morning", "Good Morning\Good Morning.csproj", "{EEB04A6E-A3F9-4FCB-9AE1-7F020630AEE7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {EEB04A6E-A3F9-4FCB-9AE1-7F020630AEE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EEB04A6E-A3F9-4FCB-9AE1-7F020630AEE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {EEB04A6E-A3F9-4FCB-9AE1-7F020630AEE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {EEB04A6E-A3F9-4FCB-9AE1-7F020630AEE7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9018FF2E-C6CE-46A4-835D-5E8ADF0A413C} EndGlobalSection EndGlobal

Good Morning/App.config

Good Morning/bin/Debug/Good Morning.exe

Good Morning/bin/Debug/Good Morning.exe.config

Good Morning/bin/Debug/Good Morning.pdb

Good Morning/Good Morning.csproj

Debug AnyCPU {EEB04A6E-A3F9-4FCB-9AE1-7F020630AEE7} Exe Good_Morning Good Morning v4.6.1 512 true true AnyCPU true full false bin\Debug\ DEBUG;TRACE prompt 4 AnyCPU pdbonly true bin\Release\ TRACE prompt 4

Good Morning/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Good Morning/obj/Debug/Good Morning.csproj.CoreCompileInputs.cache

5db7e2fe81783cd39a6e02ef3213d1bcb13fc286

Good Morning/obj/Debug/Good Morning.csproj.FileListAbsolute.txt

C:\Users\Matthew\source\repos\Good Morning\Good Morning\bin\Debug\Good Morning.exe.config C:\Users\Matthew\source\repos\Good Morning\Good Morning\bin\Debug\Good Morning.exe C:\Users\Matthew\source\repos\Good Morning\Good Morning\bin\Debug\Good Morning.pdb C:\Users\Matthew\source\repos\Good Morning\Good Morning\obj\Debug\Good Morning.csprojAssemblyReference.cache C:\Users\Matthew\source\repos\Good Morning\Good Morning\obj\Debug\Good Morning.csproj.CoreCompileInputs.cache C:\Users\Matthew\source\repos\Good Morning\Good Morning\obj\Debug\Good Morning.exe C:\Users\Matthew\source\repos\Good Morning\Good Morning\obj\Debug\Good Morning.pdb

Good Morning/obj/Debug/Good Morning.csprojAssemblyReference.cache

Good Morning/obj/Debug/Good Morning.exe

Good Morning/obj/Debug/Good Morning.pdb

Good Morning/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

Good Morning/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

Good Morning/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

Good Morning/Program.cs

using System; namespace Good_Morning { class employee { public string employeeType; public employee(string employeeType) { this.employeeType = employeeType; } } class Program { static void Main(string[] args) { Console.WriteLine("Good Morning"); // declare variables with their types string welcomeMsg; double taxrate = 0.07; //create arrays to store data from inputs string[] developers = new string[3]; string[] type = new string[3]; int[] zipcodes = new int[3]; double[] grosspay = new double[3]; double[] taxpaid = new double[3]; //input company details welcomeMsg = "Welcome to the new software developers world!"; //create a loop to take in all the names, zipcodes and grosspay for (int i = 0; i < 3; i++) { Console.Write("\nEnter the {0} software developer's name: ", i + 1); developers[i] = Console.ReadLine(); Console.Write("\nChoose Employee Type:\n\t1. W2\n\t2. 1099\n"); while (true) { try { Console.Write("Type: "); int choice = Convert.ToInt32(Console.ReadLine()); employee employeeType; if (choice == 1) { employeeType = new employee("W2"); } else if (choice == 2) { employeeType = new employee("1099"); } else { continue; } type [i] = employeeType.employeeType; break; } catch (Exception) { continue; } } while (true) { try { Console.Write("Enter the ZIP Code: "); zipcodes[i] = Convert.ToInt32(Console.ReadLine()); break; } catch (Exception) { continue; } } while (true) { try { Console.Write("Enter the monthly gross pay: "); grosspay[i] = Convert.ToDouble(Console.ReadLine()); break; } catch (Exception) { continue; } } if (type[i] == "W2") { taxpaid[i] = taxrate * grosspay[i]; } else { taxpaid[i] = 0; } } /* * Output the details * Use tabs (/t) and line breaks (/n) to align them on console screen. */ Console.WriteLine("\n\t\t\t{0}\n\t", welcomeMsg); //loop through the arrays to show each output for (int i = 0; i < 3; i++) { Console.WriteLine("Software developer's name:\t{0}\nZIP code:\t\t\t{1}\nMonthly gross pay:\t\t{2}\nMonthly Taxes:\t\t\t{3}\nAnnual GrossPay:\t\t{4}\nAnnual Taxes:\t\t\t{5}\nNet Pay:\t\t\t{6}\n\n", developers[i], zipcodes[i], grosspay[i].ToString("C2"), taxpaid[i].ToString("C2"), (grosspay[i] * 12).ToString("C2"), (taxpaid[i] * 12).ToString("C2"), (grosspay[i] + taxpaid[i]).ToString("C2")); } /* Exit the console only when a key is pressed */ Console.ReadKey(); } } }

Good Morning/Properties/AssemblyInfo.cs

using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Good Morning")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Good Morning")] [assembly: AssemblyCopyright("Copyright © 2018")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("eeb04a6e-a3f9-4fcb-9ae1-7f020630aee7")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]