diff --git a/Batch25-polymorphism b/Batch25-polymorphism new file mode 100644 index 0000000..e033346 --- /dev/null +++ b/Batch25-polymorphism @@ -0,0 +1,3 @@ +Comment + +The student showed good understanding of the principle diff --git a/Batch25/Assignments/Polymorphism Assignment.txt b/Batch25/Assignments/Polymorphism Assignment.txt new file mode 100644 index 0000000..3193e7b --- /dev/null +++ b/Batch25/Assignments/Polymorphism Assignment.txt @@ -0,0 +1,2 @@ + //Polymorphism Assignment + //Define a parent class with three methods. define another class, a child class to inherit the parent class. implement method overloading, overiding and hiding on each of the methods. \ No newline at end of file diff --git a/Batch25/Comments/Comment.txt b/Batch25/Comments/Comment.txt new file mode 100644 index 0000000..e033346 --- /dev/null +++ b/Batch25/Comments/Comment.txt @@ -0,0 +1,3 @@ +Comment + +The student showed good understanding of the principle diff --git a/Batch25/LessonMaterials/List/.vs/List/DesignTimeBuild/.dtbcache.v2 b/Batch25/LessonMaterials/List/.vs/List/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..9efab4b Binary files /dev/null and b/Batch25/LessonMaterials/List/.vs/List/DesignTimeBuild/.dtbcache.v2 differ diff --git a/Batch25/LessonMaterials/List/.vs/List/FileContentIndex/36102348-8ac2-4629-b62a-5b959a353324.vsidx b/Batch25/LessonMaterials/List/.vs/List/FileContentIndex/36102348-8ac2-4629-b62a-5b959a353324.vsidx new file mode 100644 index 0000000..7a2dfc3 Binary files /dev/null and b/Batch25/LessonMaterials/List/.vs/List/FileContentIndex/36102348-8ac2-4629-b62a-5b959a353324.vsidx differ diff --git a/Batch25/LessonMaterials/List/.vs/List/FileContentIndex/a3a034c8-39d0-497d-8472-cacfbbe6b8cc.vsidx b/Batch25/LessonMaterials/List/.vs/List/FileContentIndex/a3a034c8-39d0-497d-8472-cacfbbe6b8cc.vsidx new file mode 100644 index 0000000..05878c7 Binary files /dev/null and b/Batch25/LessonMaterials/List/.vs/List/FileContentIndex/a3a034c8-39d0-497d-8472-cacfbbe6b8cc.vsidx differ diff --git a/Batch25/LessonMaterials/List/.vs/List/v17/.futdcache.v2 b/Batch25/LessonMaterials/List/.vs/List/v17/.futdcache.v2 new file mode 100644 index 0000000..fa06d22 Binary files /dev/null and b/Batch25/LessonMaterials/List/.vs/List/v17/.futdcache.v2 differ diff --git a/Batch25/LessonMaterials/List/.vs/List/v17/.suo b/Batch25/LessonMaterials/List/.vs/List/v17/.suo new file mode 100644 index 0000000..c2531e5 Binary files /dev/null and b/Batch25/LessonMaterials/List/.vs/List/v17/.suo differ diff --git a/Batch25/LessonMaterials/List/.vs/List/v17/DocumentLayout.backup.json b/Batch25/LessonMaterials/List/.vs/List/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..73f01d9 --- /dev/null +++ b/Batch25/LessonMaterials/List/.vs/List/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\DADA\\Desktop\\List\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}|List.csproj|c:\\users\\dada\\desktop\\list\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}|List.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\DADA\\Desktop\\List\\Program.cs", + "RelativeDocumentMoniker": "Program.cs", + "ToolTip": "C:\\Users\\DADA\\Desktop\\List\\Program.cs*", + "RelativeToolTip": "Program.cs*", + "ViewState": "AgIAAKoAAAAAAAAAAAAAALcAAAATAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-13T10:19:58.284Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Batch25/LessonMaterials/List/.vs/List/v17/DocumentLayout.json b/Batch25/LessonMaterials/List/.vs/List/v17/DocumentLayout.json new file mode 100644 index 0000000..ec63a5f --- /dev/null +++ b/Batch25/LessonMaterials/List/.vs/List/v17/DocumentLayout.json @@ -0,0 +1,71 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\DADA\\Desktop\\List\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}|List.csproj|c:\\users\\dada\\desktop\\list\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}|List.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}|List.csproj|c:\\users\\dada\\desktop\\list\\assesment.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}|List.csproj|solutionrelative:assesment.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}|List.csproj|c:\\users\\dada\\desktop\\list\\list.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}|List.csproj|solutionrelative:list.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 2, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "Assesment.cs", + "DocumentMoniker": "C:\\Users\\DADA\\Desktop\\List\\Assesment.cs", + "RelativeDocumentMoniker": "Assesment.cs", + "ToolTip": "C:\\Users\\DADA\\Desktop\\List\\Assesment.cs", + "RelativeToolTip": "Assesment.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-16T08:24:32.308Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "List", + "DocumentMoniker": "C:\\Users\\DADA\\Desktop\\List\\List.csproj", + "RelativeDocumentMoniker": "List.csproj", + "ToolTip": "C:\\Users\\DADA\\Desktop\\List\\List.csproj", + "RelativeToolTip": "List.csproj", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2025-01-16T08:24:02.307Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\DADA\\Desktop\\List\\Program.cs", + "RelativeDocumentMoniker": "Program.cs", + "ToolTip": "C:\\Users\\DADA\\Desktop\\List\\Program.cs", + "RelativeToolTip": "Program.cs", + "ViewState": "AgIAAH4AAAAAAAAAAAAAAAQAAABxAQAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-13T10:19:58.284Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Batch25/LessonMaterials/List/.vs/ProjectEvaluation/list.metadata.v9.bin b/Batch25/LessonMaterials/List/.vs/ProjectEvaluation/list.metadata.v9.bin new file mode 100644 index 0000000..5409658 Binary files /dev/null and b/Batch25/LessonMaterials/List/.vs/ProjectEvaluation/list.metadata.v9.bin differ diff --git a/Batch25/LessonMaterials/List/.vs/ProjectEvaluation/list.projects.v9.bin b/Batch25/LessonMaterials/List/.vs/ProjectEvaluation/list.projects.v9.bin new file mode 100644 index 0000000..f3d33e8 Binary files /dev/null and b/Batch25/LessonMaterials/List/.vs/ProjectEvaluation/list.projects.v9.bin differ diff --git a/Batch25/LessonMaterials/List/.vs/ProjectEvaluation/list.strings.v9.bin b/Batch25/LessonMaterials/List/.vs/ProjectEvaluation/list.strings.v9.bin new file mode 100644 index 0000000..1a8f172 Binary files /dev/null and b/Batch25/LessonMaterials/List/.vs/ProjectEvaluation/list.strings.v9.bin differ diff --git a/Batch25/LessonMaterials/List/Assesment.cs b/Batch25/LessonMaterials/List/Assesment.cs new file mode 100644 index 0000000..4b09767 --- /dev/null +++ b/Batch25/LessonMaterials/List/Assesment.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace List +{ + internal class Assesment + { + } +} diff --git a/Batch25/LessonMaterials/List/List.csproj b/Batch25/LessonMaterials/List/List.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/Batch25/LessonMaterials/List/List.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/Batch25/LessonMaterials/List/List.sln b/Batch25/LessonMaterials/List/List.sln new file mode 100644 index 0000000..dd89ce6 --- /dev/null +++ b/Batch25/LessonMaterials/List/List.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35506.116 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "List", "List.csproj", "{2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D8DC066-ADA7-4722-A4AD-270C2BE4C12C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Batch25/LessonMaterials/List/Program.cs b/Batch25/LessonMaterials/List/Program.cs new file mode 100644 index 0000000..f1d4dac --- /dev/null +++ b/Batch25/LessonMaterials/List/Program.cs @@ -0,0 +1,199 @@ +// See https://aka.ms/new-console-template for more information +Console.WriteLine("Hello, World!"); + +//What is Generic List Collection in C#? +//The Generic List in C# is a Collection Class that belongs to System.Collections.Generic namespace. This Generic List Collection Class represents a strongly typed list of objects which can be accessed by using the integer index which is starting from 0. It also provides lots of methods that can be used for searching, sorting, and manipulating the list of items + +//For example, Adding Elements using Add Method of the List Class. As you can see in the below code while creating the Generic List collection instance, we are specifying the type parameter as a string and this allows the collection to store elements of string type only. In this case, the element will be added at the end of the collection. + +//List variableName = new List(); + +List countries = new List(); + +countries.Add("India"); +countries.Add("Srilanka"); +countries.Add("Nigeria"); + +// using object initializer + +List names = new List +{ + "Ade", + "Chuckwu", + "Danjuma" +}; + +/*Console.WriteLine(countries[0]); +Console.WriteLine(countries[1]); +Console.WriteLine(countries[2]);*/ + +//using foreach loop +/*foreach (string country in countries) +{ + Console.WriteLine(country); +}*/ + +//using for loop +/*for (int i = 0; i < names.Count; i++) +{ + Console.WriteLine(names[i]); +}*/ + +/*List numbers = new List(); + +numbers.Add(1); +numbers.Add(2); +numbers.Add(3); +numbers.Add(4); +numbers.Add(5);*/ + +/*List numbers = new List +{ + 1, + 2, + 3, + 4, + 5 +};*/ + +List numbers = new List {1,2,3,4,5 }; + +/*Console.WriteLine(numbers[0]); +Console.WriteLine(numbers[1]); +Console.WriteLine(numbers[2]);*/ + +/* +foreach (int number in numbers) +{ + Console.WriteLine(number); +}*/ + +/*for(int i = 0; i < numbers.Count; i++) +{ + Console.WriteLine(numbers[i]); +}*/ + +//Creating Another Generic List Collection of String Type +/*string[] nations = { "Colombia", "Mexico", "Algeria" }; + +List newCountries = new List(nations);*/ + +List newCountries = new List(); + +//Adding Elements using Add Method +newCountries.Add("JAPAN"); +newCountries.Add("UK"); + +//Adding the newCountries collection into countries collection using AddRange Method +countries.AddRange(newCountries); + +Console.WriteLine($"the total number of countries is now {countries.Count}"); + +foreach(string country in countries) +{ + Console.WriteLine(country); +} + +//Insert(int index, T item): This method is used to insert an element into the Generic List at the specified index. Here, the parameter index specifies the zero-based index at which an item should be inserted and the parameter item specifies the object to insert. The value can be null for reference types. If the index is less than 0 or the index is greater than Generic List Count, then it will throw ArgumentOutOfRangeException. + +//InsertRange(int index, IEnumerable collection): This method is used to insert the elements of a collection into the Generic List at the specified index. Here, the parameter index specifies the zero-based index at which an item should be inserted. The parameter collection specifies the collection whose elements should be inserted into the Generic List. The collection itself cannot be null, but it can contain elements that are null if type T is a reference type. If the collection is null, then it will throw ArgumentNullException. If the index is less than 0 or the index is greater than Generic List Count, then it will throw ArgumentOutOfRangeEx + +//inserting single element +/*List states = new List { "Lagos", "Abuja", "Port-Harcourt" }; +Console.WriteLine($" The initial count is {states.Count}"); + +states.Insert(0, "Ogun"); + +Console.WriteLine($"The current count is {states.Count}"); + +for(int i = 0; i < states.Count; i++) +{ + Console.WriteLine(states[i]); +} + +//Adding multiple states +List newstates = new List { "Abia", "Bauchi", "Calabar" }; + +states.InsertRange(0, newstates); + +Console.WriteLine($"After adding range of states, The current count is {states.Count}"); + +foreach(string state in states) +{ + Console.WriteLine(state); +}*/ + +// How to Check the Availability of an Element in a List Collection in C#? +//If you want to check whether an element exists or not in the Generic List Collection, then you need to use the following Contains method of the Generic List Collection Class in C#. + +//Contains(T item): The Contains(T item) method of the Generic List Collection Class is used to check if the given item is present in the List or not. The parameter item specifies the object to locate in the Generic List. The value can be null for reference types. It returns true if the item is found in the Generic List; otherwise, false. + +/*List nums = new List(); + +nums.Add(1); +nums.Add(2); +nums.Add(3); +nums.Add(4); +nums.Add(5); + +bool result = nums.Contains(1); +Console.WriteLine(result); + +bool result1 = nums.Contains(6); +Console.WriteLine(result1); + +bool result2 = nums.Contains(87); + +if (result2 == true) +{ + nums.Remove(5); + Console.WriteLine("The element has been removed successfully"); +} +else +{ + Console.WriteLine("The element does not exist in the collection"); +}*/ + + +// using RemoveAt +List values = new List { 2, 4, 5, 2, 6, 7, 2, 9, 0 }; +values.RemoveAt(0); // specify the index of the element to be removed + +//Using RemoveAll + +//Remove all element 2 + +values.RemoveAll(x => x == 2); + +for (int i = 0; i < values.Count; i++) +{ + if (values[i] == 2) + { + values.Remove(values[i]); + } +} + +foreach (int i in values) +{ + Console.WriteLine(i); +} +values.Clear(); // Removes everthing int the collection + +//Summary of Generic List Collection Class in C#: +//The List collection is different from the arrays. The List can be resized dynamically but arrays cannot resize dynamically. + +//The Generic List Collection Class in C# can accept null values for reference types and it also accepts duplicate values. + +//When the element’s Count becomes equal to the Capacity of the list collection, then the capacity of the List increased automatically by reallocating the internal array. The existing elements will be copied to the new array before the addition of the new element. + +//The Generic List class is the generic equivalent of the Non-Generic ArrayList class. + +//The Generic List class implements the IList generic interface. + +//We can use both equality and ordering comparer with the generic List class. + +//The List class elements are not sorted by default and elements are accessed by a zero-based index. + +//For very large List objects, you can increase the maximum capacity to 2 billion elements on a 64-bit system by setting the enabled attribute of the configuration element to true in the run-time environment. + + diff --git a/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.deps.json b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.deps.json new file mode 100644 index 0000000..e1e192b --- /dev/null +++ b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v8.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v8.0": { + "List/1.0.0": { + "runtime": { + "List.dll": {} + } + } + } + }, + "libraries": { + "List/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.dll b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.dll new file mode 100644 index 0000000..f98fbe1 Binary files /dev/null and b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.dll differ diff --git a/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.exe b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.exe new file mode 100644 index 0000000..9063e3c Binary files /dev/null and b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.exe differ diff --git a/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.pdb b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.pdb new file mode 100644 index 0000000..8bf06a7 Binary files /dev/null and b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.pdb differ diff --git a/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.runtimeconfig.json b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.runtimeconfig.json new file mode 100644 index 0000000..becfaea --- /dev/null +++ b/Batch25/LessonMaterials/List/bin/Debug/net8.0/List.runtimeconfig.json @@ -0,0 +1,12 @@ +{ + "runtimeOptions": { + "tfm": "net8.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "8.0.0" + }, + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false + } + } +} \ No newline at end of file diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/Batch25/LessonMaterials/List/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs new file mode 100644 index 0000000..2217181 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.AssemblyInfo.cs b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.AssemblyInfo.cs new file mode 100644 index 0000000..2c924ce --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("List")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5398e281fb84437e72ad236f0a45d02d0fd7aa7c")] +[assembly: System.Reflection.AssemblyProductAttribute("List")] +[assembly: System.Reflection.AssemblyTitleAttribute("List")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.AssemblyInfoInputs.cache b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.AssemblyInfoInputs.cache new file mode 100644 index 0000000..bae2939 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +60a1715ee0cc9cc754dbc4aee2f526cf91c7e663b0236b81899a2ddca59d2e27 diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.GeneratedMSBuildEditorConfig.editorconfig b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..ecfdee4 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net8.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = List +build_property.ProjectDir = C:\Users\DADA\Desktop\CLHRepo\InstructorsFilesAndReports\Batch25\LessonMaterials\List\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 8.0 +build_property.EnableCodeStyleSeverity = diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.GlobalUsings.g.cs b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +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; diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.assets.cache b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.assets.cache new file mode 100644 index 0000000..9dcd7e9 Binary files /dev/null and b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.assets.cache differ diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.csproj.BuildWithSkipAnalyzers b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.csproj.CoreCompileInputs.cache b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..38fc8d2 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +eb92231571bb3a85e28d0a5120cd4a42c42ae4c6c9a1eb5f5efb3e2c2234be28 diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.csproj.FileListAbsolute.txt b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..911edcb --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +C:\Users\DADA\Desktop\List\bin\Debug\net8.0\List.exe +C:\Users\DADA\Desktop\List\bin\Debug\net8.0\List.deps.json +C:\Users\DADA\Desktop\List\bin\Debug\net8.0\List.runtimeconfig.json +C:\Users\DADA\Desktop\List\bin\Debug\net8.0\List.dll +C:\Users\DADA\Desktop\List\bin\Debug\net8.0\List.pdb +C:\Users\DADA\Desktop\List\obj\Debug\net8.0\List.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\DADA\Desktop\List\obj\Debug\net8.0\List.AssemblyInfoInputs.cache +C:\Users\DADA\Desktop\List\obj\Debug\net8.0\List.AssemblyInfo.cs +C:\Users\DADA\Desktop\List\obj\Debug\net8.0\List.csproj.CoreCompileInputs.cache +C:\Users\DADA\Desktop\List\obj\Debug\net8.0\List.dll +C:\Users\DADA\Desktop\List\obj\Debug\net8.0\refint\List.dll +C:\Users\DADA\Desktop\List\obj\Debug\net8.0\List.pdb +C:\Users\DADA\Desktop\List\obj\Debug\net8.0\List.genruntimeconfig.cache +C:\Users\DADA\Desktop\List\obj\Debug\net8.0\ref\List.dll diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.dll b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.dll new file mode 100644 index 0000000..f98fbe1 Binary files /dev/null and b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.dll differ diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.genruntimeconfig.cache b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.genruntimeconfig.cache new file mode 100644 index 0000000..01a538c --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.genruntimeconfig.cache @@ -0,0 +1 @@ +6cc731df94d867b7b4f445849ea1985ee5ea57cc879b1553559e56223621bea9 diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.pdb b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.pdb new file mode 100644 index 0000000..8bf06a7 Binary files /dev/null and b/Batch25/LessonMaterials/List/obj/Debug/net8.0/List.pdb differ diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/apphost.exe b/Batch25/LessonMaterials/List/obj/Debug/net8.0/apphost.exe new file mode 100644 index 0000000..9063e3c Binary files /dev/null and b/Batch25/LessonMaterials/List/obj/Debug/net8.0/apphost.exe differ diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/ref/List.dll b/Batch25/LessonMaterials/List/obj/Debug/net8.0/ref/List.dll new file mode 100644 index 0000000..0cedff7 Binary files /dev/null and b/Batch25/LessonMaterials/List/obj/Debug/net8.0/ref/List.dll differ diff --git a/Batch25/LessonMaterials/List/obj/Debug/net8.0/refint/List.dll b/Batch25/LessonMaterials/List/obj/Debug/net8.0/refint/List.dll new file mode 100644 index 0000000..0cedff7 Binary files /dev/null and b/Batch25/LessonMaterials/List/obj/Debug/net8.0/refint/List.dll differ diff --git a/Batch25/LessonMaterials/List/obj/List.csproj.nuget.dgspec.json b/Batch25/LessonMaterials/List/obj/List.csproj.nuget.dgspec.json new file mode 100644 index 0000000..c88d6ef --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/List.csproj.nuget.dgspec.json @@ -0,0 +1,73 @@ +{ + "format": 1, + "restore": { + "C:\\Users\\DADA\\Desktop\\List\\List.csproj": {} + }, + "projects": { + "C:\\Users\\DADA\\Desktop\\List\\List.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\DADA\\Desktop\\List\\List.csproj", + "projectName": "List", + "projectPath": "C:\\Users\\DADA\\Desktop\\List\\List.csproj", + "packagesPath": "C:\\Users\\DADA\\.nuget\\packages\\", + "outputPath": "C:\\Users\\DADA\\Desktop\\List\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\DADA\\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": [ + "net8.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/Batch25/LessonMaterials/List/obj/List.csproj.nuget.g.props b/Batch25/LessonMaterials/List/obj/List.csproj.nuget.g.props new file mode 100644 index 0000000..19835a0 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/List.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\DADA\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.12.1 + + + + + + \ No newline at end of file diff --git a/Batch25/LessonMaterials/List/obj/List.csproj.nuget.g.targets b/Batch25/LessonMaterials/List/obj/List.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/List.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Batch25/LessonMaterials/List/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/Batch25/LessonMaterials/List/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs new file mode 100644 index 0000000..2217181 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] diff --git a/Batch25/LessonMaterials/List/obj/Release/net8.0/List.AssemblyInfo.cs b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.AssemblyInfo.cs new file mode 100644 index 0000000..9a77f26 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("List")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5398e281fb84437e72ad236f0a45d02d0fd7aa7c")] +[assembly: System.Reflection.AssemblyProductAttribute("List")] +[assembly: System.Reflection.AssemblyTitleAttribute("List")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/Batch25/LessonMaterials/List/obj/Release/net8.0/List.AssemblyInfoInputs.cache b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.AssemblyInfoInputs.cache new file mode 100644 index 0000000..5200da1 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +532214174265b98bf18796a6c6f7e506cda1de7b78f4fe714f0696c58a00585b diff --git a/Batch25/LessonMaterials/List/obj/Release/net8.0/List.GeneratedMSBuildEditorConfig.editorconfig b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..ecfdee4 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net8.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = List +build_property.ProjectDir = C:\Users\DADA\Desktop\CLHRepo\InstructorsFilesAndReports\Batch25\LessonMaterials\List\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 8.0 +build_property.EnableCodeStyleSeverity = diff --git a/Batch25/LessonMaterials/List/obj/Release/net8.0/List.GlobalUsings.g.cs b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +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; diff --git a/Batch25/LessonMaterials/List/obj/Release/net8.0/List.assets.cache b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.assets.cache new file mode 100644 index 0000000..3864aa5 Binary files /dev/null and b/Batch25/LessonMaterials/List/obj/Release/net8.0/List.assets.cache differ diff --git a/Batch25/LessonMaterials/List/obj/project.assets.json b/Batch25/LessonMaterials/List/obj/project.assets.json new file mode 100644 index 0000000..00e3c7a --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/project.assets.json @@ -0,0 +1,79 @@ +{ + "version": 3, + "targets": { + "net8.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net8.0": [] + }, + "packageFolders": { + "C:\\Users\\DADA\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\DADA\\Desktop\\List\\List.csproj", + "projectName": "List", + "projectPath": "C:\\Users\\DADA\\Desktop\\List\\List.csproj", + "packagesPath": "C:\\Users\\DADA\\.nuget\\packages\\", + "outputPath": "C:\\Users\\DADA\\Desktop\\List\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\DADA\\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": [ + "net8.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/Batch25/LessonMaterials/List/obj/project.nuget.cache b/Batch25/LessonMaterials/List/obj/project.nuget.cache new file mode 100644 index 0000000..136a906 --- /dev/null +++ b/Batch25/LessonMaterials/List/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "QCakTmbKYr4=", + "success": true, + "projectFilePath": "C:\\Users\\DADA\\Desktop\\List\\List.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file diff --git a/Batch25/LessonMaterials/Polymorphism.txt b/Batch25/LessonMaterials/Polymorphism.txt new file mode 100644 index 0000000..84562eb --- /dev/null +++ b/Batch25/LessonMaterials/Polymorphism.txt @@ -0,0 +1,125 @@ +Polymorphism + +Outline of our discussion on the topic + +What is polymorphism +Polymorphism in object-oriented programming (OOP) refers to the ability of objects to take on "many forms", allowing methods or functions to operate on objects of different types through a unified interface. It enables flexibility and modularity in code by letting you interact with objects based on their common parent class or interface, rather than their specific concrete types. There are two primary types of polymorphism + +1. Compile-Time Polymorphism (Static/Overloading) +Resolved during compile time based on method signatures (name + parameters). +Example: Method OverLoading + +2. Runtime Polymorphism (Dynamic/Overriding) +Resolved during runtime based on the actual object type. +Example: Method Overriding + + +// Why overload a method in a class +// how to implement a method to be overloaded in parent class +// How to imlement overload a method in a child class + +// Why override a method in a class +// how to implement a method to be overided in parent class +// How to implement overide a method in a child class + +// Why hiding a method in a class +// how to implement a method to be hiden in parent class +// How to hide a method in a child class + +//we defined a parent and child class +//we implemented method overload, overiding and hiding + +Child child = new Child("Ade", "Chuckwu", "Danjuma", "Abuja", 1990); +child.Snour(); // the can only have access to the overidden method in his class +child.GetAge(); +Child.Eat(); // this is the inherited method, the can still have access to the inherited method after overlaoding it + +Console.WriteLine("How many times do you eat daily"); +int input = int.Parse(Console.ReadLine()); + +Child.Eat(input); //this is the inherited method that is overloaded +Child.Sleeping(); +Child.Walking(); +child.PrintDetails(); +public class Father +{ + public string SurName { get; set; } + public string StateOfOrigin { get; set; } + + public Father(string surName, string stateOfOrigin) + { + SurName = surName; + StateOfOrigin = stateOfOrigin; + } + + public static void Walking() // This cannot be overidden but it can be overlaoded and hide + { + Console.WriteLine("I walk slowly"); + } + + private static void Reading() // this is a private, it cannot be inherited and we cannot set it as virtual becauuse it is limited this calss + { + Console.WriteLine("I read everyday"); + } + + public virtual void Snour() // this is a virtual method to be overided + { + Console.WriteLine("I snour loudly"); + } + + public static void Eat() // this is a none virtual method to be overloaded + { + Console.WriteLine("I eat once daily"); + } + + public static void Sleeping() // this is a none virtual method to be hiden + { + Console.WriteLine("I sleep early"); + } + +} + +public class Child : Father +{ + public string FirstName { get; set; } + public string MiddleName { get; set; } + public int YearOfBirth { get; set; } + + public Child(string firstName, string middleName, string surName, string stateOfOrigin, int yearOfBirth) : base(surName, stateOfOrigin) + { + FirstName = firstName; + MiddleName = middleName; + YearOfBirth = yearOfBirth; + } + + public void GetAge() + { + int currentYear = DateTime.Now.Year; + int age = currentYear - this.YearOfBirth; + Console.WriteLine($"{this.FirstName} current age is : {age}"); + } + + //overiding the snour method + public override void Snour() // we must include the overide keyword + { + Console.WriteLine("My snouring is not loud as my father"); + } + + //Overloading the Eat method. the inherited method will still be available for the child. the child can still have access to the implementation this method in the parent class + public static void Eat(int squareMeal) + { + Console.WriteLine($"I eat {squareMeal} times daily)"); + } + + // we cannot overlaod an hidden method and the child cannot access to the implementation this method in the parent class + public static new void Sleeping() + { + Console.WriteLine("I sleep late"); + } + + public void PrintDetails() + { + Console.WriteLine($"These are the details of this child\n Surname : {SurName}\n FirstName : {FirstName}\n MiddleName : {MiddleName}\n State Of Origin :{StateOfOrigin}\n Year Of Birth : {YearOfBirth}"); + } + +} diff --git a/Batch26/Assignments/Class Assessment.md b/Batch26/Assignments/Class Assessment.md new file mode 100644 index 0000000..7a083a9 --- /dev/null +++ b/Batch26/Assignments/Class Assessment.md @@ -0,0 +1,16 @@ +Class Assessment + +Assessment +Quiz: + +What is the difference between float and double? + +Why is decimal preferred for financial calculations? + +What happens if you cast 500 to a byte? + +Write a program that: + +Accepts user input for name, age, and GPA. +Stores them in appropriate data types. +Outputs the entered values in a formatted string. \ No newline at end of file diff --git a/Batch26/Assignments/List Assignment.md b/Batch26/Assignments/List Assignment.md new file mode 100644 index 0000000..4508d13 --- /dev/null +++ b/Batch26/Assignments/List Assignment.md @@ -0,0 +1,36 @@ +List Assignment + + +Here are the 10 theory questions with calculations related to Generic List in C#: + +1. Capacity +What is the initial capacity of a List when it is created without specifying an initial capacity? + +2. Add Operation +A List contains 10 elements. How many elements will the list contain after adding 5 new elements? + +3. Insert Operation +A List contains 15 elements. What will be the index of the newly inserted element if it is inserted at the beginning of the list? + +4. Remove Operation +A List contains 20 elements. How many elements will the list contain after removing the first occurrence of a specified element? + +5. IndexOf Operation +A List contains 25 elements. What will be the index of the first occurrence of a specified element if it is present in the list? + +6. Contains Operation +A List contains 30 elements. What will be the result of the Contains method if a specified element is not present in the list? + +7. Count Property +A List contains 40 elements. What will be the value of the Count property after adding 10 new elements? + +8. ToArray Method +A List contains 50 elements. What will be the length of the array returned by the ToArray method? + +9. RemoveAt Operation +A List contains 60 elements. What will be the index of the last element after removing the element at index 30? + +10. Clear Method +A List contains 70 elements. What will be the value of the Count property after calling the Clear method? + + diff --git a/Batch26/Assignments/Loop Assignment.md b/Batch26/Assignments/Loop Assignment.md new file mode 100644 index 0000000..acd69fe --- /dev/null +++ b/Batch26/Assignments/Loop Assignment.md @@ -0,0 +1,15 @@ +LoopAssignment + +1. prompt a user to enter series of numbers multiple times, the numbers must be greater than zero, check for largest amomng the numbers. print the largest number and the number of times the largest number occurred + +2. Prompt your user to entre N number of values, print to the console the highest and the smallest among the numbers. + +3. Create an app , ask the user to enter a valid number from 1 to 10, the user can only try again five times + +4. prompt your user to enter N value, eg 10. print in reverse order from the N value to 1. + +5. * 1 * + * * 1 2 * * + * * * 1 2 3 * * * + * * * * 1 2 3 4 * * * * +Print to the console the above partern \ No newline at end of file diff --git a/Batch26/Assignments/Variable assignment.md b/Batch26/Assignments/Variable assignment.md new file mode 100644 index 0000000..c63cd82 --- /dev/null +++ b/Batch26/Assignments/Variable assignment.md @@ -0,0 +1,20 @@ +Variable assignment + +//1. (Compute the volume of a cylinder) Write a program that reads in the radius and length of a cylinder and computes the area and volume using the following formulas:area = radius* radius pie +//volume = area * length + +//2.(Convert feet into meters) Write a program that reads a number in feet, converts it to meters, and displays the result.One foot is 0.305 meter + +//3.(Perfect number) A positive integer is called a perfect number if it is equal to the sum of all of its positive divisors, excluding itself.For example, 6 is the first perfect number because 6 = 3 + 2 + 1. The next is 28 = 14 + 7 + 4 + 2 +1. There are four perfect numbers less than 10,000. Write a program to find all these four numbers. + +//4. Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature.Your program should prompt the user to enter the amount of water in kilograms and the initial and final temperatures of the water. The formula to compute the energy is Q = M * (finalTemperature – initialTemperature) * 4184 where M is the weight of water in kilograms, temperatures are in degrees Celsius, and energy Q is measured in joules. + +//5. Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and total. For example, if the user enters 10 for subtotal and 15% for gratuity rate, the program displays $1.5 as gratuity and $11.5 as total. + +//6.Average acceleration is defined as the change of velocity divided by the time taken to make the change, as shown in thefollowing formula: Write a program that prompts the user to enter the starting velocity in meters/second, the ending velocity in meters/second, and the time span t in seconds, and displays the average acceleration. + +//7. Write a C# Sharp program to print the result of dividing two numbers. + +//8. Write a C# program to convert from Celsius degrees to Kelvin and Fahrenheit. C + +//9. (Arithmetic) Write an app that asks the user to enter two integers, obtain them from the user and displays their sum, product, difference, and quotient(division). \ No newline at end of file diff --git a/Batch26/Comments/Comment On Variable.md b/Batch26/Comments/Comment On Variable.md new file mode 100644 index 0000000..b7db9dc --- /dev/null +++ b/Batch26/Comments/Comment On Variable.md @@ -0,0 +1,3 @@ +Comment On Variable + +Students showed good understanding of the topic base on the class assessment \ No newline at end of file diff --git a/Batch26/Comments/Comment-datatype-class.md b/Batch26/Comments/Comment-datatype-class.md new file mode 100644 index 0000000..25e0647 --- /dev/null +++ b/Batch26/Comments/Comment-datatype-class.md @@ -0,0 +1,2 @@ +Comment-datatype-class +The student showed good understanding on the topic base on the class assessment \ No newline at end of file diff --git a/Batch26/Comments/Comment_On_Loop.md b/Batch26/Comments/Comment_On_Loop.md new file mode 100644 index 0000000..2711cf8 --- /dev/null +++ b/Batch26/Comments/Comment_On_Loop.md @@ -0,0 +1,10 @@ +Demonstrates clear understanding of loop types (for, while, do-while, foreach) and their appropriate use cases (e.g., for for fixed iterations, foreach for collections). + +Successfully applies loops to solve repetitive tasks, such as iterating through arrays, validating user input, or generating sequences. + +Avoids infinite loops by properly updating loop variables and setting exit conditions. + +Recognizes and fixes off-by-one errors in loop boundaries (e.g., i < 5 vs. i <= 5). + +Overall: +The student grasps fundamental loop mechanics in C# and applies them effectively. With continued practice, they will gain confidence in tackling advanced looping challenges! \ No newline at end of file diff --git a/Batch26/LessonMaterials/DataTypes.md b/Batch26/LessonMaterials/DataTypes.md new file mode 100644 index 0000000..aa7b845 --- /dev/null +++ b/Batch26/LessonMaterials/DataTypes.md @@ -0,0 +1,36 @@ +DataTypes + + +Lesson Outline +1. Introduction +Icebreaker Question: "Why do you think specifying the type of data matters in programming?" +Define data types: Explain that a data type specifies the kind of data a variable can hold (e.g., integers, strings). +Emphasize why data types are critical for memory management, data integrity, and program performance. + +2. Types of Data Types in C# +Explain the two broad categories of data types in C#: + +A. Value Types + +Stored directly in memory. +Examples: int, float, double, bool, char, struct, enum. + +B. Reference Types + +Store references (memory addresses) instead of actual data. +Examples: string, array, class, delegate, interface. + +Key Concept: The difference between value and reference types in terms of memory allocation and behavior during assignment. + +Value Type vs. Reference Types +Memory allocation: Stack (value) vs. Heap (reference). + +Assignment behavior: Copies vs. References + +Primitive Type and Non-primitive Types + +Conclusion +Reinforce the importance of choosing the correct data type + +Resources +Microsoft Docs: C# Data Types diff --git a/Batch26/LessonMaterials/Loops.md b/Batch26/LessonMaterials/Loops.md new file mode 100644 index 0000000..b423cf9 --- /dev/null +++ b/Batch26/LessonMaterials/Loops.md @@ -0,0 +1,93 @@ +Learning Objectives + +1. By the end of this lesson, students will be able to: + +2. Understand the purpose of loops in programming. + +3. Use for, while, do-while, and foreach loops in C#. + +4. Recognize scenarios where loops improve code efficiency. + +5. Avoid common pitfalls like infinite loops. + + +Lesson Outline + +1. Introduction to Loops (10 minutes) +What are loops? + +Explain repetition in code (e.g., printing numbers 1–100). + +Use analogies like "repeating a task until a condition is met." + +Why use loops? + +Reduce code redundancy. + +Simplify complex tasks. + +2. Types of Loops in C# + +A. for Loop +Syntax +for (initialization; condition; iteration) { ... } + +Key Concepts: + +Initialization, condition, and iteration components. + +Use cases: Counting, fixed iterations. + +B. while Loop + +Syntax: +while (condition) { ... } + +Key Concepts: + +Loop runs while a condition is true. + +Risk of infinite loops (e.g., forgetting to update counter). + +C. do-while Loop + +Syntax: +do { ... } while (condition); + +Key Concepts: + +Executes code at least once before checking the condition. + +Contrast with while loops + +foreach Loop + +Syntax: +foreach (DataType item in collection) { ... } + +Key Concepts: + +Iterates over collections (arrays, lists). + +No manual index management. + +Hands-On Practice +Exercise 1: Print a multiplication table using nested for loops. + +Exercise 2: Use a while loop to reverse a string (e.g., "hello" → "olleh"). + +Exercise 3: Use foreach to find the maximum value in a list of integers. + +Assessment +Evaluate completed exercises for correctness and efficiency. + +Use a short quiz with scenarios. + +Additional Resources + +Microsoft Docs: C# Loops + +Codecademy: C# Loops Practice + +Simple Loop project +https://github.com/Iammurphyleo/SimpleLoopProject diff --git a/Batch26/LessonMaterials/Topic Polymorphism.txt b/Batch26/LessonMaterials/Topic Polymorphism.txt new file mode 100644 index 0000000..b012ee8 --- /dev/null +++ b/Batch26/LessonMaterials/Topic Polymorphism.txt @@ -0,0 +1,113 @@ +// Topic: Polymorphism + +//Outline of our discussion on the topic + +// Why overload a method in a class +// how to implement a method to be overloaded in parent class +// How to imlement overload a method in a child class + +// Why override a method in a class +// how to implement a method to be overided in parent class +// How to implement overide a method in a child class + +// Why hiding a method in a class +// how to implement a method to be hiden in parent class +// How to hide a method in a child class + +//we defined a parent and child class +//we implemented method overload, overiding and hiding + +Child child = new Child("Ade", "Chuckwu", "Danjuma", "Abuja", 1990); +child.Snour(); // the can only have access to the overidden method in his class +child.GetAge(); +Child.Eat(); // this is the inherited method, the can still have access to the inherited method after overlaoding it + +Console.WriteLine("How many times do you eat daily"); +int input = int.Parse(Console.ReadLine()); + +Child.Eat(input); //this is the inherited method that is overloaded +Child.Sleeping(); +Child.Walking(); +child.PrintDetails(); +public class Father +{ + public string SurName { get; set; } + public string StateOfOrigin { get; set; } + + public Father(string surName, string stateOfOrigin) + { + SurName = surName; + StateOfOrigin = stateOfOrigin; + } + + public static void Walking() // This cannot be overidden but it can be overlaoded and hide + { + Console.WriteLine("I walk slowly"); + } + + private static void Reading() // this is a private, it cannot be inherited and we cannot set it as virtual becauuse it is limited this calss + { + Console.WriteLine("I read everyday"); + } + + public virtual void Snour() // this is a virtual method to be overided + { + Console.WriteLine("I snour loudly"); + } + + public static void Eat() // this is a none virtual method to be overloaded + { + Console.WriteLine("I eat once daily"); + } + + public static void Sleeping() // this is a none virtual method to be hiden + { + Console.WriteLine("I sleep early"); + } + +} + +public class Child : Father +{ + public string FirstName { get; set; } + public string MiddleName { get; set; } + public int YearOfBirth { get; set; } + + public Child(string firstName, string middleName, string surName, string stateOfOrigin, int yearOfBirth) : base(surName, stateOfOrigin) + { + FirstName = firstName; + MiddleName = middleName; + YearOfBirth = yearOfBirth; + } + + public void GetAge() + { + int currentYear = DateTime.Now.Year; + int age = currentYear - this.YearOfBirth; + Console.WriteLine($"{this.FirstName} current age is : {age}"); + } + + //overiding the snour method + public override void Snour() // we must include the overide keyword + { + Console.WriteLine("My snouring is not loud as my father"); + } + + //Overloading the Eat method. the inherited method will still be available for the child. the child can still have access to the implementation this method in the parent class + public static void Eat(int squareMeal) + { + Console.WriteLine($"I eat {squareMeal} times daily)"); + } + + // we cannot overlaod an hidden method and the child cannot access to the implementation this method in the parent class + public static new void Sleeping() + { + Console.WriteLine("I sleep late"); + } + + public void PrintDetails() + { + Console.WriteLine($"These are the details of this child\n Surname : {SurName}\n FirstName : {FirstName}\n MiddleName : {MiddleName}\n State Of Origin :{StateOfOrigin}\n Year Of Birth : {YearOfBirth}"); + } + +} diff --git a/Batch26/LessonMaterials/Variable.md b/Batch26/LessonMaterials/Variable.md new file mode 100644 index 0000000..b286d23 --- /dev/null +++ b/Batch26/LessonMaterials/Variable.md @@ -0,0 +1,40 @@ +Variable + +Lesson Outline +1. Introduction to Variables (10 minutes) +Definition: Variables are named memory locations that store data. + +Analogy: Like labeled jars holding different items (numbers, text, etc.). + +//Topic : Declaring and initialization of varible + +// variable declartion +// variable initializatio +// Re-assigning of value into a varible +// Best practice in naming a variable +// Characteristic of a variable +// The concept of default value +// Type Casting and Type Conversion (Implicit and Exlicit casting) +// Cascading Operator + +Key Terms: + +Declaration: Creating a variable (int age;). + +Initialization: Assigning a value (age = 25;). + +Assignment: Updating a value (age = 26;). + + + Hands-On Activity (10 minutes) +1: Declare and initialize variables of each type (int, string, bool, etc.). +2: Write a small program to calculate the area of a rectangle, using float or double. +3: Demonstrate type casting by converting a double to an int. + 4: Create variables to store your name (string), age (int), and GPA (double). + +5: Cast a double to an int and explain data loss. + +6: Fix scope errors in a provided code snippet. + +7: Write a program to convert Fahrenheit to Celsius using variables. +8: prompt a user to enter to two integer values, swap the two values and print to the console diff --git a/Batch26Assignments b/Batch26Assignments new file mode 100644 index 0000000..c4bcab0 --- /dev/null +++ b/Batch26Assignments @@ -0,0 +1,3 @@ +Recursion Assignment + +Implement a recursive binary search algorithm in C# \ No newline at end of file diff --git a/Batch26Comments b/Batch26Comments new file mode 100644 index 0000000..68a8686 --- /dev/null +++ b/Batch26Comments @@ -0,0 +1 @@ +The understanding display by the students is fairly good. I believe with further practice they will understand it the topic better \ No newline at end of file diff --git a/Batch26LessonMaterials b/Batch26LessonMaterials new file mode 100644 index 0000000..478f075 --- /dev/null +++ b/Batch26LessonMaterials @@ -0,0 +1,89 @@ +Learning Objectives +By the end of this lesson, students will be able to: + +Explain the concept of recursion and how it differs from iteration. + +Write recursive functions in C# to solve problems. + +Identify base cases and recursive cases to prevent infinite recursion. + +Debug common issues in recursive algorithms. + +Lesson Outline +1. Introduction to Recursion (10 minutes) +What is Recursion? + +A function that calls itself directly or indirectly. + +Example: Factorial calculation, directory traversal. + +Key Components: + +Base Case: Condition to stop recursion (prevents infinite loops). + +Recursive Case: Part where the function calls itself. + +Recursion vs. Iteration: Discuss trade-offs (readability vs. performance). + +2. How Recursion Works in C# (20 minutes) +Example 1: Factorial Calculation + +public static int Factorial(int n) +{ + // Base case + if (n <= 1) + return 1; + // Recursive case + return n * Factorial(n - 1); +} + +Example 2: Fibonacci Sequence + +public static int Fibonacci(int n) +{ + // Base cases + if (n == 0) return 0; + if (n == 1) return 1; + // Recursive case + return Fibonacci(n - 1) + Fibonacci(n - 2); +} + +4. When to Use Recursion +Advantages: + +Cleaner code for problems with recursive nature (e.g., tree traversal). + +Natural fit for divide-and-conquer algorithms (e.g., QuickSort). + +Disadvantages: + +Risk of stack overflow for deep recursion. + +Overhead of repeated function calls. + +Best Practices: + +Use recursion when the problem is inherently recursive. + +Prefer iteration for simple loops or performance-critical code. + +5. Common Pitfalls and Debugging + +Stack Overflow: Caused by missing/base case or excessive recursion. + +Infinite Recursion: No base case or incorrect termination condition. + +Debugging Tips: + +Use breakpoints to trace call stacks. + +Validate base cases with small inputs. + +Additional Resources + +Microsoft Docs: Recursion in C# + +GeeksforGeeks: Recursion vs. Iteration + +YouTube: Recursion Visualization + diff --git "a/C\357\200\272UsersDADADesktopCLHRepoInstructorsFilesAndReportsBatch26Comments" "b/C\357\200\272UsersDADADesktopCLHRepoInstructorsFilesAndReportsBatch26Comments" new file mode 100644 index 0000000..2711cf8 --- /dev/null +++ "b/C\357\200\272UsersDADADesktopCLHRepoInstructorsFilesAndReportsBatch26Comments" @@ -0,0 +1,10 @@ +Demonstrates clear understanding of loop types (for, while, do-while, foreach) and their appropriate use cases (e.g., for for fixed iterations, foreach for collections). + +Successfully applies loops to solve repetitive tasks, such as iterating through arrays, validating user input, or generating sequences. + +Avoids infinite loops by properly updating loop variables and setting exit conditions. + +Recognizes and fixes off-by-one errors in loop boundaries (e.g., i < 5 vs. i <= 5). + +Overall: +The student grasps fundamental loop mechanics in C# and applies them effectively. With continued practice, they will gain confidence in tackling advanced looping challenges! \ No newline at end of file diff --git a/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/DesignTimeBuild/.dtbcache.v2 b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..019a43e Binary files /dev/null and b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/DesignTimeBuild/.dtbcache.v2 differ diff --git a/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/FileContentIndex/2ef295c0-0f8e-4ead-a9bc-c8c8414a5948.vsidx b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/FileContentIndex/2ef295c0-0f8e-4ead-a9bc-c8c8414a5948.vsidx new file mode 100644 index 0000000..9fa17fd Binary files /dev/null and b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/FileContentIndex/2ef295c0-0f8e-4ead-a9bc-c8c8414a5948.vsidx differ diff --git a/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/.futdcache.v2 b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/.futdcache.v2 new file mode 100644 index 0000000..22696ac Binary files /dev/null and b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/.futdcache.v2 differ diff --git a/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/.suo b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/.suo new file mode 100644 index 0000000..6f1615b Binary files /dev/null and b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/.suo differ diff --git a/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/DocumentLayout.backup.json b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..ba9c10c --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{F8EBBE66-B610-455C-B3A7-5306E143E0D1}|PrimitiveAndNonPrimitiveTypes.csproj|c:\\users\\dada\\desktop\\primitiveandnonprimitivetypes\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{F8EBBE66-B610-455C-B3A7-5306E143E0D1}|PrimitiveAndNonPrimitiveTypes.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\Program.cs", + "RelativeDocumentMoniker": "Program.cs", + "ToolTip": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\Program.cs", + "RelativeToolTip": "Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-20T20:50:35.422Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/DocumentLayout.json b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/DocumentLayout.json new file mode 100644 index 0000000..86fe9f1 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/.vs/PrimitiveAndNonPrimitiveTypes/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{F8EBBE66-B610-455C-B3A7-5306E143E0D1}|PrimitiveAndNonPrimitiveTypes.csproj|c:\\users\\dada\\desktop\\primitiveandnonprimitivetypes\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{F8EBBE66-B610-455C-B3A7-5306E143E0D1}|PrimitiveAndNonPrimitiveTypes.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\Program.cs", + "RelativeDocumentMoniker": "Program.cs", + "ToolTip": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\Program.cs", + "RelativeToolTip": "Program.cs", + "ViewState": "AgIAAAIAAAAAAAAAAAAAAAIAAAAvAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-20T20:50:35.422Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/PrimitiveAndNonPrimitiveTypes/.vs/ProjectEvaluation/primitiveandnonprimitivetypes.metadata.v9.bin b/PrimitiveAndNonPrimitiveTypes/.vs/ProjectEvaluation/primitiveandnonprimitivetypes.metadata.v9.bin new file mode 100644 index 0000000..534843d Binary files /dev/null and b/PrimitiveAndNonPrimitiveTypes/.vs/ProjectEvaluation/primitiveandnonprimitivetypes.metadata.v9.bin differ diff --git a/PrimitiveAndNonPrimitiveTypes/.vs/ProjectEvaluation/primitiveandnonprimitivetypes.projects.v9.bin b/PrimitiveAndNonPrimitiveTypes/.vs/ProjectEvaluation/primitiveandnonprimitivetypes.projects.v9.bin new file mode 100644 index 0000000..4a9148a Binary files /dev/null and b/PrimitiveAndNonPrimitiveTypes/.vs/ProjectEvaluation/primitiveandnonprimitivetypes.projects.v9.bin differ diff --git a/PrimitiveAndNonPrimitiveTypes/.vs/ProjectEvaluation/primitiveandnonprimitivetypes.strings.v9.bin b/PrimitiveAndNonPrimitiveTypes/.vs/ProjectEvaluation/primitiveandnonprimitivetypes.strings.v9.bin new file mode 100644 index 0000000..c414402 Binary files /dev/null and b/PrimitiveAndNonPrimitiveTypes/.vs/ProjectEvaluation/primitiveandnonprimitivetypes.strings.v9.bin differ diff --git a/PrimitiveAndNonPrimitiveTypes/PrimitiveAndNonPrimitiveTypes.csproj b/PrimitiveAndNonPrimitiveTypes/PrimitiveAndNonPrimitiveTypes.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/PrimitiveAndNonPrimitiveTypes.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/PrimitiveAndNonPrimitiveTypes/PrimitiveAndNonPrimitiveTypes.sln b/PrimitiveAndNonPrimitiveTypes/PrimitiveAndNonPrimitiveTypes.sln new file mode 100644 index 0000000..daba4cd --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/PrimitiveAndNonPrimitiveTypes.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35506.116 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PrimitiveAndNonPrimitiveTypes", "PrimitiveAndNonPrimitiveTypes.csproj", "{F8EBBE66-B610-455C-B3A7-5306E143E0D1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F8EBBE66-B610-455C-B3A7-5306E143E0D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8EBBE66-B610-455C-B3A7-5306E143E0D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8EBBE66-B610-455C-B3A7-5306E143E0D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8EBBE66-B610-455C-B3A7-5306E143E0D1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PrimitiveAndNonPrimitiveTypes/Program.cs b/PrimitiveAndNonPrimitiveTypes/Program.cs new file mode 100644 index 0000000..b5e544b --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/Program.cs @@ -0,0 +1,11 @@ + + +//Outline of todays class discussion (20/1/2025) + +//What are primitive Types +//What are non-primitive Types +//Differences between primitive types and non primitive types +//Why Data Type +//Breaking Data Type into value types and reference types +//Example of value types and reference types with indepth illustrations +//Insight into computer memory (Stack and heap) with respect into value type and reference type diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs new file mode 100644 index 0000000..2217181 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfo.cs b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfo.cs new file mode 100644 index 0000000..bf4ad15 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("PrimitiveAndNonPrimitiveTypes")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5398e281fb84437e72ad236f0a45d02d0fd7aa7c")] +[assembly: System.Reflection.AssemblyProductAttribute("PrimitiveAndNonPrimitiveTypes")] +[assembly: System.Reflection.AssemblyTitleAttribute("PrimitiveAndNonPrimitiveTypes")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfoInputs.cache b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfoInputs.cache new file mode 100644 index 0000000..c8e543a --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +6f221205dd801cc584837d7eb461b18800a6fc3491ce5dc19c56aee3d464748e diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.GeneratedMSBuildEditorConfig.editorconfig b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..1e624d9 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net8.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = PrimitiveAndNonPrimitiveTypes +build_property.ProjectDir = C:\Users\DADA\Desktop\CLHRepo\InstructorsFilesAndReports\PrimitiveAndNonPrimitiveTypes\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 8.0 +build_property.EnableCodeStyleSeverity = diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.GlobalUsings.g.cs b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +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; diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.assets.cache b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.assets.cache new file mode 100644 index 0000000..16a0fa6 Binary files /dev/null and b/PrimitiveAndNonPrimitiveTypes/obj/Debug/net8.0/PrimitiveAndNonPrimitiveTypes.assets.cache differ diff --git a/PrimitiveAndNonPrimitiveTypes/obj/PrimitiveAndNonPrimitiveTypes.csproj.nuget.dgspec.json b/PrimitiveAndNonPrimitiveTypes/obj/PrimitiveAndNonPrimitiveTypes.csproj.nuget.dgspec.json new file mode 100644 index 0000000..28a7074 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/PrimitiveAndNonPrimitiveTypes.csproj.nuget.dgspec.json @@ -0,0 +1,73 @@ +{ + "format": 1, + "restore": { + "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\PrimitiveAndNonPrimitiveTypes.csproj": {} + }, + "projects": { + "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\PrimitiveAndNonPrimitiveTypes.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\PrimitiveAndNonPrimitiveTypes.csproj", + "projectName": "PrimitiveAndNonPrimitiveTypes", + "projectPath": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\PrimitiveAndNonPrimitiveTypes.csproj", + "packagesPath": "C:\\Users\\DADA\\.nuget\\packages\\", + "outputPath": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\DADA\\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": [ + "net8.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/PrimitiveAndNonPrimitiveTypes/obj/PrimitiveAndNonPrimitiveTypes.csproj.nuget.g.props b/PrimitiveAndNonPrimitiveTypes/obj/PrimitiveAndNonPrimitiveTypes.csproj.nuget.g.props new file mode 100644 index 0000000..19835a0 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/PrimitiveAndNonPrimitiveTypes.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\DADA\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.12.1 + + + + + + \ No newline at end of file diff --git a/PrimitiveAndNonPrimitiveTypes/obj/PrimitiveAndNonPrimitiveTypes.csproj.nuget.g.targets b/PrimitiveAndNonPrimitiveTypes/obj/PrimitiveAndNonPrimitiveTypes.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/PrimitiveAndNonPrimitiveTypes.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs new file mode 100644 index 0000000..2217181 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfo.cs b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfo.cs new file mode 100644 index 0000000..5ee38e3 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("PrimitiveAndNonPrimitiveTypes")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5398e281fb84437e72ad236f0a45d02d0fd7aa7c")] +[assembly: System.Reflection.AssemblyProductAttribute("PrimitiveAndNonPrimitiveTypes")] +[assembly: System.Reflection.AssemblyTitleAttribute("PrimitiveAndNonPrimitiveTypes")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfoInputs.cache b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfoInputs.cache new file mode 100644 index 0000000..5466660 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +fd92297c3f84bf3be5f323ad4b859611fe149d95cafd416f7fd0214d20e53c4a diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.GeneratedMSBuildEditorConfig.editorconfig b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..1e624d9 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net8.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = PrimitiveAndNonPrimitiveTypes +build_property.ProjectDir = C:\Users\DADA\Desktop\CLHRepo\InstructorsFilesAndReports\PrimitiveAndNonPrimitiveTypes\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 8.0 +build_property.EnableCodeStyleSeverity = diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.GlobalUsings.g.cs b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +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; diff --git a/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.assets.cache b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.assets.cache new file mode 100644 index 0000000..c2f9c0b Binary files /dev/null and b/PrimitiveAndNonPrimitiveTypes/obj/Release/net8.0/PrimitiveAndNonPrimitiveTypes.assets.cache differ diff --git a/PrimitiveAndNonPrimitiveTypes/obj/project.assets.json b/PrimitiveAndNonPrimitiveTypes/obj/project.assets.json new file mode 100644 index 0000000..b52d280 --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/project.assets.json @@ -0,0 +1,79 @@ +{ + "version": 3, + "targets": { + "net8.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net8.0": [] + }, + "packageFolders": { + "C:\\Users\\DADA\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\PrimitiveAndNonPrimitiveTypes.csproj", + "projectName": "PrimitiveAndNonPrimitiveTypes", + "projectPath": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\PrimitiveAndNonPrimitiveTypes.csproj", + "packagesPath": "C:\\Users\\DADA\\.nuget\\packages\\", + "outputPath": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\DADA\\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": [ + "net8.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/PrimitiveAndNonPrimitiveTypes/obj/project.nuget.cache b/PrimitiveAndNonPrimitiveTypes/obj/project.nuget.cache new file mode 100644 index 0000000..54e091a --- /dev/null +++ b/PrimitiveAndNonPrimitiveTypes/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "3FcEkbgMnRI=", + "success": true, + "projectFilePath": "C:\\Users\\DADA\\Desktop\\PrimitiveAndNonPrimitiveTypes\\PrimitiveAndNonPrimitiveTypes.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file