ITP Code Backup

This commit is contained in:
2022-07-29 11:38:43 -04:00
parent ff0a64679e
commit d95fecb199
62 changed files with 1206 additions and 0 deletions

View File

@@ -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

View File

@@ -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}");
};

View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -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": ""
}
}
}

View File

@@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
}
}
}

View File

@@ -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"
}
}
}
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\randa\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.1</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\randa\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
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.

View File

@@ -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\

View File

@@ -0,0 +1,8 @@
// <auto-generated/>
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;

View File

@@ -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

View File

@@ -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"
}
}
}
}