diff --git a/Lab 1/k163680_Q1/.vs/k163680_Q1/v16/.suo b/Lab 1/k163680_Q1/.vs/k163680_Q1/v16/.suo new file mode 100644 index 0000000..26a5470 Binary files /dev/null and b/Lab 1/k163680_Q1/.vs/k163680_Q1/v16/.suo differ diff --git a/Lab 1/k163680_Q1/.vs/k163680_Q1/v16/Server/sqlite3/db.lock b/Lab 1/k163680_Q1/.vs/k163680_Q1/v16/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/Lab 1/k163680_Q1/.vs/k163680_Q1/v16/Server/sqlite3/storage.ide b/Lab 1/k163680_Q1/.vs/k163680_Q1/v16/Server/sqlite3/storage.ide new file mode 100644 index 0000000..e3db6d8 Binary files /dev/null and b/Lab 1/k163680_Q1/.vs/k163680_Q1/v16/Server/sqlite3/storage.ide differ diff --git a/Lab 1/k163680_Q1/k163680_Q1.sln b/Lab 1/k163680_Q1/k163680_Q1.sln new file mode 100644 index 0000000..a7292be --- /dev/null +++ b/Lab 1/k163680_Q1/k163680_Q1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29326.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q1", "k163680_Q1\k163680_Q1.csproj", "{87E1F92E-5743-4572-AE3B-6365B165227A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {87E1F92E-5743-4572-AE3B-6365B165227A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87E1F92E-5743-4572-AE3B-6365B165227A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87E1F92E-5743-4572-AE3B-6365B165227A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87E1F92E-5743-4572-AE3B-6365B165227A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {829DD86E-32E5-4003-A945-F3DBA854A46E} + EndGlobalSection +EndGlobal diff --git a/Lab 1/k163680_Q1/k163680_Q1/Program.cs b/Lab 1/k163680_Q1/k163680_Q1/Program.cs new file mode 100644 index 0000000..6473e5d --- /dev/null +++ b/Lab 1/k163680_Q1/k163680_Q1/Program.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace k163680_Q1 +{ + class Program + { + static void Main(string[] args) + { + + Console.WriteLine("Enter a string.."); + String str = Console.ReadLine(); + String requiredString = ""; + + if (str.Length > 4) + { + requiredString = String.Concat(str.Substring(0, 4).ToLower(), str.Substring(4, str.Length - 4).ToUpper()); + } + else + { + requiredString = str.Substring(0, str.Length).ToLower(); + } + Console.WriteLine(requiredString); + Console.ReadLine(); + + } + } +} diff --git a/Lab 1/k163680_Q1/k163680_Q1/Properties/AssemblyInfo.cs b/Lab 1/k163680_Q1/k163680_Q1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..df885cd --- /dev/null +++ b/Lab 1/k163680_Q1/k163680_Q1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q1")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("87e1f92e-5743-4572-ae3b-6365b165227a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 1/k163680_Q1/k163680_Q1/k163680_Q1.csproj b/Lab 1/k163680_Q1/k163680_Q1/k163680_Q1.csproj new file mode 100644 index 0000000..8320f4a --- /dev/null +++ b/Lab 1/k163680_Q1/k163680_Q1/k163680_Q1.csproj @@ -0,0 +1,48 @@ + + + + + Debug + AnyCPU + {87E1F92E-5743-4572-AE3B-6365B165227A} + Exe + k163680_Q1 + k163680_Q1 + v4.0 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 1/k163680_Q2/.vs/k163680_Q2/v16/.suo b/Lab 1/k163680_Q2/.vs/k163680_Q2/v16/.suo new file mode 100644 index 0000000..b41f18e Binary files /dev/null and b/Lab 1/k163680_Q2/.vs/k163680_Q2/v16/.suo differ diff --git a/Lab 1/k163680_Q2/.vs/k163680_Q2/v16/Server/sqlite3/db.lock b/Lab 1/k163680_Q2/.vs/k163680_Q2/v16/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/Lab 1/k163680_Q2/.vs/k163680_Q2/v16/Server/sqlite3/storage.ide b/Lab 1/k163680_Q2/.vs/k163680_Q2/v16/Server/sqlite3/storage.ide new file mode 100644 index 0000000..176946d Binary files /dev/null and b/Lab 1/k163680_Q2/.vs/k163680_Q2/v16/Server/sqlite3/storage.ide differ diff --git a/Lab 1/k163680_Q2/k163680_Q2.sln b/Lab 1/k163680_Q2/k163680_Q2.sln new file mode 100644 index 0000000..c5d8f68 --- /dev/null +++ b/Lab 1/k163680_Q2/k163680_Q2.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29326.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q2", "k163680_Q2\k163680_Q2.csproj", "{D0574FAF-ABA6-48A8-AA3F-B95779F6BBD6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D0574FAF-ABA6-48A8-AA3F-B95779F6BBD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0574FAF-ABA6-48A8-AA3F-B95779F6BBD6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0574FAF-ABA6-48A8-AA3F-B95779F6BBD6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0574FAF-ABA6-48A8-AA3F-B95779F6BBD6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8BBD551C-B22E-4487-A7BC-57781FDE9F6A} + EndGlobalSection +EndGlobal diff --git a/Lab 1/k163680_Q2/k163680_Q2/Program.cs b/Lab 1/k163680_Q2/k163680_Q2/Program.cs new file mode 100644 index 0000000..f39fca3 --- /dev/null +++ b/Lab 1/k163680_Q2/k163680_Q2/Program.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace k163680_Q2 +{ + class Program + { + static void Main(string[] args) + { + Random random = new Random(); + Console.WriteLine("Enter size of a matrix.."); + int rows = Convert.ToInt32(Console.ReadLine()); + + int[,] array = new int[rows, rows]; + for (int i=0; i < rows; i++) + { + for(int j=0; j< rows; j++) + { + array[i,j] = random.Next(1, 1000); + Console.Write($"{array[i,j]} "); + } + Console.WriteLine(); + } + long sum = 0; + for (int i = 0; i < rows; i++) + { + for (int j = 0; j < rows; j++) + { + if(i>=j) + sum += array[i, j]; + } + } + Console.WriteLine($"The sum of left diagonals is {sum}.."); + Console.ReadLine(); + + + } + } +} diff --git a/Lab 1/k163680_Q2/k163680_Q2/Properties/AssemblyInfo.cs b/Lab 1/k163680_Q2/k163680_Q2/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6f9a5fc --- /dev/null +++ b/Lab 1/k163680_Q2/k163680_Q2/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q2")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d0574faf-aba6-48a8-aa3f-b95779f6bbd6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 1/k163680_Q2/k163680_Q2/k163680_Q2.csproj b/Lab 1/k163680_Q2/k163680_Q2/k163680_Q2.csproj new file mode 100644 index 0000000..2ac43d5 --- /dev/null +++ b/Lab 1/k163680_Q2/k163680_Q2/k163680_Q2.csproj @@ -0,0 +1,48 @@ + + + + + Debug + AnyCPU + {D0574FAF-ABA6-48A8-AA3F-B95779F6BBD6} + Exe + k163680_Q2 + k163680_Q2 + v4.0 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 1/k163680_Q3/.vs/k163680_Q3/v16/.suo b/Lab 1/k163680_Q3/.vs/k163680_Q3/v16/.suo new file mode 100644 index 0000000..c73d7cd Binary files /dev/null and b/Lab 1/k163680_Q3/.vs/k163680_Q3/v16/.suo differ diff --git a/Lab 1/k163680_Q3/.vs/k163680_Q3/v16/Server/sqlite3/db.lock b/Lab 1/k163680_Q3/.vs/k163680_Q3/v16/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/Lab 1/k163680_Q3/.vs/k163680_Q3/v16/Server/sqlite3/storage.ide b/Lab 1/k163680_Q3/.vs/k163680_Q3/v16/Server/sqlite3/storage.ide new file mode 100644 index 0000000..a3b540f Binary files /dev/null and b/Lab 1/k163680_Q3/.vs/k163680_Q3/v16/Server/sqlite3/storage.ide differ diff --git a/Lab 1/k163680_Q3/k163680_Q3.sln b/Lab 1/k163680_Q3/k163680_Q3.sln new file mode 100644 index 0000000..5afef45 --- /dev/null +++ b/Lab 1/k163680_Q3/k163680_Q3.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29326.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q3", "k163680_Q3\k163680_Q3.csproj", "{45635301-FC98-46EC-BD52-DE27BBE814B4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {45635301-FC98-46EC-BD52-DE27BBE814B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45635301-FC98-46EC-BD52-DE27BBE814B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45635301-FC98-46EC-BD52-DE27BBE814B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45635301-FC98-46EC-BD52-DE27BBE814B4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DEE586C9-EE19-4166-AE77-E5A6AA62E930} + EndGlobalSection +EndGlobal diff --git a/Lab 1/k163680_Q3/k163680_Q3/Calculator.cs b/Lab 1/k163680_Q3/k163680_Q3/Calculator.cs new file mode 100644 index 0000000..06381a5 --- /dev/null +++ b/Lab 1/k163680_Q3/k163680_Q3/Calculator.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace k163680_Q3 +{ + public class Calculator + { + public float add(float num1, float num2) + { + return num1 + num2; + } + + public float add(float num1, params float[] parameters) + { + float sum = num1; + foreach(float param in parameters) + sum += param; + return sum; + } + public float substract(float num1, float num2) + { + return num1 - num2; + + } + public float multiply(float num1, float num2) + { + return num1 * num2; + } + public float divide(float num1, float num2) + { + if (num2 != 0) + return num1 / num2; + else + return float.MaxValue; + } + + } +} diff --git a/Lab 1/k163680_Q3/k163680_Q3/Program.cs b/Lab 1/k163680_Q3/k163680_Q3/Program.cs new file mode 100644 index 0000000..c15137b --- /dev/null +++ b/Lab 1/k163680_Q3/k163680_Q3/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace k163680_Q3 +{ + class Program + { + static void Main(string[] args) + { + //For demo purpose only calculator class required as mentioned in question. + Calculator calculator = new Calculator(); + + Console.WriteLine(calculator.add(1, 2, 3, 4)); + Console.WriteLine(calculator.add(1, 2, 3, 4, 5, 6)); + Console.ReadLine(); + } + } +} diff --git a/Lab 1/k163680_Q3/k163680_Q3/Properties/AssemblyInfo.cs b/Lab 1/k163680_Q3/k163680_Q3/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1516051 --- /dev/null +++ b/Lab 1/k163680_Q3/k163680_Q3/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q3")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q3")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("45635301-fc98-46ec-bd52-de27bbe814b4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 1/k163680_Q3/k163680_Q3/k163680_Q3.csproj b/Lab 1/k163680_Q3/k163680_Q3/k163680_Q3.csproj new file mode 100644 index 0000000..5b19ced --- /dev/null +++ b/Lab 1/k163680_Q3/k163680_Q3/k163680_Q3.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + {45635301-FC98-46EC-BD52-DE27BBE814B4} + Exe + k163680_Q3 + k163680_Q3 + v4.0 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 1/k163680_Q4/.vs/k163680_Q4/v16/.suo b/Lab 1/k163680_Q4/.vs/k163680_Q4/v16/.suo new file mode 100644 index 0000000..d49c370 Binary files /dev/null and b/Lab 1/k163680_Q4/.vs/k163680_Q4/v16/.suo differ diff --git a/Lab 1/k163680_Q4/.vs/k163680_Q4/v16/Server/sqlite3/db.lock b/Lab 1/k163680_Q4/.vs/k163680_Q4/v16/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/Lab 1/k163680_Q4/.vs/k163680_Q4/v16/Server/sqlite3/storage.ide b/Lab 1/k163680_Q4/.vs/k163680_Q4/v16/Server/sqlite3/storage.ide new file mode 100644 index 0000000..2f01e77 Binary files /dev/null and b/Lab 1/k163680_Q4/.vs/k163680_Q4/v16/Server/sqlite3/storage.ide differ diff --git a/Lab 1/k163680_Q4/k163680_Q4.sln b/Lab 1/k163680_Q4/k163680_Q4.sln new file mode 100644 index 0000000..1493c58 --- /dev/null +++ b/Lab 1/k163680_Q4/k163680_Q4.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29326.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q4", "k163680_Q4\k163680_Q4.csproj", "{C33B30D6-6F42-442B-90B9-03B3BEAB1837}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C33B30D6-6F42-442B-90B9-03B3BEAB1837}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C33B30D6-6F42-442B-90B9-03B3BEAB1837}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C33B30D6-6F42-442B-90B9-03B3BEAB1837}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C33B30D6-6F42-442B-90B9-03B3BEAB1837}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {60E9479A-CF70-4D3A-9261-DC6062132E1C} + EndGlobalSection +EndGlobal diff --git a/Lab 1/k163680_Q4/k163680_Q4/Program.cs b/Lab 1/k163680_Q4/k163680_Q4/Program.cs new file mode 100644 index 0000000..fe245de --- /dev/null +++ b/Lab 1/k163680_Q4/k163680_Q4/Program.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace k163680_Q4 +{ + class Program + { + static void Main(string[] args) + { + List students = new List(); + for(int i=0; i<100; i++) + students.Add(new Student(RandomInfo.getName(), RandomInfo.GetDateOfBirth(), RandomInfo.getSemester(), RandomInfo.getGPA())); + + students.Sort(); + + for (int i = 0; i < 100; i++) + Console.WriteLine(students[i].display()); + + Console.ReadLine(); + + } + } +} diff --git a/Lab 1/k163680_Q4/k163680_Q4/Properties/AssemblyInfo.cs b/Lab 1/k163680_Q4/k163680_Q4/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0a728d6 --- /dev/null +++ b/Lab 1/k163680_Q4/k163680_Q4/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q4")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q4")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c33b30d6-6f42-442b-90b9-03b3beab1837")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 1/k163680_Q4/k163680_Q4/RandomInfo.cs b/Lab 1/k163680_Q4/k163680_Q4/RandomInfo.cs new file mode 100644 index 0000000..d29bc81 --- /dev/null +++ b/Lab 1/k163680_Q4/k163680_Q4/RandomInfo.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace k163680_Q4 +{ + class RandomInfo + { + static Random random = new Random(); + + public static String getName() + { + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < 7; i++) + builder.Append(Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)))); + return builder.ToString(); + } + public static DateTime GetDateOfBirth() + { + return new DateTime(random.Next(1990, 2000), random.Next(1, 12), random.Next(1,29)); + } + + public static int getSemester() + { + return random.Next(1, 9); + } + public static double getGPA() + { + return random.Next(1, 4) + (random.Next(0, 99) / 100.0); + } + + + } +} diff --git a/Lab 1/k163680_Q4/k163680_Q4/Student.cs b/Lab 1/k163680_Q4/k163680_Q4/Student.cs new file mode 100644 index 0000000..2df5fc3 --- /dev/null +++ b/Lab 1/k163680_Q4/k163680_Q4/Student.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace k163680_Q4 +{ + public class Student : IComparable + { + String name; + DateTime dateOfBirth; + int semester; + double gpa; + + public Student(string name, DateTime dateOfBirth, int semester, double gpa) + { + this.name = name; + this.dateOfBirth = dateOfBirth; + this.semester = semester; + this.gpa = gpa; + } + + public int CompareTo(Student student) + { + return this.gpa.CompareTo(student.gpa); + } + + public String display() + { + return $"Name: {this.name} Date Of Birth: {this.dateOfBirth.ToShortDateString()} Semester: {this.semester} GPA : {this.gpa} "; + } + } +} diff --git a/Lab 1/k163680_Q4/k163680_Q4/k163680_Q4.csproj b/Lab 1/k163680_Q4/k163680_Q4/k163680_Q4.csproj new file mode 100644 index 0000000..6cf88a2 --- /dev/null +++ b/Lab 1/k163680_Q4/k163680_Q4/k163680_Q4.csproj @@ -0,0 +1,50 @@ + + + + + Debug + AnyCPU + {C33B30D6-6F42-442B-90B9-03B3BEAB1837} + Exe + k163680_Q4 + k163680_Q4 + v4.0 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 1/k163680_Q5/.vs/k163680_Q5/v16/.suo b/Lab 1/k163680_Q5/.vs/k163680_Q5/v16/.suo new file mode 100644 index 0000000..8e73ca4 Binary files /dev/null and b/Lab 1/k163680_Q5/.vs/k163680_Q5/v16/.suo differ diff --git a/Lab 1/k163680_Q5/.vs/k163680_Q5/v16/Server/sqlite3/db.lock b/Lab 1/k163680_Q5/.vs/k163680_Q5/v16/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/Lab 1/k163680_Q5/.vs/k163680_Q5/v16/Server/sqlite3/storage.ide b/Lab 1/k163680_Q5/.vs/k163680_Q5/v16/Server/sqlite3/storage.ide new file mode 100644 index 0000000..99d9077 Binary files /dev/null and b/Lab 1/k163680_Q5/.vs/k163680_Q5/v16/Server/sqlite3/storage.ide differ diff --git a/Lab 1/k163680_Q5/k163680_Q5.sln b/Lab 1/k163680_Q5/k163680_Q5.sln new file mode 100644 index 0000000..c74543b --- /dev/null +++ b/Lab 1/k163680_Q5/k163680_Q5.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29326.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q5", "k163680_Q5\k163680_Q5.csproj", "{4420F249-56F3-48B6-817C-929F1CDDBEF8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4420F249-56F3-48B6-817C-929F1CDDBEF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4420F249-56F3-48B6-817C-929F1CDDBEF8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4420F249-56F3-48B6-817C-929F1CDDBEF8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4420F249-56F3-48B6-817C-929F1CDDBEF8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E01B20B0-1E4F-4F76-AAF9-63AC403FE196} + EndGlobalSection +EndGlobal diff --git a/Lab 1/k163680_Q5/k163680_Q5/Program.cs b/Lab 1/k163680_Q5/k163680_Q5/Program.cs new file mode 100644 index 0000000..7b095b9 --- /dev/null +++ b/Lab 1/k163680_Q5/k163680_Q5/Program.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace k163680_Q5 +{ + class Program + { + static void Main(string[] args) + { + string string11 = new string(new char[] { 'h', 'e', 'l', 'l', 'o' }); + string string12 = new string(new char[] { 'h', 'e', 'l', 'l', 'o' }); + + string string21 = new string(new char[] { 'c', 'e', 'n', 't', 'e' , 'r' }); + string string22 = new string(new char[] { 'c', 'e', 'n', 't', 'r' , 'e' }); + + if (CompareObjects(string11, string12)) + Console.WriteLine($"Strings {string11} and {string12} are equal.."); + else + Console.WriteLine($"Strings {string11} and {string12} are not equal.."); + + if (CompareObjects(string21, string22)) + Console.WriteLine($"Strings {string21} and {string22} are equal.."); + else + Console.WriteLine($"Strings {string21} and {string22} are not equal.."); + + Console.ReadLine(); + + } + public static bool CompareObjects(object item1, object item2) + { + return item1.Equals(item2); + } + } +} diff --git a/Lab 1/k163680_Q5/k163680_Q5/Properties/AssemblyInfo.cs b/Lab 1/k163680_Q5/k163680_Q5/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..07fac34 --- /dev/null +++ b/Lab 1/k163680_Q5/k163680_Q5/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q5")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q5")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4420f249-56f3-48b6-817c-929f1cddbef8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 1/k163680_Q5/k163680_Q5/k163680_Q5.csproj b/Lab 1/k163680_Q5/k163680_Q5/k163680_Q5.csproj new file mode 100644 index 0000000..148520a --- /dev/null +++ b/Lab 1/k163680_Q5/k163680_Q5/k163680_Q5.csproj @@ -0,0 +1,48 @@ + + + + + Debug + AnyCPU + {4420F249-56F3-48B6-817C-929F1CDDBEF8} + Exe + k163680_Q5 + k163680_Q5 + v4.0 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/.vs/VSWorkspaceState.json b/Lab 2/k163680_Lab2/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..770bd88 --- /dev/null +++ b/Lab 2/k163680_Lab2/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\k163680_Lab2.sln", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/.vs/k163680_Lab2/config/applicationhost.config b/Lab 2/k163680_Lab2/.vs/k163680_Lab2/config/applicationhost.config new file mode 100644 index 0000000..8519051 --- /dev/null +++ b/Lab 2/k163680_Lab2/.vs/k163680_Lab2/config/applicationhost.config @@ -0,0 +1,1022 @@ + + + + + + +
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Lab 2/k163680_Lab2/.vs/k163680_Lab2/v16/.suo b/Lab 2/k163680_Lab2/.vs/k163680_Lab2/v16/.suo new file mode 100644 index 0000000..127927d Binary files /dev/null and b/Lab 2/k163680_Lab2/.vs/k163680_Lab2/v16/.suo differ diff --git a/Lab 2/k163680_Lab2/.vs/k163680_Lab2/v16/Server/sqlite3/db.lock b/Lab 2/k163680_Lab2/.vs/k163680_Lab2/v16/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/Lab 2/k163680_Lab2/.vs/k163680_Lab2/v16/Server/sqlite3/storage.ide b/Lab 2/k163680_Lab2/.vs/k163680_Lab2/v16/Server/sqlite3/storage.ide new file mode 100644 index 0000000..15e0df0 Binary files /dev/null and b/Lab 2/k163680_Lab2/.vs/k163680_Lab2/v16/Server/sqlite3/storage.ide differ diff --git a/Lab 2/k163680_Lab2/.vs/slnx.sqlite b/Lab 2/k163680_Lab2/.vs/slnx.sqlite new file mode 100644 index 0000000..d2749dd Binary files /dev/null and b/Lab 2/k163680_Lab2/.vs/slnx.sqlite differ diff --git a/Lab 2/k163680_Lab2/k163680_Lab2.sln b/Lab 2/k163680_Lab2/k163680_Lab2.sln new file mode 100644 index 0000000..c81749f --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Lab2.sln @@ -0,0 +1,55 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29326.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q1", "k163680_Q1\k163680_Q1.csproj", "{BB5EE422-2A1B-42EA-85A7-3592C17E3D33}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q4", "k163680_Q4\k163680_Q4.csproj", "{57D404BA-C94D-478F-A607-FC0E45952CEC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q6", "k163680_Q6\k163680_Q6.csproj", "{B7F28970-3E66-457B-A735-F518EE423BE9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q2", "k163680_Q2\k163680_Q2.csproj", "{2102C13F-1DE8-4E2D-9CAC-FB74BB4A6E88}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q3", "k163680_Q3\k163680_Q3.csproj", "{4F49F09A-789A-4AEB-ACCE-D4040F9648C6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "k163680_Q5", "k163680_Q5\k163680_Q5.csproj", "{868FF619-8EB8-4660-810F-C75ED1C8FC6F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BB5EE422-2A1B-42EA-85A7-3592C17E3D33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB5EE422-2A1B-42EA-85A7-3592C17E3D33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB5EE422-2A1B-42EA-85A7-3592C17E3D33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB5EE422-2A1B-42EA-85A7-3592C17E3D33}.Release|Any CPU.Build.0 = Release|Any CPU + {57D404BA-C94D-478F-A607-FC0E45952CEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57D404BA-C94D-478F-A607-FC0E45952CEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57D404BA-C94D-478F-A607-FC0E45952CEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57D404BA-C94D-478F-A607-FC0E45952CEC}.Release|Any CPU.Build.0 = Release|Any CPU + {B7F28970-3E66-457B-A735-F518EE423BE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7F28970-3E66-457B-A735-F518EE423BE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7F28970-3E66-457B-A735-F518EE423BE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7F28970-3E66-457B-A735-F518EE423BE9}.Release|Any CPU.Build.0 = Release|Any CPU + {2102C13F-1DE8-4E2D-9CAC-FB74BB4A6E88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2102C13F-1DE8-4E2D-9CAC-FB74BB4A6E88}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2102C13F-1DE8-4E2D-9CAC-FB74BB4A6E88}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2102C13F-1DE8-4E2D-9CAC-FB74BB4A6E88}.Release|Any CPU.Build.0 = Release|Any CPU + {4F49F09A-789A-4AEB-ACCE-D4040F9648C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F49F09A-789A-4AEB-ACCE-D4040F9648C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F49F09A-789A-4AEB-ACCE-D4040F9648C6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F49F09A-789A-4AEB-ACCE-D4040F9648C6}.Release|Any CPU.Build.0 = Release|Any CPU + {868FF619-8EB8-4660-810F-C75ED1C8FC6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {868FF619-8EB8-4660-810F-C75ED1C8FC6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {868FF619-8EB8-4660-810F-C75ED1C8FC6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {868FF619-8EB8-4660-810F-C75ED1C8FC6F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A6882129-3866-4AB6-9125-88F4248FCC9B} + EndGlobalSection +EndGlobal diff --git a/Lab 2/k163680_Lab2/k163680_Q1/LinearSearch.cs b/Lab 2/k163680_Lab2/k163680_Q1/LinearSearch.cs new file mode 100644 index 0000000..5039c27 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q1/LinearSearch.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace k163680_Q1 +{ + class LinearSearch + { + public void Search(int[] array , int searchNumber ) + { + System.Diagnostics.Stopwatch watch = System.Diagnostics.Stopwatch.StartNew(); + foreach (int integer in array) + { + if (searchNumber == integer) + { + watch.Stop(); + Console.WriteLine($"SimpleSearch: Found in {watch.ElapsedMilliseconds} milliseconds.. "); + return; + } + } + watch.Stop(); + Console.WriteLine($"SimpleSearch: Not found in {watch.ElapsedMilliseconds} milliseconds.. "); + + return; + } + private bool Search(int[] array ,int searchNumber,int loopCount, int numberOFThreads) + { + int startIndex = (array.Length / numberOFThreads)* loopCount; + int endIndex = 0; + if (numberOFThreads!= loopCount+1) + endIndex = startIndex + (array.Length / numberOFThreads); + else + endIndex = array.Length; + + for (int i = startIndex; i { + + found[i] = Search(array,searchNumber,i, numberOFThreads); + + }); + watch.Stop(); + foreach (bool item in found) + { + if (item == true) + { + Console.WriteLine($"ParallelSearch: Found in {watch.ElapsedMilliseconds} milliseconds.. "); + + return; + } + } + Console.WriteLine($"ParallelSearch: Not found in {watch.ElapsedMilliseconds} milliseconds.. "); + return; + + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q1/Program.cs b/Lab 2/k163680_Lab2/k163680_Q1/Program.cs new file mode 100644 index 0000000..eee8511 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q1/Program.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace k163680_Q1 +{ + class Program + { + + + static void Main(string[] args) + { + Random random = new Random(); + const int numberOfThreads = 5; + + int[] array = new int[1000000]; + //max value for reducing range for higher probability of finding a number + for(int i=0; i< 1000000; i++) + array[i] = random.Next(0,10000000); + + + Console.WriteLine("Enter any integer to search from array.."); + int searchNumber = int.Parse(Console.ReadLine()); + LinearSearch search = new LinearSearch(); + + Thread simpleSearch = new Thread(()=>search.Search(array, searchNumber)); + Thread parallelSearch = new Thread(() => search.ParallelSearch(array, searchNumber, numberOfThreads)); + + simpleSearch.Start(); + parallelSearch.Start(); + + simpleSearch.Join(); + parallelSearch.Join(); + + Console.ReadLine(); + + + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q1/Properties/AssemblyInfo.cs b/Lab 2/k163680_Lab2/k163680_Q1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8964b60 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q1")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("bb5ee422-2a1b-42ea-85a7-3592c17e3d33")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 2/k163680_Lab2/k163680_Q1/k163680_Q1.csproj b/Lab 2/k163680_Lab2/k163680_Q1/k163680_Q1.csproj new file mode 100644 index 0000000..b8b3288 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q1/k163680_Q1.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + {BB5EE422-2A1B-42EA-85A7-3592C17E3D33} + Exe + k163680_Q1 + k163680_Q1 + v4.0 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q2/App.config b/Lab 2/k163680_Lab2/k163680_Q2/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q2/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q2/LinearSearch.cs b/Lab 2/k163680_Lab2/k163680_Q2/LinearSearch.cs new file mode 100644 index 0000000..2a3a2c0 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q2/LinearSearch.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace k163680_Q2 +{ + class LinearSearch + { + + private bool Search(int[] array, int searchNumber, int loopCount, int numberOFThreads) + { + int startIndex = (array.Length / numberOFThreads) * loopCount; + int endIndex = 0; + + if (numberOFThreads != loopCount + 1) + endIndex = startIndex + (array.Length / numberOFThreads); + else + endIndex = array.Length; + + for (int i = startIndex; i < endIndex; i++) + { + if (array[i] == searchNumber) + return true; + } + return false; + } + + + public void ParallelSearch(int[] array, int searchNumber, int numberOFThreads) + { + System.Diagnostics.Stopwatch watch = System.Diagnostics.Stopwatch.StartNew(); + Task[] tasks = new Task[numberOFThreads]; + bool[] found = new bool[numberOFThreads]; + + for (int i=0; i < numberOFThreads ; i++){ + Thread th = new Thread(() => { found[i] = Search(array, searchNumber, i, numberOFThreads); }); + th.Start(); + th.Join(); + + if (found[i] == true) + break; + } + + watch.Stop(); + foreach (bool item in found) + { + if (item == true) + { + Console.WriteLine($"ParallelSearch: Found in {watch.ElapsedMilliseconds} milliseconds.. "); + + return; + } + } + Console.WriteLine($"SimpleSearch: Not found in {watch.ElapsedMilliseconds} milliseconds.. "); + return; + + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q2/Program.cs b/Lab 2/k163680_Lab2/k163680_Q2/Program.cs new file mode 100644 index 0000000..3fcefa1 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q2/Program.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace k163680_Q2 +{ + class Program + { + static void Main(string[] args) + { + Random random = new Random(); + const int numberOfThreads = 5; + + int[] array = new int[1000000]; + //max value for reducing range for higher probability of finding a number + for (int i = 0; i < 1000000; i++) + array[i] = random.Next(0, 100); + + + Console.WriteLine("Enter any integer to search from array.."); + int searchNumber = int.Parse(Console.ReadLine()); + + LinearSearch search = new LinearSearch(); + + search.ParallelSearch(array, searchNumber, numberOfThreads); + + Console.ReadLine(); + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q2/Properties/AssemblyInfo.cs b/Lab 2/k163680_Lab2/k163680_Q2/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..536f2c7 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q2/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q2")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2102c13f-1de8-4e2d-9cac-fb74bb4a6e88")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 2/k163680_Lab2/k163680_Q2/k163680_Q2.csproj b/Lab 2/k163680_Lab2/k163680_Q2/k163680_Q2.csproj new file mode 100644 index 0000000..81092c6 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q2/k163680_Q2.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {2102C13F-1DE8-4E2D-9CAC-FB74BB4A6E88} + Exe + k163680_Q2 + k163680_Q2 + v4.5 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q3/App.config b/Lab 2/k163680_Lab2/k163680_Q3/App.config new file mode 100644 index 0000000..ab5678f --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q3/App.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q3/EntityFramework.dll b/Lab 2/k163680_Lab2/k163680_Q3/EntityFramework.dll new file mode 100644 index 0000000..2618485 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q3/EntityFramework.dll differ diff --git a/Lab 2/k163680_Lab2/k163680_Q3/Program.cs b/Lab 2/k163680_Lab2/k163680_Q3/Program.cs new file mode 100644 index 0000000..6553238 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q3/Program.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace k163680_Q3 +{ + class Program + { + static void Main(string[] args) + { + Assembly assembly = Assembly.LoadFile(ConfigurationManager.AppSettings["EntityFrameworkPath"]); + Type[] types = assembly.GetTypes(); + + foreach (Type type in types) + { + if (type.IsClass) + { + Console.WriteLine("Class Name: {0} ..", type); + MethodInfo[] methods = type.GetMethods(); + foreach (MethodInfo methodInfo in methods) + Console.WriteLine("Function name -> {0}",methodInfo.Name); + } + Console.WriteLine(); + } + Console.ReadLine(); + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q3/Properties/AssemblyInfo.cs b/Lab 2/k163680_Lab2/k163680_Q3/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6681788 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q3/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q3")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q3")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4f49f09a-789a-4aeb-acce-d4040f9648c6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 2/k163680_Lab2/k163680_Q3/k163680_Q3.csproj b/Lab 2/k163680_Lab2/k163680_Q3/k163680_Q3.csproj new file mode 100644 index 0000000..8c07b83 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q3/k163680_Q3.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {4F49F09A-789A-4AEB-ACCE-D4040F9648C6} + Exe + k163680_Q3 + k163680_Q3 + v4.5 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q4/ConversionRates.cs b/Lab 2/k163680_Lab2/k163680_Q4/ConversionRates.cs new file mode 100644 index 0000000..a77d838 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/ConversionRates.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace k163680_Q4 +{ + public class ConversionRates + { + Dictionary _currencyRates; + + public ConversionRates() + { + _currencyRates = new Dictionary() + { + { "AFN", new CurrencyRate("Afghani", 78.25,"AFN") }, + { "AUD" , new CurrencyRate("Australian Dollar",1.46,"AUD") }, + { "CAD" , new CurrencyRate("Canadian Dollar", 1.32,"CAD") }, + { "EUR" , new CurrencyRate("Euro", 0.9,"EUR") }, + { "JPY" , new CurrencyRate("Yen", 108.89,"JPY") }, + { "PKR" , new CurrencyRate("Pakistan Rupee", 155.75,"PKR") }, + { "QAR" , new CurrencyRate("Qatari Rial", 3.64,"QAR") } + + }; + } + + public Dictionary currencyRates + { + get { return this._currencyRates; } + } + } +} \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q4/CurrencyConversion.asmx b/Lab 2/k163680_Lab2/k163680_Q4/CurrencyConversion.asmx new file mode 100644 index 0000000..52d613d --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/CurrencyConversion.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="CurrencyConversion.asmx.cs" Class="k163680_Q4.CurrencyConversion" %> diff --git a/Lab 2/k163680_Lab2/k163680_Q4/CurrencyConversion.asmx.cs b/Lab 2/k163680_Lab2/k163680_Q4/CurrencyConversion.asmx.cs new file mode 100644 index 0000000..eb44fb8 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/CurrencyConversion.asmx.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Services; + +namespace k163680_Q4 +{ + /// + [WebService(Namespace = "http://www.tempuri.com/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [System.ComponentModel.ToolboxItem(false)] + + // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. + // [System.Web.Script.Services.ScriptService] + public class CurrencyConversion : System.Web.Services.WebService + { + private CurrencyConverter currencyConverter; + public CurrencyConversion() + { + currencyConverter = new CurrencyConverter(); + } + + + [WebMethod] + public CurrencyRate[] GetCurrencyRates() + { + return currencyConverter.getCurrencyRates(); + } + [WebMethod] + public double GetCurrencyConversion(string sourceCurrency, double amount, string destinationCurrency) + { + return currencyConverter.convertCurrency(sourceCurrency, amount, destinationCurrency); + } + + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q4/CurrencyConverter.cs b/Lab 2/k163680_Lab2/k163680_Q4/CurrencyConverter.cs new file mode 100644 index 0000000..290c523 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/CurrencyConverter.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace k163680_Q4 +{ + public class CurrencyConverter + { + private ConversionRates conversionRates; + + public CurrencyConverter() + { + conversionRates = new ConversionRates(); + } + + public CurrencyRate[] getCurrencyRates() + { + return this.conversionRates.currencyRates.Values.ToArray(); + } + + public double convertCurrency(string sourceCurrency , double amount , string destinationCurrency) + { + if (this.conversionRates.currencyRates.ContainsKey(sourceCurrency) && this.conversionRates.currencyRates.ContainsKey(destinationCurrency)) + { + double usdValue = amount / this.conversionRates.currencyRates[sourceCurrency].rateWrtDollar; + return usdValue * this.conversionRates.currencyRates[destinationCurrency].rateWrtDollar; + } + else + return 0; + } + } +} \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q4/CurrencyRate.cs b/Lab 2/k163680_Lab2/k163680_Q4/CurrencyRate.cs new file mode 100644 index 0000000..70290e4 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/CurrencyRate.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace k163680_Q4 +{ + [Serializable] + public class CurrencyRate + { + public string currencyName; + public double rateWrtDollar; + public string currencyCode; + public CurrencyRate() + { + + } + public CurrencyRate(string currencyName, double rateWrtDollar, string currencyCode) + { + this.currencyName = currencyName; + this.rateWrtDollar = rateWrtDollar; + this.currencyCode = currencyCode; + } + } +} \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q4/Properties/AssemblyInfo.cs b/Lab 2/k163680_Lab2/k163680_Q4/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0c9cfcf --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q4")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q4")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("57d404ba-c94d-478f-a607-fc0e45952cec")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 2/k163680_Lab2/k163680_Q4/Web.Debug.config b/Lab 2/k163680_Lab2/k163680_Q4/Web.Debug.config new file mode 100644 index 0000000..fae9cfe --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q4/Web.Release.config b/Lab 2/k163680_Lab2/k163680_Q4/Web.Release.config new file mode 100644 index 0000000..da6e960 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q4/Web.config b/Lab 2/k163680_Lab2/k163680_Q4/Web.config new file mode 100644 index 0000000..808cee6 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/Web.config @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/Lab 2/k163680_Lab2/k163680_Q4/bin/k163680_Q4.dll b/Lab 2/k163680_Lab2/k163680_Q4/bin/k163680_Q4.dll new file mode 100644 index 0000000..b54a8f2 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q4/bin/k163680_Q4.dll differ diff --git a/Lab 2/k163680_Lab2/k163680_Q4/bin/k163680_Q4.dll.config b/Lab 2/k163680_Lab2/k163680_Q4/bin/k163680_Q4.dll.config new file mode 100644 index 0000000..808cee6 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/bin/k163680_Q4.dll.config @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/Lab 2/k163680_Lab2/k163680_Q4/bin/k163680_Q4.pdb b/Lab 2/k163680_Lab2/k163680_Q4/bin/k163680_Q4.pdb new file mode 100644 index 0000000..eba970f Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q4/bin/k163680_Q4.pdb differ diff --git a/Lab 2/k163680_Lab2/k163680_Q4/k163680_Q4.csproj b/Lab 2/k163680_Lab2/k163680_Q4/k163680_Q4.csproj new file mode 100644 index 0000000..6f2ee8a --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/k163680_Q4.csproj @@ -0,0 +1,114 @@ + + + + Debug + AnyCPU + + + 2.0 + {57D404BA-C94D-478F-A607-FC0E45952CEC} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + k163680_Q4 + k163680_Q4 + v4.0 + true + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + Web.config + + + Web.config + + + + + + + + + CurrencyConversion.asmx + Component + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 61108 + / + http://localhost:60972/ + False + False + + + False + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q4/k163680_Q4.csproj.user b/Lab 2/k163680_Lab2/k163680_Q4/k163680_Q4.csproj.user new file mode 100644 index 0000000..5831b7b --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/k163680_Q4.csproj.user @@ -0,0 +1,38 @@ + + + + true + + + + + + + Debug|Any CPU + + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + True + False + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..2f25969 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.csproj.FileListAbsolute.txt b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..247eb2c --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q4\bin\k163680_Q4.dll.config +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q4\bin\k163680_Q4.dll +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q4\bin\k163680_Q4.pdb +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q4\obj\Debug\k163680_Q4.csprojAssemblyReference.cache +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q4\obj\Debug\k163680_Q4.dll +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q4\obj\Debug\k163680_Q4.pdb diff --git a/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.csprojAssemblyReference.cache b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.csprojAssemblyReference.cache new file mode 100644 index 0000000..e3ca6a0 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.csprojAssemblyReference.cache differ diff --git a/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.dll b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.dll new file mode 100644 index 0000000..b54a8f2 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.dll differ diff --git a/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.pdb b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.pdb new file mode 100644 index 0000000..eba970f Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q4/obj/Debug/k163680_Q4.pdb differ diff --git a/Lab 2/k163680_Lab2/k163680_Q4/obj/Release/k163680_Q4.csprojAssemblyReference.cache b/Lab 2/k163680_Lab2/k163680_Q4/obj/Release/k163680_Q4.csprojAssemblyReference.cache new file mode 100644 index 0000000..d0ea321 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q4/obj/Release/k163680_Q4.csprojAssemblyReference.cache differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/App.config b/Lab 2/k163680_Lab2/k163680_Q5/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversion.cs b/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversion.cs new file mode 100644 index 0000000..b1b0291 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversion.cs @@ -0,0 +1,231 @@ +//------------------------------------------------------------------------------ +// +// 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.ComponentModel; +using System.Diagnostics; +using System.Web.Services; +using System.Web.Services.Protocols; +using System.Xml.Serialization; + +// +// This source code was auto-generated by wsdl, Version=4.8.3928.0. +// + + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")] +[System.Diagnostics.DebuggerStepThroughAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Web.Services.WebServiceBindingAttribute(Name="CurrencyConversionSoap", Namespace="http://www.tempuri.com/")] +public partial class CurrencyConversion : System.Web.Services.Protocols.SoapHttpClientProtocol { + + private System.Threading.SendOrPostCallback GetCurrencyRatesOperationCompleted; + + private System.Threading.SendOrPostCallback GetCurrencyConversionOperationCompleted; + + /// + public CurrencyConversion() { + this.Url = "http://localhost:60972/CurrencyConversion.asmx"; + } + + /// + public event GetCurrencyRatesCompletedEventHandler GetCurrencyRatesCompleted; + + /// + public event GetCurrencyConversionCompletedEventHandler GetCurrencyConversionCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.tempuri.com/GetCurrencyRates", RequestNamespace="http://www.tempuri.com/", ResponseNamespace="http://www.tempuri.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public CurrencyRate[] GetCurrencyRates() { + object[] results = this.Invoke("GetCurrencyRates", new object[0]); + return ((CurrencyRate[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetCurrencyRates(System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetCurrencyRates", new object[0], callback, asyncState); + } + + /// + public CurrencyRate[] EndGetCurrencyRates(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((CurrencyRate[])(results[0])); + } + + /// + public void GetCurrencyRatesAsync() { + this.GetCurrencyRatesAsync(null); + } + + /// + public void GetCurrencyRatesAsync(object userState) { + if ((this.GetCurrencyRatesOperationCompleted == null)) { + this.GetCurrencyRatesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCurrencyRatesOperationCompleted); + } + this.InvokeAsync("GetCurrencyRates", new object[0], this.GetCurrencyRatesOperationCompleted, userState); + } + + private void OnGetCurrencyRatesOperationCompleted(object arg) { + if ((this.GetCurrencyRatesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetCurrencyRatesCompleted(this, new GetCurrencyRatesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.tempuri.com/GetCurrencyConversion", RequestNamespace="http://www.tempuri.com/", ResponseNamespace="http://www.tempuri.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public double GetCurrencyConversion(string sourceCurrency, double amount, string destinationCurrency) { + object[] results = this.Invoke("GetCurrencyConversion", new object[] { + sourceCurrency, + amount, + destinationCurrency}); + return ((double)(results[0])); + } + + /// + public System.IAsyncResult BeginGetCurrencyConversion(string sourceCurrency, double amount, string destinationCurrency, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetCurrencyConversion", new object[] { + sourceCurrency, + amount, + destinationCurrency}, callback, asyncState); + } + + /// + public double EndGetCurrencyConversion(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((double)(results[0])); + } + + /// + public void GetCurrencyConversionAsync(string sourceCurrency, double amount, string destinationCurrency) { + this.GetCurrencyConversionAsync(sourceCurrency, amount, destinationCurrency, null); + } + + /// + public void GetCurrencyConversionAsync(string sourceCurrency, double amount, string destinationCurrency, object userState) { + if ((this.GetCurrencyConversionOperationCompleted == null)) { + this.GetCurrencyConversionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCurrencyConversionOperationCompleted); + } + this.InvokeAsync("GetCurrencyConversion", new object[] { + sourceCurrency, + amount, + destinationCurrency}, this.GetCurrencyConversionOperationCompleted, userState); + } + + private void OnGetCurrencyConversionOperationCompleted(object arg) { + if ((this.GetCurrencyConversionCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetCurrencyConversionCompleted(this, new GetCurrencyConversionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } +} + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")] +[System.SerializableAttribute()] +[System.Diagnostics.DebuggerStepThroughAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.tempuri.com/")] +public partial class CurrencyRate { + + private string currencyNameField; + + private double rateWrtDollarField; + + private string currencyCodeField; + + /// + public string currencyName { + get { + return this.currencyNameField; + } + set { + this.currencyNameField = value; + } + } + + /// + public double rateWrtDollar { + get { + return this.rateWrtDollarField; + } + set { + this.rateWrtDollarField = value; + } + } + + /// + public string currencyCode { + get { + return this.currencyCodeField; + } + set { + this.currencyCodeField = value; + } + } +} + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")] +public delegate void GetCurrencyRatesCompletedEventHandler(object sender, GetCurrencyRatesCompletedEventArgs e); + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")] +[System.Diagnostics.DebuggerStepThroughAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +public partial class GetCurrencyRatesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetCurrencyRatesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public CurrencyRate[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((CurrencyRate[])(this.results[0])); + } + } +} + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")] +public delegate void GetCurrencyConversionCompletedEventHandler(object sender, GetCurrencyConversionCompletedEventArgs e); + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")] +[System.Diagnostics.DebuggerStepThroughAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +public partial class GetCurrencyConversionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetCurrencyConversionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public double Result { + get { + this.RaiseExceptionIfNecessary(); + return ((double)(this.results[0])); + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversion.dll b/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversion.dll new file mode 100644 index 0000000..bb5ace1 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversion.dll differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversionForm.Designer.cs b/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversionForm.Designer.cs new file mode 100644 index 0000000..f0c217b --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversionForm.Designer.cs @@ -0,0 +1,150 @@ +namespace k163680_Q5 +{ + partial class CurrencyConversionForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SourceCurrencyLabel = new System.Windows.Forms.Label(); + this.Amount = new System.Windows.Forms.Label(); + this.DestinationCurrencyLabel = new System.Windows.Forms.Label(); + this.SourceCurrencyBox = new System.Windows.Forms.ComboBox(); + this.DestinationCurrencyBox = new System.Windows.Forms.ComboBox(); + this.AmountBox = new System.Windows.Forms.TextBox(); + this.CalculateButton = new System.Windows.Forms.Button(); + this.ResultBox = new System.Windows.Forms.RichTextBox(); + this.SuspendLayout(); + // + // SourceCurrencyLabel + // + this.SourceCurrencyLabel.AutoSize = true; + this.SourceCurrencyLabel.Location = new System.Drawing.Point(13, 28); + this.SourceCurrencyLabel.Name = "SourceCurrencyLabel"; + this.SourceCurrencyLabel.Size = new System.Drawing.Size(86, 13); + this.SourceCurrencyLabel.TabIndex = 0; + this.SourceCurrencyLabel.Text = "Source Currency"; + this.SourceCurrencyLabel.Click += new System.EventHandler(this.SourceCurrencyLabel_Click); + // + // Amount + // + this.Amount.AutoSize = true; + this.Amount.Location = new System.Drawing.Point(13, 96); + this.Amount.Name = "Amount"; + this.Amount.Size = new System.Drawing.Size(43, 13); + this.Amount.TabIndex = 1; + this.Amount.Text = "Amount"; + this.Amount.Click += new System.EventHandler(this.Amount_Click); + // + // DestinationCurrencyLabel + // + this.DestinationCurrencyLabel.AutoSize = true; + this.DestinationCurrencyLabel.Location = new System.Drawing.Point(13, 162); + this.DestinationCurrencyLabel.Name = "DestinationCurrencyLabel"; + this.DestinationCurrencyLabel.Size = new System.Drawing.Size(105, 13); + this.DestinationCurrencyLabel.TabIndex = 2; + this.DestinationCurrencyLabel.Text = "Destination Currency"; + this.DestinationCurrencyLabel.Click += new System.EventHandler(this.DestinationCurrencyLabel_Click); + // + // SourceCurrencyBox + // + this.SourceCurrencyBox.FormattingEnabled = true; + this.SourceCurrencyBox.Location = new System.Drawing.Point(16, 45); + this.SourceCurrencyBox.Name = "SourceCurrencyBox"; + this.SourceCurrencyBox.Size = new System.Drawing.Size(417, 21); + this.SourceCurrencyBox.TabIndex = 3; + this.SourceCurrencyBox.SelectedIndexChanged += new System.EventHandler(this.SourceCurrencyBox_SelectedIndexChanged); + // + // DestinationCurrencyBox + // + this.DestinationCurrencyBox.FormattingEnabled = true; + this.DestinationCurrencyBox.Location = new System.Drawing.Point(16, 178); + this.DestinationCurrencyBox.Name = "DestinationCurrencyBox"; + this.DestinationCurrencyBox.Size = new System.Drawing.Size(417, 21); + this.DestinationCurrencyBox.TabIndex = 4; + this.DestinationCurrencyBox.SelectedIndexChanged += new System.EventHandler(this.DestinationCurrencyBox_SelectedIndexChanged); + // + // AmountBox + // + this.AmountBox.Location = new System.Drawing.Point(16, 113); + this.AmountBox.Name = "AmountBox"; + this.AmountBox.Size = new System.Drawing.Size(417, 20); + this.AmountBox.TabIndex = 5; + this.AmountBox.TextChanged += new System.EventHandler(this.AmountBox_TextChanged); + // + // CalculateButton + // + this.CalculateButton.Location = new System.Drawing.Point(267, 220); + this.CalculateButton.Name = "CalculateButton"; + this.CalculateButton.Size = new System.Drawing.Size(166, 23); + this.CalculateButton.TabIndex = 6; + this.CalculateButton.Text = "Calculate"; + this.CalculateButton.UseVisualStyleBackColor = true; + this.CalculateButton.Click += new System.EventHandler(this.CalculateButton_Click); + // + // ResultBox + // + this.ResultBox.Location = new System.Drawing.Point(16, 249); + this.ResultBox.Name = "ResultBox"; + this.ResultBox.Size = new System.Drawing.Size(417, 80); + this.ResultBox.TabIndex = 7; + this.ResultBox.Text = ""; + this.ResultBox.TextChanged += new System.EventHandler(this.ResultBox_TextChanged); + // + // CurrencyConversionForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Info; + this.ClientSize = new System.Drawing.Size(445, 356); + this.Controls.Add(this.ResultBox); + this.Controls.Add(this.CalculateButton); + this.Controls.Add(this.AmountBox); + this.Controls.Add(this.DestinationCurrencyBox); + this.Controls.Add(this.SourceCurrencyBox); + this.Controls.Add(this.DestinationCurrencyLabel); + this.Controls.Add(this.Amount); + this.Controls.Add(this.SourceCurrencyLabel); + this.MaximizeBox = false; + this.Name = "CurrencyConversionForm"; + this.Text = "Currency Conversion"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label SourceCurrencyLabel; + private System.Windows.Forms.Label Amount; + private System.Windows.Forms.Label DestinationCurrencyLabel; + private System.Windows.Forms.ComboBox SourceCurrencyBox; + private System.Windows.Forms.ComboBox DestinationCurrencyBox; + private System.Windows.Forms.TextBox AmountBox; + private System.Windows.Forms.Button CalculateButton; + private System.Windows.Forms.RichTextBox ResultBox; + } +} + diff --git a/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversionForm.cs b/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversionForm.cs new file mode 100644 index 0000000..55638cf --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/CurrencyConversionForm.cs @@ -0,0 +1,84 @@ +using System; +using System.Windows.Forms; + +namespace k163680_Q5 +{ + public partial class CurrencyConversionForm : Form + { + private CurrencyConversion currencyConversion; + private CurrencyRate[] currencyRates; + public CurrencyConversionForm() + { + InitializeComponent(); + currencyConversion = new CurrencyConversion(); + currencyRates = currencyConversion.GetCurrencyRates(); + for (int i = 0; i < currencyRates.Length; i++) + { + SourceCurrencyBox.Items.Add(currencyRates[i].currencyName); + DestinationCurrencyBox.Items.Add(currencyRates[i].currencyName); + } + } + + private void SourceCurrencyLabel_Click(object sender, EventArgs e) + { + + } + + private void Amount_Click(object sender, EventArgs e) + { + + } + + private void DestinationCurrencyLabel_Click(object sender, EventArgs e) + { + + } + + private void AmountBox_TextChanged(object sender, EventArgs e) + { + + } + + private void SourceCurrencyBox_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void DestinationCurrencyBox_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void ResultBox_TextChanged(object sender, EventArgs e) + { + + } + + private void CalculateButton_Click(object sender, EventArgs e) + { + string sourceCurrencyName = SourceCurrencyBox.Text; + string destinationCurrencyName = DestinationCurrencyBox.Text; + double amount = 0; + double.TryParse(AmountBox.Text,out amount); + + string sourceCurrencyCode = ""; + string destinationCurrencyCode = ""; + + if (sourceCurrencyName!="" && destinationCurrencyName!="" && amount!=0) + { + for(int i=0;i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q5/Program.cs b/Lab 2/k163680_Lab2/k163680_Q5/Program.cs new file mode 100644 index 0000000..b2d89e8 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/Program.cs @@ -0,0 +1,19 @@ +using System; +using System.Windows.Forms; + +namespace k163680_Q5 +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new CurrencyConversionForm()); + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q5/Properties/AssemblyInfo.cs b/Lab 2/k163680_Lab2/k163680_Q5/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f3fd6de --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q5")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q5")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("868ff619-8eb8-4660-810f-c75ed1c8fc6f")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 2/k163680_Lab2/k163680_Q5/Properties/Resources.Designer.cs b/Lab 2/k163680_Lab2/k163680_Q5/Properties/Resources.Designer.cs new file mode 100644 index 0000000..2132a88 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace k163680_Q5.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("k163680_Q5.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q5/Properties/Resources.resx b/Lab 2/k163680_Lab2/k163680_Q5/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q5/Properties/Settings.Designer.cs b/Lab 2/k163680_Lab2/k163680_Q5/Properties/Settings.Designer.cs new file mode 100644 index 0000000..22b099b --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace k163680_Q5.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q5/Properties/Settings.settings b/Lab 2/k163680_Lab2/k163680_Q5/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/CurrencyConversion.dll b/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/CurrencyConversion.dll new file mode 100644 index 0000000..bb5ace1 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/CurrencyConversion.dll differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/k163680_Q5.exe b/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/k163680_Q5.exe new file mode 100644 index 0000000..d0eec6b Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/k163680_Q5.exe differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/k163680_Q5.exe.config b/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/k163680_Q5.exe.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/k163680_Q5.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/k163680_Q5.pdb b/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/k163680_Q5.pdb new file mode 100644 index 0000000..7ff7521 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/bin/Debug/k163680_Q5.pdb differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/k163680_Q5.csproj b/Lab 2/k163680_Lab2/k163680_Q5/k163680_Q5.csproj new file mode 100644 index 0000000..73067cf --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/k163680_Q5.csproj @@ -0,0 +1,86 @@ + + + + + Debug + AnyCPU + {868FF619-8EB8-4660-810F-C75ED1C8FC6F} + WinExe + k163680_Q5 + k163680_Q5 + v4.5 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + .\CurrencyConversion.dll + + + + + + + + + + + + + + + + + Form + + + CurrencyConversionForm.cs + + + + + CurrencyConversionForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..32feef4 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..4cb92a4 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.CurrencyConversionForm.resources b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.CurrencyConversionForm.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.CurrencyConversionForm.resources differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.Properties.Resources.resources b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.Properties.Resources.resources differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csproj.CopyComplete b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csproj.FileListAbsolute.txt b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..dfd5588 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\obj\Debug\k163680_Q5.csprojAssemblyReference.cache +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\obj\Debug\k163680_Q5.CurrencyConversionForm.resources +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\obj\Debug\k163680_Q5.Properties.Resources.resources +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\obj\Debug\k163680_Q5.csproj.GenerateResource.cache +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\bin\Debug\k163680_Q5.exe.config +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\bin\Debug\k163680_Q5.exe +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\bin\Debug\k163680_Q5.pdb +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\bin\Debug\CurrencyConversion.dll +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\obj\Debug\k163680_Q5.csproj.CopyComplete +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\obj\Debug\k163680_Q5.exe +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q5\obj\Debug\k163680_Q5.pdb diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csproj.GenerateResource.cache b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csproj.GenerateResource.cache new file mode 100644 index 0000000..7b738af Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csproj.GenerateResource.cache differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csprojAssemblyReference.cache b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csprojAssemblyReference.cache new file mode 100644 index 0000000..28b9e30 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.csprojAssemblyReference.cache differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.exe b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.exe new file mode 100644 index 0000000..d0eec6b Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.exe differ diff --git a/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.pdb b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.pdb new file mode 100644 index 0000000..7ff7521 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q5/obj/Debug/k163680_Q5.pdb differ diff --git a/Lab 2/k163680_Lab2/k163680_Q6/ConversionRates.cs b/Lab 2/k163680_Lab2/k163680_Q6/ConversionRates.cs new file mode 100644 index 0000000..70789c8 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/ConversionRates.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace k163680_Q6 +{ + public class ConversionRates + { + Dictionary _currencyRates; + + public ConversionRates() + { + _currencyRates = new Dictionary() + { + { "AFN", new CurrencyRate("Afghani", 78.25) }, + { "AUD" , new CurrencyRate("Australian Dollar",1.46) }, + { "CAD" , new CurrencyRate("Canadian Dollar", 1.32) }, + { "EUR" , new CurrencyRate("Euro", 0.9) }, + { "JPY" , new CurrencyRate("Yen", 108.89) }, + { "PKR" , new CurrencyRate("Pakistan Rupee", 155.75) }, + { "QAR" , new CurrencyRate("Qatari Rial", 3.64) } + + }; + } + + public Dictionary currencyRates + { + get { return this._currencyRates; } + } + } +} \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q6/CurrencyConversion.svc b/Lab 2/k163680_Lab2/k163680_Q6/CurrencyConversion.svc new file mode 100644 index 0000000..f6f64b1 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/CurrencyConversion.svc @@ -0,0 +1 @@ +<%@ ServiceHost Language="C#" Debug="true" Service="k163680_Q6.CurrencyConversion" CodeBehind="CurrencyConversion.svc.cs" %> \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q6/CurrencyConversion.svc.cs b/Lab 2/k163680_Lab2/k163680_Q6/CurrencyConversion.svc.cs new file mode 100644 index 0000000..60b4441 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/CurrencyConversion.svc.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.ServiceModel; +using System.ServiceModel.Web; +using System.Text; + +namespace k163680_Q6 +{ + // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together. + // NOTE: In order to launch WCF Test Client for testing this service, please select Service1.svc or Service1.svc.cs at the Solution Explorer and start debugging. + public class CurrencyConversion : ICurrencyConversion + { + private CurrencyConverter currencyConverter; + public CurrencyConversion() + { + currencyConverter = new CurrencyConverter(); + } + + + public CurrencyRate[] GetCurrencyRates() + { + return currencyConverter.getCurrencyRates(); + } + + public double GetCurrencyConversion(string sourceCurrency, double amount, string destinationCurrency) + { + return currencyConverter.convertCurrency(sourceCurrency, amount, destinationCurrency); + } + } +} diff --git a/Lab 2/k163680_Lab2/k163680_Q6/CurrencyConverter.cs b/Lab 2/k163680_Lab2/k163680_Q6/CurrencyConverter.cs new file mode 100644 index 0000000..83dc861 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/CurrencyConverter.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace k163680_Q6 +{ + public class CurrencyConverter + { + private ConversionRates conversionRates; + + public CurrencyConverter() + { + conversionRates = new ConversionRates(); + } + + public CurrencyRate[] getCurrencyRates() + { + return this.conversionRates.currencyRates.Values.ToArray(); + } + + public double convertCurrency(string sourceCurrency, double amount, string destinationCurrency) + { + if (this.conversionRates.currencyRates.ContainsKey(sourceCurrency) && this.conversionRates.currencyRates.ContainsKey(destinationCurrency)) + { + double usdValue = amount / this.conversionRates.currencyRates[sourceCurrency].rateWrtDollar; + return usdValue * this.conversionRates.currencyRates[destinationCurrency].rateWrtDollar; + + } + else + return 0; + } + } +} \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q6/CurrencyRate.cs b/Lab 2/k163680_Lab2/k163680_Q6/CurrencyRate.cs new file mode 100644 index 0000000..0412daf --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/CurrencyRate.cs @@ -0,0 +1,20 @@ +using System.Runtime.Serialization; + +namespace k163680_Q6 +{ + [DataContract] + public class CurrencyRate + { + [DataMember] + public string currencyName; + [DataMember] + public double rateWrtDollar; + + public CurrencyRate(string currencyName, double rateWrtDollar) + { + this.currencyName = currencyName; + this.rateWrtDollar = rateWrtDollar; + } + + } +} \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q6/ICurrencyConversion.cs b/Lab 2/k163680_Lab2/k163680_Q6/ICurrencyConversion.cs new file mode 100644 index 0000000..1faa52e --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/ICurrencyConversion.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.ServiceModel; + +namespace k163680_Q6 +{ + // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together. + [ServiceContract] + public interface ICurrencyConversion + { + + [OperationContract] + CurrencyRate[] GetCurrencyRates(); + + [OperationContract] + double GetCurrencyConversion(string sourceCurrency, double amount, string destinationCurrency); + + // TODO: Add your service operations here + } + + + // Use a data contract as illustrated in the sample below to add composite types to service operations. + + +} diff --git a/Lab 2/k163680_Lab2/k163680_Q6/Properties/AssemblyInfo.cs b/Lab 2/k163680_Lab2/k163680_Q6/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..619c407 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("k163680_Q6")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("k163680_Q6")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b7f28970-3e66-457b-a735-f518ee423be9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lab 2/k163680_Lab2/k163680_Q6/Web.Debug.config b/Lab 2/k163680_Lab2/k163680_Q6/Web.Debug.config new file mode 100644 index 0000000..fae9cfe --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q6/Web.Release.config b/Lab 2/k163680_Lab2/k163680_Q6/Web.Release.config new file mode 100644 index 0000000..da6e960 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q6/Web.config b/Lab 2/k163680_Lab2/k163680_Q6/Web.config new file mode 100644 index 0000000..9ecad58 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/Web.config @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Lab 2/k163680_Lab2/k163680_Q6/bin/k163680_Q6.dll b/Lab 2/k163680_Lab2/k163680_Q6/bin/k163680_Q6.dll new file mode 100644 index 0000000..0736271 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q6/bin/k163680_Q6.dll differ diff --git a/Lab 2/k163680_Lab2/k163680_Q6/bin/k163680_Q6.dll.config b/Lab 2/k163680_Lab2/k163680_Q6/bin/k163680_Q6.dll.config new file mode 100644 index 0000000..9ecad58 --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/bin/k163680_Q6.dll.config @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Lab 2/k163680_Lab2/k163680_Q6/bin/k163680_Q6.pdb b/Lab 2/k163680_Lab2/k163680_Q6/bin/k163680_Q6.pdb new file mode 100644 index 0000000..c7f0cc3 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q6/bin/k163680_Q6.pdb differ diff --git a/Lab 2/k163680_Lab2/k163680_Q6/k163680_Q6.csproj b/Lab 2/k163680_Lab2/k163680_Q6/k163680_Q6.csproj new file mode 100644 index 0000000..e5b437f --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/k163680_Q6.csproj @@ -0,0 +1,119 @@ + + + + Debug + AnyCPU + + + 2.0 + {B7F28970-3E66-457B-A735-F518EE423BE9} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + k163680_Q6 + k163680_Q6 + v4.0 + True + true + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CurrencyConversion.svc + + + + + + + + + + + + Web.config + + + Web.config + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 64796 + / + http://localhost:64418/ + False + False + + + False + + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q6/k163680_Q6.csproj.user b/Lab 2/k163680_Lab2/k163680_Q6/k163680_Q6.csproj.user new file mode 100644 index 0000000..5831b7b --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/k163680_Q6.csproj.user @@ -0,0 +1,38 @@ + + + + true + + + + + + + Debug|Any CPU + + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + True + False + + + + + \ No newline at end of file diff --git a/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..54b6406 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.csproj.FileListAbsolute.txt b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ebc690e --- /dev/null +++ b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q6\obj\Debug\k163680_Q6.csprojAssemblyReference.cache +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q6\bin\k163680_Q6.dll.config +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q6\bin\k163680_Q6.dll +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q6\bin\k163680_Q6.pdb +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q6\obj\Debug\k163680_Q6.dll +F:\FAST NU\Semester 7\Infomation Processing Techniques CS-423\assignments\Lab 2\k163680_Lab2\k163680_Q6\obj\Debug\k163680_Q6.pdb diff --git a/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.csprojAssemblyReference.cache b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.csprojAssemblyReference.cache new file mode 100644 index 0000000..8e80e7e Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.csprojAssemblyReference.cache differ diff --git a/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.dll b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.dll new file mode 100644 index 0000000..0736271 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.dll differ diff --git a/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.pdb b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.pdb new file mode 100644 index 0000000..c7f0cc3 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q6/obj/Debug/k163680_Q6.pdb differ diff --git a/Lab 2/k163680_Lab2/k163680_Q6/obj/Release/k163680_Q6.csprojAssemblyReference.cache b/Lab 2/k163680_Lab2/k163680_Q6/obj/Release/k163680_Q6.csprojAssemblyReference.cache new file mode 100644 index 0000000..ec69293 Binary files /dev/null and b/Lab 2/k163680_Lab2/k163680_Q6/obj/Release/k163680_Q6.csprojAssemblyReference.cache differ