-
Notifications
You must be signed in to change notification settings - Fork 12
Jurij kochnev #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
newdarkshadow
wants to merge
12
commits into
ISUCT:Jurij_Kochnev
Choose a base branch
from
newdarkshadow:Jurij_Kochnev
base: Jurij_Kochnev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Jurij kochnev #37
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
de7601f
dobroe utro
941ec3c
Made first lab
jskonst 24e7ad4
Added blank line
jskonst 08a2f62
Patch 1 (#8)
genyn d736b2e
ya rabotayu v burger king
8ed62ec
no-issue Added sample
jskonst 70c8fe1
1 laba (#14)
KristinaMelnik b364185
tests
af1a8d9
3 lab
ad8ea47
Added stylecop
jskonst 04aa095
code cleanup
jskonst c66dd1d
podpravil code
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| using System; | ||
| using Xunit; | ||
| using ConsoleApp2; | ||
| namespace CourseApp.Tests | ||
| { | ||
| public class UnitTest2 | ||
| { | ||
| [Fact] | ||
| public void CheckSecondKonstruktor1() | ||
| { | ||
| Car car2 = new Car("tesla", 230); | ||
| Assert.Equal("tesla", car2.Name); | ||
| Assert.Equal(230, car2.Speed); | ||
|
|
||
| } | ||
| [Fact] | ||
| public void CheckSecondKonstruktor2() | ||
| { | ||
| Car car2 = new Car("zhigul", 155); | ||
| Assert.Equal("zhigul", car2.Name); | ||
| Assert.Equal(155, car2.Speed); | ||
|
|
||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>netcoreapp2.0</TargetFramework> | ||
| <TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
| <NoWarn>1573,1591,1701;1702;1705</NoWarn> | ||
| <IsPackable>false</IsPackable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" /> | ||
| <PackageReference Include="xunit" Version="2.4.0" /> | ||
| <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" /> | ||
| <PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="all" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\CourseApp\CourseApp.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <CodeAnalysisRuleSet>../stylecop/stylecop.ruleset</CodeAnalysisRuleSet> | ||
| <GenerateFullPaths>true</GenerateFullPaths> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <AdditionalFiles Include="../stylecop/stylecop.json" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 15 | ||
| VisualStudioVersion = 15.0.27428.2002 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CourseApp.Tests", "CourseApp.Tests.csproj", "{7E619433-E12F-45F9-BC3B-B9C0162C5D5F}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {7E619433-E12F-45F9-BC3B-B9C0162C5D5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {7E619433-E12F-45F9-BC3B-B9C0162C5D5F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {7E619433-E12F-45F9-BC3B-B9C0162C5D5F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {7E619433-E12F-45F9-BC3B-B9C0162C5D5F}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {5689BE8B-26B5-4E2F-BDCD-8285FB088509} | ||
| EndGlobalSection | ||
| EndGlobal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| using System; | ||
| using Xunit; | ||
|
|
||
| namespace CourseApp.Tests | ||
| { | ||
| public class DemoTest | ||
| { | ||
| [Fact] | ||
| public void Test1() | ||
| { | ||
| Assert.True(true); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| using System; | ||
| using Xunit; | ||
| using Matan; | ||
|
|
||
|
|
||
| namespace CourseApp.Tests | ||
| { | ||
| public class UnitTest1 | ||
| { | ||
| [Fact] | ||
| public void Test1() | ||
| { | ||
| var res = Program.y(1); | ||
| Assert.Equal(5.0625 , res); | ||
| } | ||
| [Fact] | ||
| public void Test2() | ||
| { | ||
| var res = Program.y(-1); | ||
| Assert.Equal(5.06215, res, 3); | ||
| } | ||
| [Fact] | ||
| public void Test3() | ||
| { | ||
| var res = Program.y(1.25); | ||
| Assert.Equal(0.78, res,3); | ||
| } | ||
| [Fact] | ||
| public void Test4() | ||
| { | ||
| var res = Program.y(2.89); | ||
| Assert.Equal(1173.645, res, 3); | ||
| } | ||
| [Fact] | ||
| public void Test5() | ||
| { | ||
| var res = Program.y(-3.55); | ||
| Assert.Equal(10417.68, res, 3); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| using System; | ||
|
|
||
| namespace ConsoleApp2 | ||
| { | ||
| using System; | ||
|
|
||
| public class Class11 | ||
| { | ||
| private string name; | ||
| private int speed; | ||
|
|
||
| public Class11(string name, int speed) | ||
| { | ||
| this.name = name; | ||
| this.speed = speed; | ||
| } | ||
|
|
||
| public Class11(int speed) | ||
| { | ||
| name = "Noname"; | ||
| this.speed = speed; | ||
| } | ||
|
|
||
| public string Name | ||
| { | ||
| get | ||
| { | ||
| return name; | ||
| } | ||
|
|
||
| set => name = value; | ||
| } | ||
|
|
||
| public int Speed | ||
| { | ||
| get | ||
| { | ||
| return speed; | ||
| } | ||
|
|
||
| set | ||
| { | ||
| if (value > 0) | ||
| { | ||
| speed = value; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| public string GetInfo() | ||
| { | ||
| return $"Имя: {name} скорость: {speed} "; | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 15 | ||
| VisualStudioVersion = 15.0.27428.2002 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CourseApp", "CourseApp.csproj", "{3C2630FF-B548-4F7A-AD39-F42BFAE79DE2}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {3C2630FF-B548-4F7A-AD39-F42BFAE79DE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {3C2630FF-B548-4F7A-AD39-F42BFAE79DE2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {3C2630FF-B548-4F7A-AD39-F42BFAE79DE2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {3C2630FF-B548-4F7A-AD39-F42BFAE79DE2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {7CF6A1A5-9351-446B-A4AA-EFF0A9D65034} | ||
| EndGlobalSection | ||
| EndGlobal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,34 @@ | ||
| using System; | ||
|
|
||
| namespace CourseApp | ||
| namespace Matan | ||
| { | ||
| class Program | ||
| public class Program | ||
| { | ||
| static void Main(string[] args) | ||
| public static double Y(double x) | ||
| { | ||
| Console.WriteLine("Hello World!"); | ||
| return Math.Pow(x: Math.Abs((x * x) - 2.5), y: 4.0) + Math.Pow(Math.Log10(x * x), 3.0); | ||
| } | ||
|
|
||
| private static void Main(string[] args) | ||
| { | ||
| double xn = 1.25; | ||
| double xk = 3.25; | ||
| double dx = 0.4; | ||
|
|
||
| double[] x = new double[5] { 1.84, 2.71, 3.81, 4.56, 5.62 }; | ||
|
|
||
| Console.WriteLine("Задача A:"); | ||
| for (double xl = xn; xl < xk; xl += dx) | ||
| { | ||
| Console.WriteLine($"Для x = {xl}\t y = {Y(xl)}"); | ||
| } | ||
|
|
||
| Console.WriteLine("Задача B:"); | ||
|
|
||
| foreach (double i in x) | ||
| { | ||
| Console.WriteLine($"Для x = {i}\t y = {Y(i)}"); | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| # Course of c# | ||
|
|
||
| Please write your name and surname here | ||
| Jurij_Kochnev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "$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 | ||
| } | ||
| }, | ||
| "additionalArguments": ["./stylecop.ruleset", "./stylecop.json"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <RuleSet Name="StyleCopeRules" Description="StyleCopeRules custom ruleset" ToolsVersion="14.0"> | ||
| <IncludeAll Action="None" /> | ||
| <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers"> | ||
| <Rule Id="SA1101" Action="None" /> | ||
| <Rule Id="SA0001" Action="None" /> | ||
| <Rule Id="SA1210" Action="None" /> | ||
| <Rule Id="SA1633" Action="None" /> | ||
| <Rule Id="SA1600" Action="None" /> | ||
| <Rule Id="AD0001" Action="None" /> | ||
| <Rule Id="CA2234" Action="None" /> | ||
| <Rule Id="SA1200" Action="None" /> | ||
| <Rule Id="SA1000" Action="None" /> | ||
| <Rule Id="SA1012" Action="None" /> | ||
| <Rule Id="SA1012" Action="None" /> | ||
| <Rule Id="SA1009" Action="None" /> | ||
| <Rule Id="SA1012" Action="None" /> | ||
| <Rule Id="SA1652" Action="None" /> | ||
| <Rule Id="CA1305" Action="None" /> | ||
| <Rule Id="CA1056" Action="None" /> | ||
| </Rules> | ||
| </RuleSet> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что за класс? Дайте адекватное имя