diff --git a/CharacterSheet/.vs/CharacterSheet/DesignTimeBuild/.dtbcache.v2 b/CharacterSheet/.vs/CharacterSheet/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..5de138f Binary files /dev/null and b/CharacterSheet/.vs/CharacterSheet/DesignTimeBuild/.dtbcache.v2 differ diff --git a/CharacterSheet/.vs/CharacterSheet/FileContentIndex/c7c86a8a-bd28-4e1f-b985-08f9357d8852.vsidx b/CharacterSheet/.vs/CharacterSheet/FileContentIndex/c7c86a8a-bd28-4e1f-b985-08f9357d8852.vsidx new file mode 100644 index 0000000..66361e3 Binary files /dev/null and b/CharacterSheet/.vs/CharacterSheet/FileContentIndex/c7c86a8a-bd28-4e1f-b985-08f9357d8852.vsidx differ diff --git a/CharacterSheet/.vs/CharacterSheet/FileContentIndex/read.lock b/CharacterSheet/.vs/CharacterSheet/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/CharacterSheet/.vs/CharacterSheet/v17/.futdcache.v1 b/CharacterSheet/.vs/CharacterSheet/v17/.futdcache.v1 new file mode 100644 index 0000000..7a10bdb Binary files /dev/null and b/CharacterSheet/.vs/CharacterSheet/v17/.futdcache.v1 differ diff --git a/CharacterSheet/.vs/ProjectEvaluation/charactersheet.metadata.v2 b/CharacterSheet/.vs/ProjectEvaluation/charactersheet.metadata.v2 new file mode 100644 index 0000000..980ec30 Binary files /dev/null and b/CharacterSheet/.vs/ProjectEvaluation/charactersheet.metadata.v2 differ diff --git a/CharacterSheet/.vs/ProjectEvaluation/charactersheet.projects.v2 b/CharacterSheet/.vs/ProjectEvaluation/charactersheet.projects.v2 new file mode 100644 index 0000000..0d7dd8b Binary files /dev/null and b/CharacterSheet/.vs/ProjectEvaluation/charactersheet.projects.v2 differ diff --git a/CharacterSheet/CharacterSheet.sln b/CharacterSheet/CharacterSheet.sln new file mode 100644 index 0000000..9a56599 --- /dev/null +++ b/CharacterSheet/CharacterSheet.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32210.238 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CharacterSheet", "CharacterSheet\CharacterSheet.csproj", "{000A0903-9A4C-4C23-B7E6-CE36233BAB6C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {000A0903-9A4C-4C23-B7E6-CE36233BAB6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {000A0903-9A4C-4C23-B7E6-CE36233BAB6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {000A0903-9A4C-4C23-B7E6-CE36233BAB6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {000A0903-9A4C-4C23-B7E6-CE36233BAB6C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {40CBBD85-D294-4231-B704-EA36F53BAE93} + EndGlobalSection +EndGlobal diff --git a/CharacterSheet/CharacterSheet/CharacterSheet.cs b/CharacterSheet/CharacterSheet/CharacterSheet.cs new file mode 100644 index 0000000..ee07bca --- /dev/null +++ b/CharacterSheet/CharacterSheet/CharacterSheet.cs @@ -0,0 +1,55 @@ +Console.Title = "Character Sheet"; +Console.WindowHeight = 40; +Console.WindowWidth = 100; +Console.SetBufferSize(100,40); + +// Decaring variables +string characterFirstName; +string characterLastName; +string characterSpecies; +int characterAge; +float characterHeightMeters; +string characterBackStory; + +// Assigning variables +characterAge = 31; +characterHeightMeters = 1.67f; + +// Defining variables +char characterMiddleInitial = 'W'; +int characterAbility = 14; +int characterKnowledge = 19; +int characterStreetSmarts = 13; +int characterWit = 13; + +// Accepting input +Console.WriteLine("What is your character's first name?"); +characterFirstName = Console.ReadLine(); +Console.WriteLine("What is your character's last name?"); +characterLastName = Console.ReadLine(); +Console.WriteLine("What is your characters species?"); +characterSpecies = Console.ReadLine(); +Console.Clear(); +characterBackStory = $"{characterFirstName} {characterMiddleInitial} {characterLastName} is a {characterSpecies} and is an agent of chaos. Standing at just over {characterHeightMeters}, and {characterAge} years\nof age, they have gotten pretty good at sowing chaos around them. With {characterWit} years of wit gained\nover {characterKnowledge} years of focused knowledge, talking his way into and out of any situation is now a breeze.\nTheir {characterStreetSmarts} years of street smarts are just an added bonus. Even though relatively young in {characterSpecies},\nthe {characterSpecies} Lord rates their overall ability at creating chaos at a {characterAbility} out of 20."; + + +// String interpolation +Console.ForegroundColor = ConsoleColor.Cyan; +Console.WriteLine("+CHARACTER SHEET***********************************************************************************+"); +Console.ForegroundColor = ConsoleColor.DarkCyan; +Console.WriteLine($"Name: \t\t{characterFirstName} {characterLastName}"); +Console.WriteLine($"Age: \t\t{characterAge}"); +Console.WriteLine($"Height: \t{characterHeightMeters}"); +Console.WriteLine($"Wit: \t\t{characterWit}"); +Console.WriteLine($"Ability: \t{characterAbility}"); +Console.WriteLine($"Knowledge: \t{characterKnowledge}"); +Console.WriteLine($"Street Smarts: \t{characterStreetSmarts}"); +Console.ForegroundColor = ConsoleColor.Cyan; +Console.WriteLine("+**************************************************************************************************+"); +Console.WriteLine(); +Console.ForegroundColor = ConsoleColor.DarkYellow; +Console.WriteLine("BACK STORY"); +Console.ForegroundColor = ConsoleColor.Yellow; +Console.WriteLine(characterBackStory); +Console.ForegroundColor = ConsoleColor.White; + diff --git a/CharacterSheet/CharacterSheet/CharacterSheet.csproj b/CharacterSheet/CharacterSheet/CharacterSheet.csproj new file mode 100644 index 0000000..74abf5c --- /dev/null +++ b/CharacterSheet/CharacterSheet/CharacterSheet.csproj @@ -0,0 +1,10 @@ + + + + Exe + net6.0 + enable + enable + + + diff --git a/CharacterSheet/CharacterSheet/obj/CharacterSheet.csproj.nuget.dgspec.json b/CharacterSheet/CharacterSheet/obj/CharacterSheet.csproj.nuget.dgspec.json new file mode 100644 index 0000000..6206164 --- /dev/null +++ b/CharacterSheet/CharacterSheet/obj/CharacterSheet.csproj.nuget.dgspec.json @@ -0,0 +1,65 @@ +{ + "format": 1, + "restore": { + "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\CharacterSheet\\CharacterSheet\\CharacterSheet.csproj": {} + }, + "projects": { + "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\CharacterSheet\\CharacterSheet\\CharacterSheet.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\CharacterSheet\\CharacterSheet\\CharacterSheet.csproj", + "projectName": "CharacterSheet", + "projectPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\CharacterSheet\\CharacterSheet\\CharacterSheet.csproj", + "packagesPath": "C:\\Users\\randa\\.nuget\\packages\\", + "outputPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\CharacterSheet\\CharacterSheet\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\randa\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.302\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/CharacterSheet/CharacterSheet/obj/CharacterSheet.csproj.nuget.g.props b/CharacterSheet/CharacterSheet/obj/CharacterSheet.csproj.nuget.g.props new file mode 100644 index 0000000..4a2521c --- /dev/null +++ b/CharacterSheet/CharacterSheet/obj/CharacterSheet.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\randa\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.2.1 + + + + + + \ No newline at end of file diff --git a/CharacterSheet/CharacterSheet/obj/CharacterSheet.csproj.nuget.g.targets b/CharacterSheet/CharacterSheet/obj/CharacterSheet.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/CharacterSheet/CharacterSheet/obj/CharacterSheet.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/CharacterSheet/CharacterSheet/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs b/CharacterSheet/CharacterSheet/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs new file mode 100644 index 0000000..36203c7 --- /dev/null +++ b/CharacterSheet/CharacterSheet/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")] diff --git a/CharacterSheet/CharacterSheet/obj/Debug/net6.0/CharacterSheet.AssemblyInfo.cs b/CharacterSheet/CharacterSheet/obj/Debug/net6.0/CharacterSheet.AssemblyInfo.cs new file mode 100644 index 0000000..81825d2 --- /dev/null +++ b/CharacterSheet/CharacterSheet/obj/Debug/net6.0/CharacterSheet.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("CharacterSheet")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("CharacterSheet")] +[assembly: System.Reflection.AssemblyTitleAttribute("CharacterSheet")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/CharacterSheet/CharacterSheet/obj/Debug/net6.0/CharacterSheet.GeneratedMSBuildEditorConfig.editorconfig b/CharacterSheet/CharacterSheet/obj/Debug/net6.0/CharacterSheet.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..d666e27 --- /dev/null +++ b/CharacterSheet/CharacterSheet/obj/Debug/net6.0/CharacterSheet.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,10 @@ +is_global = true +build_property.TargetFramework = net6.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = CharacterSheet +build_property.ProjectDir = E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\CharacterSheet\CharacterSheet\ diff --git a/CharacterSheet/CharacterSheet/obj/Debug/net6.0/CharacterSheet.GlobalUsings.g.cs b/CharacterSheet/CharacterSheet/obj/Debug/net6.0/CharacterSheet.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/CharacterSheet/CharacterSheet/obj/Debug/net6.0/CharacterSheet.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/CharacterSheet/CharacterSheet/obj/project.assets.json b/CharacterSheet/CharacterSheet/obj/project.assets.json new file mode 100644 index 0000000..8c4d49c --- /dev/null +++ b/CharacterSheet/CharacterSheet/obj/project.assets.json @@ -0,0 +1,71 @@ +{ + "version": 3, + "targets": { + "net6.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net6.0": [] + }, + "packageFolders": { + "C:\\Users\\randa\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\CharacterSheet\\CharacterSheet\\CharacterSheet.csproj", + "projectName": "CharacterSheet", + "projectPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\CharacterSheet\\CharacterSheet\\CharacterSheet.csproj", + "packagesPath": "C:\\Users\\randa\\.nuget\\packages\\", + "outputPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\CharacterSheet\\CharacterSheet\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\randa\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.302\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/ConditionalsProject/.vs/ConditionalsProject/DesignTimeBuild/.dtbcache.v2 b/ConditionalsProject/.vs/ConditionalsProject/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..df24d84 Binary files /dev/null and b/ConditionalsProject/.vs/ConditionalsProject/DesignTimeBuild/.dtbcache.v2 differ diff --git a/ConditionalsProject/.vs/ConditionalsProject/FileContentIndex/405366fb-9b1d-4008-a295-742897927695.vsidx b/ConditionalsProject/.vs/ConditionalsProject/FileContentIndex/405366fb-9b1d-4008-a295-742897927695.vsidx new file mode 100644 index 0000000..8d7c938 Binary files /dev/null and b/ConditionalsProject/.vs/ConditionalsProject/FileContentIndex/405366fb-9b1d-4008-a295-742897927695.vsidx differ diff --git a/ConditionalsProject/.vs/ConditionalsProject/FileContentIndex/read.lock b/ConditionalsProject/.vs/ConditionalsProject/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/ConditionalsProject/.vs/ConditionalsProject/v17/.futdcache.v1 b/ConditionalsProject/.vs/ConditionalsProject/v17/.futdcache.v1 new file mode 100644 index 0000000..d98fbb6 Binary files /dev/null and b/ConditionalsProject/.vs/ConditionalsProject/v17/.futdcache.v1 differ diff --git a/ConditionalsProject/.vs/ProjectEvaluation/conditionalsproject.metadata.v2 b/ConditionalsProject/.vs/ProjectEvaluation/conditionalsproject.metadata.v2 new file mode 100644 index 0000000..3faba3a Binary files /dev/null and b/ConditionalsProject/.vs/ProjectEvaluation/conditionalsproject.metadata.v2 differ diff --git a/ConditionalsProject/.vs/ProjectEvaluation/conditionalsproject.projects.v2 b/ConditionalsProject/.vs/ProjectEvaluation/conditionalsproject.projects.v2 new file mode 100644 index 0000000..0d7dd8b Binary files /dev/null and b/ConditionalsProject/.vs/ProjectEvaluation/conditionalsproject.projects.v2 differ diff --git a/ConditionalsProject/ConditionalsProject.sln b/ConditionalsProject/ConditionalsProject.sln new file mode 100644 index 0000000..106ff58 --- /dev/null +++ b/ConditionalsProject/ConditionalsProject.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32228.430 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConditionalsProject", "ConditionalsProject\ConditionalsProject.csproj", "{8001751C-7941-435A-9EF2-8500A8FB1978}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8001751C-7941-435A-9EF2-8500A8FB1978}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8001751C-7941-435A-9EF2-8500A8FB1978}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8001751C-7941-435A-9EF2-8500A8FB1978}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8001751C-7941-435A-9EF2-8500A8FB1978}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DEC244F1-0B7C-4B89-937E-18CE933920BD} + EndGlobalSection +EndGlobal diff --git a/ConditionalsProject/ConditionalsProject/ConditionalsProject.cs b/ConditionalsProject/ConditionalsProject/ConditionalsProject.cs new file mode 100644 index 0000000..f3db226 --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/ConditionalsProject.cs @@ -0,0 +1,125 @@ + +//Title line +Console.WriteLine("CONDITIONALS PROJECT"); +Console.WriteLine(); + + +// Problem #1: Baking Converter +Console.ForegroundColor = ConsoleColor.Cyan; +Console.WriteLine("Problem #1: Baking Converter"); +Console.ForegroundColor= ConsoleColor.White; + + +string unit = "oz"; +float amount = 210f; + +if (unit.ToLower() == "g") +{ + float convertedAmount = amount * 28.349523f; + Console.WriteLine($"The weight is {convertedAmount} {unit}."); +} +else +{ + float convertedAmount = amount / 28.349523f; + Console.WriteLine($"The weight is {convertedAmount} {unit}."); +} + + +// End of problem 1, double line spacer +Console.WriteLine(); +Console.WriteLine(); + + + +// Problem #2: Pizza Party +Console.ForegroundColor = ConsoleColor.Cyan; +Console.WriteLine("Problem #2: Pizza Party"); +Console.ForegroundColor = ConsoleColor.White; + +int pizzaorder = 18; +int slicespizza = 6; +int numguest = 24; +int sliceguesteat = 4; + + +int totalslices = pizzaorder * slicespizza; +int neededslices = numguest * sliceguesteat; + +if (totalslices >= neededslices) +{ + int leftoverslices = totalslices - neededslices; + Console.WriteLine($"Yes, you have enough pizza for your {numguest} guests with {leftoverslices} slices left over."); + +} +else +{ + int moreslices = neededslices - totalslices; + Console.WriteLine($"No, you need at least {moreslices} more slices of pizza. You should order more."); +} + +//end of Problem 2, double line spacer +Console.WriteLine(); +Console.WriteLine(); + + +// Problem #3: Discount Double Check + +Console.ForegroundColor = ConsoleColor.Cyan; +Console.WriteLine("Problem #3: Discount Double Check"); +Console.ForegroundColor = ConsoleColor.White; + +float item1 = 48.58f; +float item2 = 24.00f; +float item3 = 14.84f; + +float discount10 = 0.10f; +float discount5 = 0.05f; + +float totalcost = item1 + item2 + item3; + +if (totalcost >= 100) +{ + float discountAmount = totalcost * discount10; + float totalWithDiscount = totalcost - discountAmount; + + Console.WriteLine($"Your total purchase is {totalWithDiscount:C}, which includes your 10% discount."); +} +else if (totalcost >= 50 && totalcost <= 100) +{ + float discountAmount = totalcost * discount5; + float totalWithDiscount = totalcost - discountAmount; + + Console.WriteLine($"Your total purchase is {totalWithDiscount:C}, which includes your 5% discount."); +} +else +{ + Console.WriteLine($"Your total purchase is {totalcost:C}."); +} + +// End of Problem 3 +Console.WriteLine(); +Console.WriteLine(); + +// Problem #4: Logical Operators: Movie Ticket Price + +Console.ForegroundColor = ConsoleColor.Cyan; +Console.WriteLine("Problem #4: Logical Operators: Movie Ticket Price"); +Console.ForegroundColor = ConsoleColor.White; + +float ticketPrice = 12f; +float discountPrice = 7f; +int viewerAge = 7; +int time = 1530; + +if (viewerAge < 10 || viewerAge >= 55) +{ + Console.WriteLine($"Your ticket price is {discountPrice:C}"); +} +else if(time >= 1500 && time <= 1700) +{ + Console.WriteLine($"Your ticket price is {discountPrice:C}"); +} +else +{ + Console.WriteLine($"Your ticket price is {ticketPrice:C}"); +}; \ No newline at end of file diff --git a/ConditionalsProject/ConditionalsProject/ConditionalsProject.csproj b/ConditionalsProject/ConditionalsProject/ConditionalsProject.csproj new file mode 100644 index 0000000..74abf5c --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/ConditionalsProject.csproj @@ -0,0 +1,10 @@ + + + + Exe + net6.0 + enable + enable + + + diff --git a/ConditionalsProject/ConditionalsProject/bin/Debug/net6.0/ConditionalsProject.deps.json b/ConditionalsProject/ConditionalsProject/bin/Debug/net6.0/ConditionalsProject.deps.json new file mode 100644 index 0000000..d715e44 --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/bin/Debug/net6.0/ConditionalsProject.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "ConditionalsProject/1.0.0": { + "runtime": { + "ConditionalsProject.dll": {} + } + } + } + }, + "libraries": { + "ConditionalsProject/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/ConditionalsProject/ConditionalsProject/bin/Debug/net6.0/ConditionalsProject.runtimeconfig.json b/ConditionalsProject/ConditionalsProject/bin/Debug/net6.0/ConditionalsProject.runtimeconfig.json new file mode 100644 index 0000000..4986d16 --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/bin/Debug/net6.0/ConditionalsProject.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "net6.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "6.0.0" + } + } +} \ No newline at end of file diff --git a/ConditionalsProject/ConditionalsProject/obj/ConditionalsProject.csproj.nuget.dgspec.json b/ConditionalsProject/ConditionalsProject/obj/ConditionalsProject.csproj.nuget.dgspec.json new file mode 100644 index 0000000..1c7f6e7 --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/obj/ConditionalsProject.csproj.nuget.dgspec.json @@ -0,0 +1,65 @@ +{ + "format": 1, + "restore": { + "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\ConditionalsProject\\ConditionalsProject\\ConditionalsProject.csproj": {} + }, + "projects": { + "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\ConditionalsProject\\ConditionalsProject\\ConditionalsProject.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\ConditionalsProject\\ConditionalsProject\\ConditionalsProject.csproj", + "projectName": "ConditionalsProject", + "projectPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\ConditionalsProject\\ConditionalsProject\\ConditionalsProject.csproj", + "packagesPath": "C:\\Users\\randa\\.nuget\\packages\\", + "outputPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\ConditionalsProject\\ConditionalsProject\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\randa\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.302\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/ConditionalsProject/ConditionalsProject/obj/ConditionalsProject.csproj.nuget.g.props b/ConditionalsProject/ConditionalsProject/obj/ConditionalsProject.csproj.nuget.g.props new file mode 100644 index 0000000..4a2521c --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/obj/ConditionalsProject.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\randa\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.2.1 + + + + + + \ No newline at end of file diff --git a/ConditionalsProject/ConditionalsProject/obj/ConditionalsProject.csproj.nuget.g.targets b/ConditionalsProject/ConditionalsProject/obj/ConditionalsProject.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/obj/ConditionalsProject.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs new file mode 100644 index 0000000..36203c7 --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")] diff --git a/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.AssemblyInfo.cs b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.AssemblyInfo.cs new file mode 100644 index 0000000..29bb5b7 --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("ConditionalsProject")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("ConditionalsProject")] +[assembly: System.Reflection.AssemblyTitleAttribute("ConditionalsProject")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.GeneratedMSBuildEditorConfig.editorconfig b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..41a2d27 --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,10 @@ +is_global = true +build_property.TargetFramework = net6.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = ConditionalsProject +build_property.ProjectDir = E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\ diff --git a/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.GlobalUsings.g.cs b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.csproj.BuildWithSkipAnalyzers b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.csproj.FileListAbsolute.txt b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..6c55660 --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/obj/Debug/net6.0/ConditionalsProject.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\bin\Debug\net6.0\ConditionalsProject.exe +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\bin\Debug\net6.0\ConditionalsProject.deps.json +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\bin\Debug\net6.0\ConditionalsProject.runtimeconfig.json +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\bin\Debug\net6.0\ConditionalsProject.dll +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\bin\Debug\net6.0\ConditionalsProject.pdb +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\ConditionalsProject.csproj.AssemblyReference.cache +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\ConditionalsProject.GeneratedMSBuildEditorConfig.editorconfig +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\ConditionalsProject.AssemblyInfoInputs.cache +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\ConditionalsProject.AssemblyInfo.cs +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\ConditionalsProject.csproj.CoreCompileInputs.cache +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\ConditionalsProject.dll +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\refint\ConditionalsProject.dll +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\ConditionalsProject.pdb +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\ConditionalsProject.genruntimeconfig.cache +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\ConditionalsProject\ConditionalsProject\obj\Debug\net6.0\ref\ConditionalsProject.dll diff --git a/ConditionalsProject/ConditionalsProject/obj/project.assets.json b/ConditionalsProject/ConditionalsProject/obj/project.assets.json new file mode 100644 index 0000000..5316a7c --- /dev/null +++ b/ConditionalsProject/ConditionalsProject/obj/project.assets.json @@ -0,0 +1,71 @@ +{ + "version": 3, + "targets": { + "net6.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net6.0": [] + }, + "packageFolders": { + "C:\\Users\\randa\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\ConditionalsProject\\ConditionalsProject\\ConditionalsProject.csproj", + "projectName": "ConditionalsProject", + "projectPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\ConditionalsProject\\ConditionalsProject\\ConditionalsProject.csproj", + "packagesPath": "C:\\Users\\randa\\.nuget\\packages\\", + "outputPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\ConditionalsProject\\ConditionalsProject\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\randa\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.302\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/LoopsProject/.vs/LoopsProject/DesignTimeBuild/.dtbcache.v2 b/LoopsProject/.vs/LoopsProject/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..92b1dd6 Binary files /dev/null and b/LoopsProject/.vs/LoopsProject/DesignTimeBuild/.dtbcache.v2 differ diff --git a/LoopsProject/.vs/LoopsProject/FileContentIndex/2c222ccd-a049-43ea-9e40-606e3f4976d0.vsidx b/LoopsProject/.vs/LoopsProject/FileContentIndex/2c222ccd-a049-43ea-9e40-606e3f4976d0.vsidx new file mode 100644 index 0000000..fb1a0ec Binary files /dev/null and b/LoopsProject/.vs/LoopsProject/FileContentIndex/2c222ccd-a049-43ea-9e40-606e3f4976d0.vsidx differ diff --git a/LoopsProject/.vs/LoopsProject/FileContentIndex/read.lock b/LoopsProject/.vs/LoopsProject/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/LoopsProject/.vs/LoopsProject/v17/.futdcache.v1 b/LoopsProject/.vs/LoopsProject/v17/.futdcache.v1 new file mode 100644 index 0000000..3dfa07b Binary files /dev/null and b/LoopsProject/.vs/LoopsProject/v17/.futdcache.v1 differ diff --git a/LoopsProject/.vs/ProjectEvaluation/loopsproject.metadata.v2 b/LoopsProject/.vs/ProjectEvaluation/loopsproject.metadata.v2 new file mode 100644 index 0000000..a84fe7a Binary files /dev/null and b/LoopsProject/.vs/ProjectEvaluation/loopsproject.metadata.v2 differ diff --git a/LoopsProject/.vs/ProjectEvaluation/loopsproject.projects.v2 b/LoopsProject/.vs/ProjectEvaluation/loopsproject.projects.v2 new file mode 100644 index 0000000..0d7dd8b Binary files /dev/null and b/LoopsProject/.vs/ProjectEvaluation/loopsproject.projects.v2 differ diff --git a/LoopsProject/LoopsProject.sln b/LoopsProject/LoopsProject.sln new file mode 100644 index 0000000..d49e0bc --- /dev/null +++ b/LoopsProject/LoopsProject.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32210.238 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoopsProject", "LoopsProject\LoopsProject.csproj", "{0B38ABD2-9A4A-4201-97E1-87DF6B1433F8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0B38ABD2-9A4A-4201-97E1-87DF6B1433F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B38ABD2-9A4A-4201-97E1-87DF6B1433F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B38ABD2-9A4A-4201-97E1-87DF6B1433F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B38ABD2-9A4A-4201-97E1-87DF6B1433F8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {95A8F768-65E3-4EFA-B558-023280234F94} + EndGlobalSection +EndGlobal diff --git a/LoopsProject/LoopsProject/LoopsProject.cs b/LoopsProject/LoopsProject/LoopsProject.cs new file mode 100644 index 0000000..60b8464 --- /dev/null +++ b/LoopsProject/LoopsProject/LoopsProject.cs @@ -0,0 +1,51 @@ + +float startZombies = 1; +float bitesPDay = 4; +float invadeTime = 8; +float totalZombies = 0; + +Console.WriteLine("PROBLEM #1"); +Problem1(); +Console.WriteLine(); +Console.WriteLine(); +Console.WriteLine("PROBLEM #2"); +Problem2(); + +// Problem #1 +void Problem1() +{ + for (int currentDay = 0; currentDay < invadeTime; currentDay++) + { + if (currentDay == 0) + { + totalZombies = startZombies + bitesPDay; + } + else + { + totalZombies = totalZombies * (startZombies + bitesPDay); + } + + + Console.WriteLine($"There are {totalZombies} zombies at the end of Day #{currentDay + 1}."); + } +} + +//Problem #2 NOTE: (&& cDay < 15) left in while statement to prevent infinite loop + +void Problem2() +{ + int cDay = 0; + while (totalZombies <= 1000000 && cDay < 15) + { + cDay++; + if (cDay == 1) + { + totalZombies = startZombies + bitesPDay; + } + else + { + totalZombies = totalZombies * (startZombies + bitesPDay); + } + Console.WriteLine($"On day #{cDay}, there are {totalZombies}!"); + } +} \ No newline at end of file diff --git a/LoopsProject/LoopsProject/LoopsProject.csproj b/LoopsProject/LoopsProject/LoopsProject.csproj new file mode 100644 index 0000000..74abf5c --- /dev/null +++ b/LoopsProject/LoopsProject/LoopsProject.csproj @@ -0,0 +1,10 @@ + + + + Exe + net6.0 + enable + enable + + + diff --git a/LoopsProject/LoopsProject/bin/Debug/net6.0/LoopsProject.deps.json b/LoopsProject/LoopsProject/bin/Debug/net6.0/LoopsProject.deps.json new file mode 100644 index 0000000..b6b50a7 --- /dev/null +++ b/LoopsProject/LoopsProject/bin/Debug/net6.0/LoopsProject.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "LoopsProject/1.0.0": { + "runtime": { + "LoopsProject.dll": {} + } + } + } + }, + "libraries": { + "LoopsProject/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/LoopsProject/LoopsProject/bin/Debug/net6.0/LoopsProject.runtimeconfig.json b/LoopsProject/LoopsProject/bin/Debug/net6.0/LoopsProject.runtimeconfig.json new file mode 100644 index 0000000..4986d16 --- /dev/null +++ b/LoopsProject/LoopsProject/bin/Debug/net6.0/LoopsProject.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "net6.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "6.0.0" + } + } +} \ No newline at end of file diff --git a/LoopsProject/LoopsProject/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs b/LoopsProject/LoopsProject/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs new file mode 100644 index 0000000..36203c7 --- /dev/null +++ b/LoopsProject/LoopsProject/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")] diff --git a/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.AssemblyInfo.cs b/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.AssemblyInfo.cs new file mode 100644 index 0000000..79c9a8f --- /dev/null +++ b/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("LoopsProject")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("LoopsProject")] +[assembly: System.Reflection.AssemblyTitleAttribute("LoopsProject")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.GeneratedMSBuildEditorConfig.editorconfig b/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..f1ef578 --- /dev/null +++ b/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,10 @@ +is_global = true +build_property.TargetFramework = net6.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = LoopsProject +build_property.ProjectDir = E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\ diff --git a/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.GlobalUsings.g.cs b/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.csproj.BuildWithSkipAnalyzers b/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.csproj.FileListAbsolute.txt b/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..b3c73c4 --- /dev/null +++ b/LoopsProject/LoopsProject/obj/Debug/net6.0/LoopsProject.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\bin\Debug\net6.0\LoopsProject.exe +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\bin\Debug\net6.0\LoopsProject.deps.json +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\bin\Debug\net6.0\LoopsProject.runtimeconfig.json +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\bin\Debug\net6.0\LoopsProject.dll +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\bin\Debug\net6.0\LoopsProject.pdb +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\LoopsProject.csproj.AssemblyReference.cache +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\LoopsProject.GeneratedMSBuildEditorConfig.editorconfig +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\LoopsProject.AssemblyInfoInputs.cache +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\LoopsProject.AssemblyInfo.cs +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\LoopsProject.csproj.CoreCompileInputs.cache +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\LoopsProject.dll +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\refint\LoopsProject.dll +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\LoopsProject.pdb +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\LoopsProject.genruntimeconfig.cache +E:\Projects\FS_College_Classwork\GDN1009-ITP-Backup\LoopsProject\LoopsProject\obj\Debug\net6.0\ref\LoopsProject.dll diff --git a/LoopsProject/LoopsProject/obj/LoopsProject.csproj.nuget.dgspec.json b/LoopsProject/LoopsProject/obj/LoopsProject.csproj.nuget.dgspec.json new file mode 100644 index 0000000..cec008a --- /dev/null +++ b/LoopsProject/LoopsProject/obj/LoopsProject.csproj.nuget.dgspec.json @@ -0,0 +1,65 @@ +{ + "format": 1, + "restore": { + "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\LoopsProject\\LoopsProject\\LoopsProject.csproj": {} + }, + "projects": { + "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\LoopsProject\\LoopsProject\\LoopsProject.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\LoopsProject\\LoopsProject\\LoopsProject.csproj", + "projectName": "LoopsProject", + "projectPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\LoopsProject\\LoopsProject\\LoopsProject.csproj", + "packagesPath": "C:\\Users\\randa\\.nuget\\packages\\", + "outputPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\LoopsProject\\LoopsProject\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\randa\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.302\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/LoopsProject/LoopsProject/obj/LoopsProject.csproj.nuget.g.props b/LoopsProject/LoopsProject/obj/LoopsProject.csproj.nuget.g.props new file mode 100644 index 0000000..4a2521c --- /dev/null +++ b/LoopsProject/LoopsProject/obj/LoopsProject.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\randa\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.2.1 + + + + + + \ No newline at end of file diff --git a/LoopsProject/LoopsProject/obj/LoopsProject.csproj.nuget.g.targets b/LoopsProject/LoopsProject/obj/LoopsProject.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/LoopsProject/LoopsProject/obj/LoopsProject.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/LoopsProject/LoopsProject/obj/project.assets.json b/LoopsProject/LoopsProject/obj/project.assets.json new file mode 100644 index 0000000..5dd14ba --- /dev/null +++ b/LoopsProject/LoopsProject/obj/project.assets.json @@ -0,0 +1,71 @@ +{ + "version": 3, + "targets": { + "net6.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net6.0": [] + }, + "packageFolders": { + "C:\\Users\\randa\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\LoopsProject\\LoopsProject\\LoopsProject.csproj", + "projectName": "LoopsProject", + "projectPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\LoopsProject\\LoopsProject\\LoopsProject.csproj", + "packagesPath": "C:\\Users\\randa\\.nuget\\packages\\", + "outputPath": "E:\\Projects\\FS_College_Classwork\\GDN1009-ITP-Backup\\LoopsProject\\LoopsProject\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\randa\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.302\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/RockPaperScissors/RockPaperScissors.sln b/RockPaperScissors/RockPaperScissors.sln new file mode 100644 index 0000000..94c2d29 --- /dev/null +++ b/RockPaperScissors/RockPaperScissors.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32210.238 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RockPaperScissors", "RockPaperScissors\RockPaperScissors.csproj", "{5CF3AD0B-48EF-46AB-A5AC-B387C8951830}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5CF3AD0B-48EF-46AB-A5AC-B387C8951830}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5CF3AD0B-48EF-46AB-A5AC-B387C8951830}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5CF3AD0B-48EF-46AB-A5AC-B387C8951830}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5CF3AD0B-48EF-46AB-A5AC-B387C8951830}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F76444DC-6901-46E5-B8A7-002D69B3C598} + EndGlobalSection +EndGlobal diff --git a/RockPaperScissors/RockPaperScissors/RockPaperScissors.cs b/RockPaperScissors/RockPaperScissors/RockPaperScissors.cs new file mode 100644 index 0000000..5d36898 --- /dev/null +++ b/RockPaperScissors/RockPaperScissors/RockPaperScissors.cs @@ -0,0 +1,144 @@ +Random rand = new Random(); + +int playerPoints = 0; +int computerPoints = 0; + +PlayRound(); +Console.WriteLine($"Current score is PC: {computerPoints} to Player: {playerPoints}"); +Console.WriteLine(); +PlayRound(); +Console.WriteLine($"Current score is PC: {computerPoints} to Player: {playerPoints}"); +Console.WriteLine(); +PlayRound(); +DetermineWinner(); + + +//computerPick +string GetRandomPick() +{ + int roll = rand.Next(3); + string computerPick = String.Empty; + if (roll == 0) + { + computerPick = "rock"; + } + else if (roll == 1) + { + computerPick = "paper"; + } + else if (roll == 2) + { + computerPick = "scissors"; + } + return computerPick; + +} + +//Player input validation +bool ValidatePick(string playerPick) +{ + if (playerPick == "rock" || playerPick == "paper" || playerPick == "scissors") + { + return true; + } + else + { + return false; + } +} + +//playerPick +string GetPlayerPick() +{ + Console.Write("Pick rock, paper, or scissors: "); + string userInput = Console.ReadLine(); + string playerPick = userInput.ToLower(); + if (ValidatePick(playerPick) == false) + { + Console.WriteLine("Exiting. Please restart and type, \"rock\", \"paper\", or, \"scissors\"."); + Environment.Exit(1); + } + + return playerPick; +} + +//Display each pick +void DisplayPicks(string playerChoice, string computerChoice) +{ + Console.WriteLine($"Player chose {playerChoice}."); + Console.WriteLine($"PC chose {computerChoice}."); +} + +//Scoring system 3 +void UpdateScore(string playerChoice, string computerChoice) +{ + computerChoice = computerChoice.ToLower(); + playerChoice = playerChoice.ToLower(); + + + if (computerChoice == playerChoice) + { + Console.WriteLine("Tie. No points awarded."); + } + else if ((computerChoice != playerChoice) && (computerChoice == "paper" && playerChoice == "rock")) + { + Console.WriteLine("Paper covers rock. Point for PC."); + computerPoints++; + } + else if ((computerChoice != playerChoice) && (computerChoice == "scissors" && playerChoice == "rock")) + { + Console.WriteLine("Rock smashes scissors. Point for player."); + playerPoints++; + } + else if ((computerChoice != playerChoice) && (computerChoice == "scissors" && playerChoice == "paper")) + { + Console.WriteLine("Scissors cut paper. Point for PC."); + computerPoints++; + } + else if ((computerChoice != playerChoice) && (computerChoice == "rock" && playerChoice == "paper")) + { + Console.WriteLine("Paper covers rock. Point for player."); + playerPoints++; + } + else if ((computerChoice != playerChoice) && (computerChoice == "paper" && playerChoice == "scissors")) + { + Console.WriteLine("Scissors cut paper. Point for player."); + playerPoints++; + } + else if ((computerChoice != playerChoice) && (computerChoice == "rock" && playerChoice == "scissors")) + { + Console.WriteLine("Rock smashes scissors. Point for PC."); + computerPoints++; + } + +} + +void PlayRound() +{ + string computerChoice = GetRandomPick(); + string playerChoice = GetPlayerPick(); + Console.WriteLine(); + DisplayPicks(playerChoice, computerChoice); + UpdateScore(playerChoice, computerChoice); + Console.WriteLine(); +} + +void DetermineWinner() +{ + Console.WriteLine("FINAL SCORE"); + Console.WriteLine($"Player Points: {playerPoints}"); + Console.WriteLine($"Computer Points: {computerPoints}"); + + if (playerPoints > computerPoints) + { + Console.WriteLine("PLAYER WINS!"); + } + else if (playerPoints < computerPoints) + { + Console.WriteLine("PC WINS!"); + } + else if (playerPoints == computerPoints) + { + Console.WriteLine("PLAYER AND PC HAVE TIED."); + } +} \ No newline at end of file diff --git a/RockPaperScissors/RockPaperScissors/RockPaperScissors.csproj b/RockPaperScissors/RockPaperScissors/RockPaperScissors.csproj new file mode 100644 index 0000000..74abf5c --- /dev/null +++ b/RockPaperScissors/RockPaperScissors/RockPaperScissors.csproj @@ -0,0 +1,10 @@ + + + + Exe + net6.0 + enable + enable + + +