Настя Быкова 2 年之前
父節點
當前提交
0e5c890507

+ 22 - 0
TestP1/TestP1.csproj

@@ -0,0 +1,22 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>net6.0</TargetFramework>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <Nullable>enable</Nullable>
+
+    <IsPackable>false</IsPackable>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
+    <PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
+    <PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
+    <PackageReference Include="coverlet.collector" Version="3.1.2" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\exem_var3\exem_var3.csproj" />
+  </ItemGroup>
+
+</Project>

+ 14 - 0
TestP1/UnitTest1.cs

@@ -0,0 +1,14 @@
+using exem_var3;
+namespace TestP1
+
+{
+    [TestClass]
+    public class UnitTest1
+    {
+        [TestMethod]
+        public void TestMethod1()
+        {
+
+        }
+    }
+}

+ 1 - 0
TestP1/Usings.cs

@@ -0,0 +1 @@
+global using Microsoft.VisualStudio.TestTools.UnitTesting;

+ 100 - 0
data.txt

@@ -0,0 +1,100 @@
+PN10;3982;24,946;2,866;
+PN10;3971;50,237;5,591;
+PN10;4059;32,287;3,503;
+PN10;4036;32,329;3,054;
+PN10;3930;49,398;5,054;
+PN10;4053;31,841;3,390;
+PN10;3975;19,860;1,904;A
+PN10;3996;32,038;3,360;
+PN10;4003;63,514;7,145;
+PN10;4035;19,809;2,126;
+PN10;4063;49,845;4,863;
+PN10;3979;62,848;6,840;
+PN10;4034;32,467;3,066;
+PN10;3979;20,197;2,242;
+PN10;3955;25,175;2,536;
+PN10;3950;31,645;3,587;
+PN10;3953;63,040;6,837;
+PN10;3966;62,289;6,019;A
+PN10;3938;63,430;6,548;
+PN10;3963;25,099;2,760;
+PN10;3935;25,112;2,570;
+PN10;4043;40,271;3,814;
+PN10;3930;39,825;4,400;
+PN10;3947;63,851;6,244;
+PN10;4077;40,122;5,336;
+PN16;3945;20,147;2,798;
+PN16;4008;32,244;4,199;A
+PN16;3977;40,566;5,766;
+PN16;4066;31,698;4,168;
+PN16;3959;19,926;2,722;A
+PN16;3948;49,281;6,683;A
+PN16;3927;32,341;4,608;
+PN16;3923;20,085;2,630;
+PN16;3924;24,776;3,313;A
+PN16;3933;63,627;8,763;
+PN16;4004;20,153;2,636;
+PN16;4030;40,450;5,399;A
+PN16;3967;62,660;8,472;
+PN16;3997;32,065;4,392;
+PN16;4074;49,710;6,718;
+PN16;3939;40,478;5,393;
+PN16;4014;49,741;7,087;A
+PN16;3988;25,238;3,485;
+PN16;4071;19,844;2,820;
+PN16;3952;39,952;5,444;A
+PN16;3974;25,190;3,532;
+PN16;3945;19,954;2,697;
+PN16;4023;50,311;6,753;
+PN16;3999;32,144;4,400;
+PN16;3926;63,346;8,967;
+PN20;4061;40,244;6,991;
+PN20;4065;39,744;6,842;
+PN20;4011;32,118;5,295;
+PN20;4048;49,696;8,317;A
+PN20;3954;24,901;4,139;
+PN20;3979;19,954;3,461;A
+PN20;4009;39,960;6,866;A
+PN20;4025;20,065;3,358;
+PN20;3952;20,114;3,440;
+PN20;3946;25,151;4,139;A
+PN20;3992;19,838;3,250;
+PN20;3951;39,593;6,758;A
+PN20;3963;40,522;6,765;
+PN20;4058;32,173;5,121;A
+PN20;3952;20,286;3,433;A
+PN20;3954;20,150;3,209;
+PN20;4005;25,219;4,198;
+PN20;3940;40,372;6,450;A
+PN20;4036;50,312;8,037;
+PN20;4069;63,485;10,198;
+PN20;4004;49,382;7,971;
+PN20;4029;62,439;10,519;
+PN20;3961;50,727;8,643;
+PN20;3968;40,554;6,839;A
+PN20;4080;20,031;3,411;
+PN25;4021;20,100;3,486;A
+PN25;4038;39,752;6,413;A
+PN25;3945;49,263;8,299;A
+PN25;4065;19,932;3,435;A
+PN25;4060;25,072;4,340;A
+PN25;4063;31,867;5,473;A
+PN25;3959;20,230;3,441;A
+PN25;3938;50,223;8,548;A
+PN25;4004;62,309;10,537;A
+PN25;3979;20,153;3,206;A
+PN25;3994;31,655;5,557;A
+PN25;4035;25,200;4,150;A
+PN25;3997;49,295;8,051;
+PN25;3991;32,478;5,502;A
+PN25;3944;39,493;6,638;A
+PN25;4068;19,821;3,304;
+PN25;3934;20,039;3,417;A
+PN25;4033;63,017;10,910;
+PN25;3968;20,046;3,350;A
+PN25;4014;62,603;10,080;A
+PN25;4057;24,791;4,117;A
+PN25;3977;40,109;6,970;A
+PN25;4012;49,395;8,121;A
+PN25;3922;19,843;3,371;A
+PN25;3940;25,350;4,168;A

二進制
diagrams/Варианты использования.png


二進制
diagrams/Последовательности.png


二進制
diagrams/Развертывания.png


+ 6 - 0
exem_var3.sln

@@ -5,6 +5,8 @@ VisualStudioVersion = 17.2.32526.322
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "exem_var3", "\main\RDP\31П\БыковаАА\Desktop\exem_Bykova31p\exem_var3\exem_var3\exem_var3.csproj", "{7BAF6DAC-E394-42D9-97C4-CA19B1F24EE6}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestP1", "\main\RDP\31П\БыковаАА\Desktop\exem_Bykova31p\exem_var3\TestP1\TestP1.csproj", "{A2ACAA80-B719-4463-AB5C-3F306E3A1CC1}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
 		{7BAF6DAC-E394-42D9-97C4-CA19B1F24EE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{7BAF6DAC-E394-42D9-97C4-CA19B1F24EE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{7BAF6DAC-E394-42D9-97C4-CA19B1F24EE6}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A2ACAA80-B719-4463-AB5C-3F306E3A1CC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A2ACAA80-B719-4463-AB5C-3F306E3A1CC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A2ACAA80-B719-4463-AB5C-3F306E3A1CC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A2ACAA80-B719-4463-AB5C-3F306E3A1CC1}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 4 - 0
exem_var3/Deb.cs

@@ -10,6 +10,10 @@ namespace exem_var3
 {
     internal class Deb
     {
+        /// <summary>
+        /// Строка записи в файл diagW.txt
+        /// </summary>
+        /// <param name="str">Строка записи в файл</param>
         public static void diagW(string str) 
         {
             TextWriterTraceListener x = new TextWriterTraceListener(File.AppendText("diagW.txt"));

+ 13 - 1
exem_var3/Mod1.cs

@@ -3,10 +3,22 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Diagnostics;
+using System.IO;
 
 namespace exem_var3
 {
-    internal class Mod1
+    public class Mod1
     {
+        public  void read()//метод считывания данных из файла
+        {
+            string data = "data.txt";
+            string[] da = new string[400];
+            da = File.ReadAllLines(data);
+            for (int i = 0; i < da.Length; i++)
+            {
+                Console.WriteLine(da[i]);
+            }
+        }
     }
 }

+ 3 - 2
exem_var3/Program.cs

@@ -4,9 +4,10 @@ namespace exem_var3
 {
     internal class Program
     {
-        static void Main(string[] args)
+        public static void Main(string[] args)
         {
-            
+            Mod1 m1 = new Mod1();
+            m1.read();
 
 
         }