Skip to content

Commit

Permalink
Fix 165 & Upload 187
Browse files Browse the repository at this point in the history
Let Get It!
Added something to make it easier to add and do not add values to a optional para
  • Loading branch information
JonthueM committed Jul 6, 2020
1 parent e0dae36 commit b748177
Show file tree
Hide file tree
Showing 25 changed files with 245 additions and 7 deletions.
Binary file modified optionaInput/.vs/optionaInput/v16/.suo
Binary file not shown.
27 changes: 20 additions & 7 deletions optionaInput/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,27 @@ static void Main(string[] args)

//Prompt & Store
Console.WriteLine("Enter A Random Number!");
int randomNumber = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Just Press Enter!");
Console.ReadLine();
//int optionalValue = Convert.ToInt32(Console.ReadLine());
int ranNumOne = Convert.ToInt32(Console.ReadLine());
Console.WriteLine($"Would You Like To Enter A Second Number? Currently it is {ranNumOne} X 10. Please Type Y or N Below!");
string fate = Console.ReadLine();
int ranNumTwo;

if (fate == "Y")
{
Console.WriteLine("Please Enter A Second Random Number to replace 10 Below!");
ranNumTwo = Convert.ToInt32(Console.ReadLine());
Console.WriteLine($"You typed {ranNumOne} to be multplied by {ranNumTwo} and your results are:");
int results = optionalOperation.optionalOps(ranNumOne, ranNumTwo);
Console.WriteLine(results);
}
else
{
Console.WriteLine("Okie Dokie! The Results Are:");
int results = optionalOperation.optionalOps(ranNumOne);
Console.WriteLine(results);

//Passing, Receiving & Printing
int results = optionalOperation.optionalOps(randomNumber);
Console.WriteLine(results);
}


Console.ReadLine();

Expand Down
Binary file modified optionaInput/bin/Debug/optionaInput.exe
Binary file not shown.
Binary file modified optionaInput/bin/Debug/optionaInput.pdb
Binary file not shown.
Binary file not shown.
Binary file modified optionaInput/obj/Debug/optionaInput.exe
Binary file not shown.
Binary file modified optionaInput/obj/Debug/optionaInput.pdb
Binary file not shown.
Binary file modified step182-IQuit/.vs/step182-IQuit/v16/.suo
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions step187-OperatorOverload/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
38 changes: 38 additions & 0 deletions step187-OperatorOverload/Employee.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace step187_OperatorOverload
{
public class Employee : Person

{
public int ID { get; set; }
public override void SayName()
{
string fullName = $"{firstName} {lastName} ";
Console.WriteLine(fullName);
}
public static bool operator == (Employee employeeOne, Employee employeeTwo)
{
bool status = false;
if (employeeOne.ID == employeeTwo.ID)
{ status = true; }

return status;

}
public static bool operator != (Employee employeeOne, Employee employeeTwo)
{
bool status = false;
if(employeeOne.ID != employeeTwo.ID)
{ status = false; }
return status;
}



}
}
17 changes: 17 additions & 0 deletions step187-OperatorOverload/Person.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace step187_OperatorOverload
{
public abstract class Person
{

public string firstName { get; set; }
public string lastName { get; set; }

public abstract void SayName();
}
}
34 changes: 34 additions & 0 deletions step187-OperatorOverload/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace step187_OperatorOverload
{
class Program
{
static void Main(string[] args)
{
Employee hourlyOne = new Employee() {firstName = "Taco", lastName = "Bell", ID = 7171 };
Employee hourlyTwo = new Employee() { firstName = "Dunkin", lastName = "Donuts", ID = 7171 };
if (hourlyOne.ID == hourlyTwo.ID)
{
Console.WriteLine("OMG Their's a Match. I think we should alert the devs of this bug ASAP!");

}
else { Console.WriteLine("I told you that their isn't a problem with our system"); }

if (hourlyOne.ID == hourlyTwo.ID)
{
Console.WriteLine("I told you that their isn't a problem with our system");
}
else
{ Console.WriteLine("Don't rub it in!"); }

Console.ReadLine();


}
}
}
36 changes: 36 additions & 0 deletions step187-OperatorOverload/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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("step187-OperatorOverload")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("step187-OperatorOverload")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("6b71f002-e9d6-4ae6-ba67-4d87aff7648e")]

// 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")]
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
85134ea1eaf4b2828dea49e914c52e58a8dfa352
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
C:\Users\conne\OneDrive\Documents\GitHub\The-Tech-Academy-Basic-C-Sharp-Projects\step187-OperatorOverload\bin\Debug\step187-OperatorOverload.exe.config
C:\Users\conne\OneDrive\Documents\GitHub\The-Tech-Academy-Basic-C-Sharp-Projects\step187-OperatorOverload\bin\Debug\step187-OperatorOverload.exe
C:\Users\conne\OneDrive\Documents\GitHub\The-Tech-Academy-Basic-C-Sharp-Projects\step187-OperatorOverload\bin\Debug\step187-OperatorOverload.pdb
C:\Users\conne\OneDrive\Documents\GitHub\The-Tech-Academy-Basic-C-Sharp-Projects\step187-OperatorOverload\obj\Debug\step187-OperatorOverload.csprojAssemblyReference.cache
C:\Users\conne\OneDrive\Documents\GitHub\The-Tech-Academy-Basic-C-Sharp-Projects\step187-OperatorOverload\obj\Debug\step187-OperatorOverload.csproj.CoreCompileInputs.cache
C:\Users\conne\OneDrive\Documents\GitHub\The-Tech-Academy-Basic-C-Sharp-Projects\step187-OperatorOverload\obj\Debug\step187-OperatorOverload.exe
C:\Users\conne\OneDrive\Documents\GitHub\The-Tech-Academy-Basic-C-Sharp-Projects\step187-OperatorOverload\obj\Debug\step187-OperatorOverload.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
55 changes: 55 additions & 0 deletions step187-OperatorOverload/step187-OperatorOverload.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6B71F002-E9D6-4AE6-BA67-4D87AFF7648E}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>step187_OperatorOverload</RootNamespace>
<AssemblyName>step187-OperatorOverload</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Employee.cs" />
<Compile Include="Person.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
25 changes: 25 additions & 0 deletions step187-OperatorOverload/step187-OperatorOverload.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "step187-OperatorOverload", "step187-OperatorOverload.csproj", "{6B71F002-E9D6-4AE6-BA67-4D87AFF7648E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6B71F002-E9D6-4AE6-BA67-4D87AFF7648E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B71F002-E9D6-4AE6-BA67-4D87AFF7648E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B71F002-E9D6-4AE6-BA67-4D87AFF7648E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B71F002-E9D6-4AE6-BA67-4D87AFF7648E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AFA9FB44-A463-432B-908F-781A1342D0D5}
EndGlobalSection
EndGlobal

0 comments on commit b748177

Please sign in to comment.