diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
new file mode 100644
index 0000000..502e5ce
--- /dev/null
+++ b/.github/workflows/dotnetcore.yml
@@ -0,0 +1,23 @@
+name: .NET Core
+
+on: [push, pull_request]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: Setup .NET Core
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 3.0.100
+ - name: Build with dotnet
+ run: |
+ cd CourseApp
+ dotnet build --configuration Release
+ - name: Run tests
+ run: |
+ cd CourseApp.Tests
+ dotnet test
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b3d563b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,208 @@
+# Download this file using PowerShell v3 under Windows with the following comand:
+# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
+# or wget:
+# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+
+[Dd]ebug/
+[Rr]elease/
+x64/
+build/
+[Bb]in/
+[Oo]bj/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+*_i.c
+*_p.c
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.log
+*.scc
+
+# OS generated files #
+.DS_Store*
+Icon?
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+*.ncrunch*
+.*crunch*.local.xml
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.Publish.xml
+
+# Windows Azure Build Output
+csx
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Others
+*.Cache
+ClientBin/
+# [Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.[Pp]ublish.xml
+*.pfx
+*.publishsettings
+modulesbin/
+tempbin/
+
+# EPiServer Site file (VPP)
+AppData/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# vim
+*.txt~
+*.swp
+*.swo
+
+# svn
+.svn
+
+# Remainings from resolvings conflicts in Source Control
+*.orig
+
+# SQL Server files
+**/App_Data/*.mdf
+**/App_Data/*.ldf
+**/App_Data/*.sdf
+
+
+#LightSwitch generated files
+GeneratedArtifacts/
+_Pvt_Extensions/
+ModelManifest.xml
+
+# =========================
+# Windows detritus
+# =========================
+
+# Windows image file caches
+Thumbs.db
+ehthumbs.db
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Mac desktop service store files
+.DS_Store
+
+# SASS Compiler cache
+.sass-cache
+
+# Visual Studio 2014 CTP
+**/*.sln.ide
+
+# Visual Studio temp something
+.vs/
+
+# VS 2015+
+*.vc.vc.opendb
+*.vc.db
+
+# Rider
+.idea/
+
+**/node_modules/*
+
+# Added by Jskonst
+Properties/
+
+#Added Anastasia
+git
+
+#####
+# End of core ignore list, below put you custom 'per project' settings (patterns or path)
+#####
\ No newline at end of file
diff --git a/CourseApp.Tests/CourseApp.Tests.csproj b/CourseApp.Tests/CourseApp.Tests.csproj
new file mode 100644
index 0000000..372ec0e
--- /dev/null
+++ b/CourseApp.Tests/CourseApp.Tests.csproj
@@ -0,0 +1,30 @@
+
+
+
+ netcoreapp3.0
+ True
+ 1573,1591,1701;1702;1705
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ../_stylecop/stylecop.ruleset
+ true
+
+
+
+
+
+
+
diff --git a/CourseApp.Tests/DemoTest.cs b/CourseApp.Tests/DemoTest.cs
new file mode 100644
index 0000000..68d5c89
--- /dev/null
+++ b/CourseApp.Tests/DemoTest.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using Xunit;
+
+namespace CourseApp.Tests
+{
+ public class DemoTest
+ {
+ [Fact]
+ public void TestFunc()
+ {
+ var res = Program.MyFunction(0, 0);
+ Assert.Equal(double.PositiveInfinity, res, 3);
+ }
+
+ [Fact]
+ public void TestTaskA()
+ {
+ double a = 2;
+ double xn = 1.2;
+ double xk = 4.2;
+ double dx = 0.6;
+ List res = Program.TaskA(a, xn, xk, dx);
+ List exp = new List { 0.024919580136386867, 0.02327901792977313, 0.02138591667754329, 0.019542362678459768, 0.01785029731362981 };
+ for (int i = 0; i < exp.Count; i++)
+ {
+ Assert.Equal(exp[i], res[i], 3);
+ }
+ }
+
+ [Fact]
+ public void TestTastAUncorrect()
+ {
+ List res = Program.TaskA(3, 4.2, 1.2, 0.7);
+ Assert.Equal(new List(), res);
+ }
+
+ [Fact]
+ public void TestTaskB()
+ {
+ List xB = new List { 1.16, 1.32, 1.47, 1.65, 1.93 };
+ List res = Program.TaskB(2, xB);
+ List exp = new List { 0.025004724857363752, 0.024639361870982292, 0.024247019851321865, 0.023732277381772752, 0.022875026963062515 };
+ for (int i = 0; i < exp.Count; i++)
+ {
+ Assert.Equal(exp[i], res[i], 3);
+ }
+ }
+
+ [Fact]
+ public void TestZeroLengthB()
+ {
+ var res = Program.TaskB(0, new List());
+ Assert.Empty(res);
+ }
+ }
+}
diff --git a/CourseApp.Tests/MouseTest.cs b/CourseApp.Tests/MouseTest.cs
new file mode 100644
index 0000000..9941694
--- /dev/null
+++ b/CourseApp.Tests/MouseTest.cs
@@ -0,0 +1,65 @@
+using System;
+using Xunit;
+
+namespace CourseApp.Tests
+{
+ public class MouseTest
+ {
+ [Fact]
+ public void TestEmptyConstructor()
+ {
+ var item = new Mouse();
+ Assert.Equal(0, item.Age);
+ Assert.Equal("Untitled", item.Name);
+ Assert.True(item.IsMale);
+ }
+
+ [Fact]
+ public void TestView()
+ {
+ var item = new Mouse();
+ var view = "```оО````\n ```•._)~``\n ``````````";
+ Assert.Equal(view, item.View());
+ }
+
+ [Fact]
+ public void TestSetAge()
+ {
+ var item = new Mouse();
+ item.Age = 5;
+ Assert.Equal(5, item.Age);
+ }
+
+ [Fact]
+ public void TestIncorrectSetAge()
+ {
+ var item = new Mouse();
+ try
+ {
+ item.Age = -5;
+ }
+ catch (System.Exception)
+ {
+ Assert.True(true);
+ }
+
+ Assert.Equal(0, item.Age);
+ }
+
+ [Fact]
+ public void TestPeep()
+ {
+ var item = new Mouse();
+ Assert.Equal("Mouse squeaks.", item.Peep());
+ }
+
+ [Fact]
+ public void TestToString()
+ {
+ var item = new Mouse();
+ Assert.Equal("The mouse's name is Untitled.He is 0 years old.", item.ToString());
+ item.IsMale = false;
+ Assert.Equal("The mouse's name is Untitled.She is 0 years old.", item.ToString());
+ }
+ }
+}
diff --git a/CourseApp/.vscode/launch.json b/CourseApp/.vscode/launch.json
new file mode 100644
index 0000000..208ea3a
--- /dev/null
+++ b/CourseApp/.vscode/launch.json
@@ -0,0 +1,25 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": ".NET Core Launch (console)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/CourseApp.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}",
+ "console": "internalConsole",
+ "stopAtEntry": false
+ },
+ {
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach",
+ "processId": "${command:pickProcess}"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/CourseApp/.vscode/tasks.json b/CourseApp/.vscode/tasks.json
new file mode 100644
index 0000000..f8c71cd
--- /dev/null
+++ b/CourseApp/.vscode/tasks.json
@@ -0,0 +1,42 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/CourseApp.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/CourseApp.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "watch",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "watch",
+ "run",
+ "${workspaceFolder}/CourseApp.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/CourseApp/CourseApp.csproj b/CourseApp/CourseApp.csproj
new file mode 100644
index 0000000..f01046b
--- /dev/null
+++ b/CourseApp/CourseApp.csproj
@@ -0,0 +1,23 @@
+
+
+
+ Exe
+ netcoreapp3.0
+ True
+ 1573,1591,1701;1702;1705;
+
+
+
+
+
+
+
+ ../_stylecop/stylecop.ruleset
+ true
+
+
+
+
+
+
+
diff --git a/CourseApp/CourseApp.sln b/CourseApp/CourseApp.sln
new file mode 100644
index 0000000..3dac3f4
--- /dev/null
+++ b/CourseApp/CourseApp.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.852
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CourseApp", "CourseApp.csproj", "{17CB0273-34D3-4D23-965F-FC4AD0A83D0F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CourseApp.Tests", "..\CourseApp.Tests\CourseApp.Tests.csproj", "{E0133767-62A2-4B4A-87A2-BD09BC775E0A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {17CB0273-34D3-4D23-965F-FC4AD0A83D0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {17CB0273-34D3-4D23-965F-FC4AD0A83D0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {17CB0273-34D3-4D23-965F-FC4AD0A83D0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {17CB0273-34D3-4D23-965F-FC4AD0A83D0F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E0133767-62A2-4B4A-87A2-BD09BC775E0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E0133767-62A2-4B4A-87A2-BD09BC775E0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E0133767-62A2-4B4A-87A2-BD09BC775E0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E0133767-62A2-4B4A-87A2-BD09BC775E0A}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {1849B280-B447-4D18-9764-F412B7768C4F}
+ EndGlobalSection
+EndGlobal
diff --git a/CourseApp/Mouse.cs b/CourseApp/Mouse.cs
new file mode 100644
index 0000000..ea16698
--- /dev/null
+++ b/CourseApp/Mouse.cs
@@ -0,0 +1,70 @@
+using System;
+
+namespace CourseApp
+{
+ public class Mouse
+ {
+ private int age;
+
+ public Mouse()
+ : this(0, "Untitled", true)
+ {
+ }
+
+ public Mouse(int age, string name, bool isMale)
+ {
+ Name = name;
+ Age = age;
+ IsMale = isMale;
+ }
+
+ public string Name { get; set; }
+
+ public int Age
+ {
+ get
+ {
+ return this.age;
+ }
+
+ set
+ {
+ if (value >= 0 && value < 20)
+ {
+ this.age = value;
+ }
+ else
+ {
+ throw new System.Exception("Age should be > 0 and < than 20");
+ }
+ }
+ }
+
+ public bool IsMale { get; set; }
+
+ public string View()
+ {
+ return "```оО````\n ```•._)~``\n ``````````";
+ }
+
+ public string Peep()
+ {
+ return "Mouse squeaks.";
+ }
+
+ public override string ToString()
+ {
+ string s;
+ if (this.IsMale)
+ {
+ s = "He";
+ }
+ else
+ {
+ s = "She";
+ }
+
+ return $"The mouse's name is {Name}.{s} is {Age} years old.";
+ }
+ }
+}
\ No newline at end of file
diff --git a/CourseApp/Program.cs b/CourseApp/Program.cs
new file mode 100644
index 0000000..f96a6e7
--- /dev/null
+++ b/CourseApp/Program.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+
+namespace CourseApp
+{
+ public class Program
+ {
+ public static double MyFunction(double a, double x)
+ {
+ var c = Math.Pow(Math.Log10(a + x), 2) / Math.Pow(a + x, 2);
+ return c;
+ }
+
+ public static List TaskA (
+ double a,
+ double xn,
+ double xk,
+ double dx)
+ {
+ var y = new List();
+ for (var x = xn; x < xk; x += dx)
+ {
+ y.Add(MyFunction(a, x));
+ }
+
+ return y;
+ }
+
+ public static List TaskB (
+ double a,
+ List x)
+ {
+ var y = new List();
+ for (int i = 0; i < x.Count; i++)
+ {
+ y.Add(MyFunction(a, x[i]));
+ }
+
+ return y;
+ }
+
+ public static void Main(string[] args)
+ {
+ Console.WriteLine("Hello World!");
+ var taskA = TaskA(2, 1.2, 4.2, 0.6);
+
+ for (var i = 0; i < taskA.Count; i++)
+ {
+ Console.WriteLine($"y={taskA[i]}");
+ }
+
+ var xB = new List { 1.16, 1.32, 1.47, 1.65, 1.93 };
+ var taskB = TaskB(2, xB);
+ for (var i = 0; i < xB.Count; i++)
+ {
+ Console.WriteLine($"x={xB[i]} y={taskB[i]}");
+ }
+
+ var item = new Mouse();
+ Console.WriteLine(item.ToString());
+ Console.WriteLine(item.View());
+ Console.WriteLine(item.Peep());
+
+ Console.ReadLine();
+ }
+ }
+}
diff --git a/_stylecop/stylecop.json b/_stylecop/stylecop.json
new file mode 100644
index 0000000..4a96e8f
--- /dev/null
+++ b/_stylecop/stylecop.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
+ "settings": {
+ "documentationRules": {
+ "documentExposedElements": false,
+ "documentInterfaces": false,
+ "companyName": "Test Company",
+ "copyrightText": "This source code is Copyright © {companyName} and MAY NOT be copied, reproduced,\npublished, distributed or transmitted to or stored in any manner without prior\nwritten consent from {companyName} (www.yourcompany.com).",
+ "xmlHeader":false
+ }
+ }
+}
\ No newline at end of file
diff --git a/_stylecop/stylecop.ruleset b/_stylecop/stylecop.ruleset
new file mode 100644
index 0000000..98806c8
--- /dev/null
+++ b/_stylecop/stylecop.ruleset
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/courseworkspace.code-workspace b/courseworkspace.code-workspace
new file mode 100644
index 0000000..4f9af01
--- /dev/null
+++ b/courseworkspace.code-workspace
@@ -0,0 +1,11 @@
+{
+ "folders": [
+ {
+ "path": "CourseApp"
+ },
+ {
+ "path": "CourseApp.Tests"
+ }
+ ],
+ "settings": {}
+}
\ No newline at end of file
diff --git a/git b/git
new file mode 100644
index 0000000..8467781
--- /dev/null
+++ b/git
@@ -0,0 +1,30 @@
+* [32mmaster[m
+ [31mremotes/origin/Aleksandr_Enivatov[m
+ [31mremotes/origin/Aleksandr_Ermakov[m
+ [31mremotes/origin/Aleksandr_Gruzdev[m
+ [31mremotes/origin/Aleksej_Merzljakov[m
+ [31mremotes/origin/Alena_Krutikova[m
+ [31mremotes/origin/Alena_Sheshotova[m
+ [31mremotes/origin/Anastasija_Kasatkina[m
+ [31mremotes/origin/Anatolij_Tkachev[m
+ [31mremotes/origin/Anna_Kubova[m
+ [31mremotes/origin/Anton_Lapshov[m
+ [31mremotes/origin/Daniil_Tretjakov[m
+ [31mremotes/origin/Denis_Oreshnikov[m
+ [31mremotes/origin/Dmitrij_Nazarov[m
+ [31mremotes/origin/Dmitrij_Ovsjanik[m
+ [31mremotes/origin/Evgenij_Satyev[m
+ [31mremotes/origin/Fedor_Tomash[m
+ [31mremotes/origin/HEAD[m -> origin/master
+ [31mremotes/origin/Ilja_Raskatov[m
+ [31mremotes/origin/Konstantin_Tjukalov[m
+ [31mremotes/origin/Ksenija_Kochina[m
+ [31mremotes/origin/Marija_Popova[m
+ [31mremotes/origin/Svetlana_Nesheva[m
+ [31mremotes/origin/Valerija_Kiseleva[m
+ [31mremotes/origin/Veniamin_Kolmogorov[m
+ [31mremotes/origin/Viktor_Morohovtsev[m
+ [31mremotes/origin/Vladislav_Savchenko[m
+ [31mremotes/origin/jskonst[m
+ [31mremotes/origin/jskonst-patch-1[m
+ [31mremotes/origin/master[m