From 297adf1eb15f6a264b343f1606ae8083a62271c2 Mon Sep 17 00:00:00 2001 From: uerbzr Date: Tue, 7 Jan 2025 12:35:55 +0000 Subject: [PATCH 1/3] finished exercise --- csharp-fundamentals-class-members.Main/Core.cs | 10 ++++++---- csharp-fundamentals-class-members.Test/CoreTests.cs | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/csharp-fundamentals-class-members.Main/Core.cs b/csharp-fundamentals-class-members.Main/Core.cs index 855e8da..81a6a6e 100644 --- a/csharp-fundamentals-class-members.Main/Core.cs +++ b/csharp-fundamentals-class-members.Main/Core.cs @@ -20,31 +20,33 @@ public class Core //TODO: 1. Create an integer member named age with a value of 32 - public int age = 33; + public int age = 33-1; //TODO: 2. Create a String member named firstName with a value of "Jane" + public string firstName { get; set; } = "Jane"; //TODO: 3. Create a boolean member named isProgrammer with a value of true + public bool isProgrammer = true; //TODO: 4. Change the value below so that the tests pass. Check the README.md file for instructions on // running and reading tests - public int firstNumber = 109; + public int firstNumber = 9182; //TODO: 5. Change the value below so that the tests pass - public string firstString = "Ruby is to Python what car is to carpet."; + public string firstString = "Java is to Javascript what car is to carpet."; //TODO: 6. Change the visibility below so that the tests pass - private bool isVisible = true; + public bool isVisible = true; } } diff --git a/csharp-fundamentals-class-members.Test/CoreTests.cs b/csharp-fundamentals-class-members.Test/CoreTests.cs index c28afdc..68e35a9 100644 --- a/csharp-fundamentals-class-members.Test/CoreTests.cs +++ b/csharp-fundamentals-class-members.Test/CoreTests.cs @@ -18,6 +18,7 @@ public void shouldBeAged32() { Core exercise = new Core(); Assert.AreEqual(32, exercise.age); + } [Test] From cd94a1592b518de852b0819162b27a59220c5b7e Mon Sep 17 00:00:00 2001 From: uerbzr Date: Tue, 5 Aug 2025 10:34:22 +0100 Subject: [PATCH 2/3] completed --- csharp-fundamentals-class-members.Main/Core.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/csharp-fundamentals-class-members.Main/Core.cs b/csharp-fundamentals-class-members.Main/Core.cs index 81a6a6e..1575c3b 100644 --- a/csharp-fundamentals-class-members.Main/Core.cs +++ b/csharp-fundamentals-class-members.Main/Core.cs @@ -17,6 +17,7 @@ public class Core // It has data type of int, which stands for integer. A numeric value. // Its name can be anything as long as that name isn't already in use. public int answerToTheUltimateQuestion = 42; + //nothing much //TODO: 1. Create an integer member named age with a value of 32 From fe4f360dc93dbf719df30e8b53d4fcb5765649c6 Mon Sep 17 00:00:00 2001 From: uerbzr Date: Tue, 5 Aug 2025 10:35:22 +0100 Subject: [PATCH 3/3] updated a comment --- csharp-fundamentals-class-members.Main/Core.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/csharp-fundamentals-class-members.Main/Core.cs b/csharp-fundamentals-class-members.Main/Core.cs index 1575c3b..8763e9d 100644 --- a/csharp-fundamentals-class-members.Main/Core.cs +++ b/csharp-fundamentals-class-members.Main/Core.cs @@ -18,7 +18,11 @@ public class Core // Its name can be anything as long as that name isn't already in use. public int answerToTheUltimateQuestion = 42; //nothing much - + //another comment + /* a multi + * line + comment + */ //TODO: 1. Create an integer member named age with a value of 32 public int age = 33-1;