Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion RepeatedEditsDemo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static void Main(string[] args)
List<double> fTemps = new List<double>();
List<double> cTemps = new List<double>();

//main method - marking to trigger a change
foreach (string s in args)
{
if (s != null)
Expand All @@ -39,7 +40,14 @@ static void Main(string[] args)
{
Console.WriteLine(MinTempInC(fTemps));
Console.WriteLine(MaxTempInC(fTemps));
Console.WriteLine(AveFTempInC(fTemps));
//TASK 1:
//On line 49 below
//write the result of AveFTempInC() method operating on the list of fTemps, to the console
//Follow the same pattern as in the lines of code above this comment (40,41)
//PLEASE THINK OUT LOUD,
//Tell us what you are doing on the keyboard and mouse, and what you're seeing onscreen
//Is what you are seeing helping/hindering you in your task?

}
if (cTemps.Count != 0)
{
Expand All @@ -64,6 +72,21 @@ static double MinTempInC(List<double> fTemps)
fMin = f;
}
}
// TASK 2 Start: Change the hardcoded Fahrenheit to Celsius conversion below
// to use FtoC(double fahrenheitTemp) function instead, throughout this file.
//
// For instance, the line below
//
// return (fMin - 32) * (5.0/9.0);
//
// will become
// return FtoC(fMin);
//
// NOTE: 1) The variable name differs in the severl other locations - it will not be fMin
// NOTE: 2) The FtoC function is already available directly in this class,
// so there is no need to worry about adding a using or reference, you can just call it
// directly
//

return (fMin - 32) * (5.0 / 9.0);
}
Expand Down
2 changes: 0 additions & 2 deletions RepeatedEditsDemo/RefactoringsDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
<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>
Expand Down