From 993ca505bd2ff4be5dd1c1d280188460b4aa5323 Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Tue, 7 Jul 2020 14:08:11 -0700 Subject: [PATCH 01/10] Starting point for study --- RepeatedEditsDemo/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index 9cd40c4..c6fa763 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -39,7 +39,8 @@ static void Main(string[] args) { Console.WriteLine(MinTempInC(fTemps)); Console.WriteLine(MaxTempInC(fTemps)); - Console.WriteLine(AveFTempInC(fTemps)); + //TASK 1: write the result of AveTempInC to the console + } if (cTemps.Count != 0) { @@ -64,7 +65,7 @@ static double MinTempInC(List fTemps) fMin = f; } } - + //TASK 2 Start: get rid of the hardcoded Fahrenheit to Celsius conversion and use FtoC function instead, throughout this file. return (fMin - 32) * (5.0 / 9.0); } private static double MinTempInF(List cTemps) From c745e8ba14cdc1d398fe2ae8249d71bda214f2c9 Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Tue, 7 Jul 2020 14:08:50 -0700 Subject: [PATCH 02/10] starting point --- RepeatedEditsDemo/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index c6fa763..ffc3655 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -65,7 +65,7 @@ static double MinTempInC(List fTemps) fMin = f; } } - //TASK 2 Start: get rid of the hardcoded Fahrenheit to Celsius conversion and use FtoC function instead, throughout this file. + //TASK 2 Start: Change the hardcoded Fahrenheit to Celsius conversion and use FtoC function instead, throughout this file. return (fMin - 32) * (5.0 / 9.0); } private static double MinTempInF(List cTemps) From 53aaaeac4ad1758a16b839e3ea10d98d0e38eb0d Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Tue, 7 Jul 2020 14:36:48 -0700 Subject: [PATCH 03/10] Added tip --- RepeatedEditsDemo/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index ffc3655..906827a 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -40,7 +40,8 @@ static void Main(string[] args) Console.WriteLine(MinTempInC(fTemps)); Console.WriteLine(MaxTempInC(fTemps)); //TASK 1: write the result of AveTempInC to the console - + //THINK OUT LOUD, tell us what you are doing on the keyboard and mouse, and what you're seeing + } if (cTemps.Count != 0) { From 0655d04e601313039206080275178839bf54839f Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Thu, 9 Jul 2020 08:53:56 -0700 Subject: [PATCH 04/10] Instructions improved --- RepeatedEditsDemo/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index 906827a..5226c57 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -66,7 +66,8 @@ static double MinTempInC(List fTemps) fMin = f; } } - //TASK 2 Start: Change the hardcoded Fahrenheit to Celsius conversion and use FtoC function instead, throughout this file. + //TASK 2 Start: Change the hardcoded Fahrenheit to Celsius conversion and use FtoC(double fahrenheitTemp) function instead, throughout this file. + //The FtoC function is already available in this class, no need to worry about adding a using or reference return (fMin - 32) * (5.0 / 9.0); } private static double MinTempInF(List cTemps) From a82899a87e3abcf2149d83c1913a22f94bba6515 Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Thu, 9 Jul 2020 08:56:51 -0700 Subject: [PATCH 05/10] More improvement in instructions --- RepeatedEditsDemo/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index 5226c57..a0118a7 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -39,9 +39,9 @@ static void Main(string[] args) { Console.WriteLine(MinTempInC(fTemps)); Console.WriteLine(MaxTempInC(fTemps)); - //TASK 1: write the result of AveTempInC to the console + //TASK 1: write the result of AveTempInC() method on the list of fTemps to the console //THINK OUT LOUD, tell us what you are doing on the keyboard and mouse, and what you're seeing - + } if (cTemps.Count != 0) { From 901c900e494d76577c2cf84892e5a71e1cf77148 Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Thu, 9 Jul 2020 12:59:40 -0700 Subject: [PATCH 06/10] Correcting instruction --- RepeatedEditsDemo/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index a0118a7..9ae74b4 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -39,7 +39,7 @@ static void Main(string[] args) { Console.WriteLine(MinTempInC(fTemps)); Console.WriteLine(MaxTempInC(fTemps)); - //TASK 1: write the result of AveTempInC() method on the list of fTemps to the console + //TASK 1: write the result of AveFTempInC() method on the list of fTemps to the console //THINK OUT LOUD, tell us what you are doing on the keyboard and mouse, and what you're seeing } From fb48e1519f1b3aada24bb25c078c369724d7ba03 Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Thu, 9 Jul 2020 13:13:58 -0700 Subject: [PATCH 07/10] improved instructions --- RepeatedEditsDemo/Program.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index 9ae74b4..885a816 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -40,7 +40,9 @@ static void Main(string[] args) Console.WriteLine(MinTempInC(fTemps)); Console.WriteLine(MaxTempInC(fTemps)); //TASK 1: write the result of AveFTempInC() method on the list of fTemps to the console - //THINK OUT LOUD, tell us what you are doing on the keyboard and mouse, and what you're seeing + //following the same pattern as in the lines of code above this comment + //THINK OUT LOUD, + //tell us what you are doing on the keyboard and mouse, and what you're seeing onscreen } if (cTemps.Count != 0) @@ -66,8 +68,12 @@ static double MinTempInC(List fTemps) fMin = f; } } - //TASK 2 Start: Change the hardcoded Fahrenheit to Celsius conversion and use FtoC(double fahrenheitTemp) function instead, throughout this file. - //The FtoC function is already available in this class, no need to worry about adding a using or reference + //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 will become return FtoC(fMin) instead of return (fMin - 32) * (5.0/9.0); + //NOTE: 1) The variable name differs in the other locations + //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 return (fMin - 32) * (5.0 / 9.0); } private static double MinTempInF(List cTemps) From 0e169c0d967f273082489ee0eb85a2a2820478a9 Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Thu, 9 Jul 2020 13:49:49 -0700 Subject: [PATCH 08/10] Improved instructions --- RepeatedEditsDemo/Program.cs | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index 885a816..7edd990 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -39,10 +39,11 @@ static void Main(string[] args) { Console.WriteLine(MinTempInC(fTemps)); Console.WriteLine(MaxTempInC(fTemps)); - //TASK 1: write the result of AveFTempInC() method on the list of fTemps to the console - //following the same pattern as in the lines of code above this comment + //TASK 1: + //Write the result of AveFTempInC() method on the list of fTemps to the console + //Follow the same pattern as in the lines of code above this comment //THINK OUT LOUD, - //tell us what you are doing on the keyboard and mouse, and what you're seeing onscreen + //Tell us what you are doing on the keyboard and mouse, and what you're seeing onscreen } if (cTemps.Count != 0) @@ -68,12 +69,22 @@ static double MinTempInC(List 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 will become return FtoC(fMin) instead of return (fMin - 32) * (5.0/9.0); - //NOTE: 1) The variable name differs in the other locations - //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 + // 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); } private static double MinTempInF(List cTemps) From 58542647965be8471272338f2e5ecae06765050c Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Thu, 16 Jul 2020 13:49:23 -0700 Subject: [PATCH 09/10] Fixed up prompt --- RepeatedEditsDemo/Program.cs | 10 ++++++---- RepeatedEditsDemo/RefactoringsDemo.csproj | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index 7edd990..d21e00d 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -40,11 +40,13 @@ static void Main(string[] args) Console.WriteLine(MinTempInC(fTemps)); Console.WriteLine(MaxTempInC(fTemps)); //TASK 1: - //Write the result of AveFTempInC() method on the list of fTemps to the console - //Follow the same pattern as in the lines of code above this comment - //THINK OUT LOUD, + //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) { diff --git a/RepeatedEditsDemo/RefactoringsDemo.csproj b/RepeatedEditsDemo/RefactoringsDemo.csproj index 5ce737e..b312a07 100644 --- a/RepeatedEditsDemo/RefactoringsDemo.csproj +++ b/RepeatedEditsDemo/RefactoringsDemo.csproj @@ -36,9 +36,7 @@ - - From 221b356e269d72ce91f207b50e8eedb598d4fa40 Mon Sep 17 00:00:00 2001 From: Mark Wilson-Thomas Date: Wed, 24 Aug 2022 14:03:40 -0700 Subject: [PATCH 10/10] Small change to program.cs --- RepeatedEditsDemo/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/RepeatedEditsDemo/Program.cs b/RepeatedEditsDemo/Program.cs index d21e00d..a23ceb8 100644 --- a/RepeatedEditsDemo/Program.cs +++ b/RepeatedEditsDemo/Program.cs @@ -13,6 +13,7 @@ static void Main(string[] args) List fTemps = new List(); List cTemps = new List(); + //main method - marking to trigger a change foreach (string s in args) { if (s != null)