This commit is contained in:
nik
2025-09-30 14:26:54 +03:00
parent 8bd93df2ae
commit 8164e04835
633 changed files with 8 additions and 8 deletions

View File

@@ -0,0 +1,23 @@
using System;
class Gamer
{
string Name;
IgralnayaKost seans;
public Gamer(string name)
{
Name = name;
seans = new IgralnayaKost();
}
public int SeansGame()
{
return seans.random();
}
public override string ToString()
{
return Name;
}
}

View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,17 @@
using System;
class IgralnayaKost
{
Random r;
public IgralnayaKost()
{
r = new Random();
}
public int random()
{
int res = r.Next(6) + 1;
return res;
}
}

View File

@@ -0,0 +1,14 @@
using System;
public class Program
{
public static void Main(string[] args)
{
Gamer g1 = new Gamer("Niko");
for (int i = 1; i <= 6; i++)
{
Console.WriteLine("Выпало количество очков {0} для игрока {1}", g1.SeansGame(), g1.ToString());
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v9.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v9.0": {
"Igra/1.0.0": {
"runtime": {
"Igra.dll": {}
}
}
}
},
"libraries": {
"Igra/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net9.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "9.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Igra")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8c63118e20b76593817b5efc05943736b1cf730a")]
[assembly: System.Reflection.AssemblyProductAttribute("Igra")]
[assembly: System.Reflection.AssemblyTitleAttribute("Igra")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
05d5c8d28f18bf5c246094e88fc33948b0dac62f39381b4b360ad08d07b89dd2

View File

@@ -0,0 +1,15 @@
is_global = true
build_property.TargetFramework = net9.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Igra
build_property.ProjectDir = /home/nik/oop/labs/lab7/Igra/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 9.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

Binary file not shown.

View File

@@ -0,0 +1 @@
965f402a393a8b3c3615bdffcb747854f7dda4ef84f8cdb7176cc338c3ebeb3f

View File

@@ -0,0 +1,14 @@
/home/nik/oop/labs/lab7/Igra/bin/Debug/net9.0/Igra
/home/nik/oop/labs/lab7/Igra/bin/Debug/net9.0/Igra.deps.json
/home/nik/oop/labs/lab7/Igra/bin/Debug/net9.0/Igra.runtimeconfig.json
/home/nik/oop/labs/lab7/Igra/bin/Debug/net9.0/Igra.dll
/home/nik/oop/labs/lab7/Igra/bin/Debug/net9.0/Igra.pdb
/home/nik/oop/labs/lab7/Igra/obj/Debug/net9.0/Igra.GeneratedMSBuildEditorConfig.editorconfig
/home/nik/oop/labs/lab7/Igra/obj/Debug/net9.0/Igra.AssemblyInfoInputs.cache
/home/nik/oop/labs/lab7/Igra/obj/Debug/net9.0/Igra.AssemblyInfo.cs
/home/nik/oop/labs/lab7/Igra/obj/Debug/net9.0/Igra.csproj.CoreCompileInputs.cache
/home/nik/oop/labs/lab7/Igra/obj/Debug/net9.0/Igra.dll
/home/nik/oop/labs/lab7/Igra/obj/Debug/net9.0/refint/Igra.dll
/home/nik/oop/labs/lab7/Igra/obj/Debug/net9.0/Igra.pdb
/home/nik/oop/labs/lab7/Igra/obj/Debug/net9.0/Igra.genruntimeconfig.cache
/home/nik/oop/labs/lab7/Igra/obj/Debug/net9.0/ref/Igra.dll

Binary file not shown.

View File

@@ -0,0 +1 @@
59af8060a39fe66547924f2ecd51abdbe7484d6060668c2551dae0c99bc6f070

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,73 @@
{
"format": 1,
"restore": {
"/home/nik/oop/labs/lab7/Igra/Igra.csproj": {}
},
"projects": {
"/home/nik/oop/labs/lab7/Igra/Igra.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/nik/oop/labs/lab7/Igra/Igra.csproj",
"projectName": "Igra",
"projectPath": "/home/nik/oop/labs/lab7/Igra/Igra.csproj",
"packagesPath": "/home/nik/.nuget/packages/",
"outputPath": "/home/nik/oop/labs/lab7/Igra/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/nik/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net9.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[9.0.9, 9.0.9]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/9.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/nik/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/nik/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.4</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/nik/.nuget/packages/" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@@ -0,0 +1,78 @@
{
"version": 3,
"targets": {
"net9.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net9.0": []
},
"packageFolders": {
"/home/nik/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/nik/oop/labs/lab7/Igra/Igra.csproj",
"projectName": "Igra",
"projectPath": "/home/nik/oop/labs/lab7/Igra/Igra.csproj",
"packagesPath": "/home/nik/.nuget/packages/",
"outputPath": "/home/nik/oop/labs/lab7/Igra/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/nik/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net9.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[9.0.9, 9.0.9]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/9.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}

View File

@@ -0,0 +1,10 @@
{
"version": 2,
"dgSpecHash": "DiS1VZPvPF4=",
"success": true,
"projectFilePath": "/home/nik/oop/labs/lab7/Igra/Igra.csproj",
"expectedPackageFiles": [
"/home/nik/.nuget/packages/microsoft.aspnetcore.app.ref/9.0.9/microsoft.aspnetcore.app.ref.9.0.9.nupkg.sha512"
],
"logs": []
}

View File

@@ -0,0 +1,77 @@
using System;
class Book : Item
{
private String author;
private String title;
private String publisher;
private int pages;
private int year;
private bool returnSrok;
private static double price = 9;
static Book()
{
price = 10;
}
public Book()
{
}
public Book(String author, String title, String publisher, int pages, int year, long invNumber, bool taken) : base (invNumber, taken)
{
this.author = author;
this.title = title;
this.publisher = publisher;
this.pages = pages;
this.year = year;
}
public Book(String author, String title)
{
this.author = author;
this.title = title;
}
public void SetBook(String author, String title, String publisher, int pages, int year)
{
this.author = author;
this.title = title;
this.publisher = publisher;
this.pages = pages;
this.year = year;
}
public static void SetPrice(double price)
{
Book.price = price;
}
public override void Show()
{
Console.WriteLine("\nКнига:\n Автор: {0}\n Название: {1}\n Год издания: {2}\n {3} стр.\n Стоимость аренды: {4}", author, title, year, pages, Book.price);
base.Show();
}
public double PriceBook(int s)
{
double cost = s * price;
return cost;
}
public void ReturnSrok()
{
returnSrok = true;
}
public override void Return()
{
taken = returnSrok;
}
}

View File

@@ -0,0 +1,47 @@
using System;
abstract class Item
{
protected long invNumber;
protected bool taken;
public Item(long invNumber, bool taken)
{
this.invNumber = invNumber;
this.taken = taken;
}
public Item()
{
this.taken = true;
}
public bool IsAvailable()
{
return taken;
}
public long GetInvNumber()
{
return invNumber;
}
private void Take()
{
taken = false;
}
public void TakeItem()
{
if (this.IsAvailable())
this.Take();
}
abstract public void Return();
public virtual void Show()
{
Console.WriteLine("Состояние единицы хранения:\n Инвентарный номер: {0}\n Наличие: {1}", invNumber, taken);
}
}

View File

@@ -0,0 +1,33 @@
using System;
class Magazine : Item
{
private String volume;
private int number;
private String title;
private int year;
public Magazine(String volume, int number, String title, int year, long invNumber, bool taken) : base(invNumber, taken)
{
this.volume = volume;
this.number = number;
this.title = title;
this.year = year;
}
public Magazine()
{}
public override void Show()
{
Console.WriteLine("\nЖурнал:\n Том: {0}\n Номер: {1}\n Название: {2}\n Год выпуска: {3}", volume, number, title, year);
base.Show();
}
public override void Return()
{
taken = true;
}
}

View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,59 @@
using System;
public class Program
{
public static void Main(string[] args)
{
/*
Book b1 = new Book();
b1.SetBook("Пушкин А.С.", "Капитанская дочка", "Вильямс", 123, 2012);
Book.SetPrice(12);
b1.Show();
Console.WriteLine("\n Итоговая стоимость аренды: {0} р.", b1.PriceBook(3));
Book b2 = new Book("Толстой Л.Н.", "Война и мир", "Наука и жизнь", 1234, 2013);
b2.Show();
Book b3 = new Book("Лермонтов М.Ю.", "Мцыри");
b3.Show();
Triangle t1 = new Triangle(3, 4, 5);
t1.Show();
Console.WriteLine("perimeter = {0}", t1.Perimeter());
Console.WriteLine("area = {0}", t1.Area());
Console.WriteLine("does this triangle exist? {0}", t1.Exists());
Triangle t2 = new Triangle(3, 4, 7);
t2.Show();
Console.WriteLine("does this triangle exist? {0}", t2.Exists());
*/
// Item item1 = new Item();
// item1.Show();
Book b2 = new Book("Толстой Л. Н.", "Война и мир", "Наука и жизнь", 1234, 2013, 101, true);
b2.Show();
b2.TakeItem();
b2.Show();
Magazine mag1 = new Magazine("О природе", 5, "Земля и мы", 2014, 1235, true);
mag1.Show();
Console.WriteLine("\n Тестирование полиформизма");
Item it;
it = b2;
it.TakeItem();
it.Return();
it.Show();
it = mag1;
it.TakeItem();
it.Return();
it.Show();
}
}

View File

@@ -0,0 +1,42 @@
using System;
class Triangle
{
private int a;
private int b;
private int c;
public Triangle(int a, int b, int c)
{
this.a = a;
this.b = b;
this.c = c;
}
public void Show()
{
Console.WriteLine("a: {0}\nb: {1}\nc: {2}", a, b, c);
}
public int Perimeter()
{
return a + b + c;
}
public double Area()
{
double p = Perimeter() / 2;
return Math.Sqrt(p * (p - a) * (p - b) * (p - c));
}
public bool Exists()
{
if (a <= 0 || b <= 0 || c <= 0) return false;
double maxSide = Math.Max(Math.Max(a, b), Math.Max(b, c));
if (maxSide >= a + b + c - maxSide) return false;
return true;
}
}

Binary file not shown.

View File

@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v9.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v9.0": {
"MyClass/1.0.0": {
"runtime": {
"MyClass.dll": {}
}
}
}
},
"libraries": {
"MyClass/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net9.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "9.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("MyClass")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8c63118e20b76593817b5efc05943736b1cf730a")]
[assembly: System.Reflection.AssemblyProductAttribute("MyClass")]
[assembly: System.Reflection.AssemblyTitleAttribute("MyClass")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
3c58198e9da904dcc7f71dfdc0c33c0196589953894183afdc08d515002a274c

View File

@@ -0,0 +1,15 @@
is_global = true
build_property.TargetFramework = net9.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = MyClass
build_property.ProjectDir = /home/nik/oop/labs/lab7/MyClass/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 9.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1 @@
a9016e4d6a465816afe7a161ced41d1e99d5343896d13f2f5f5d854dc6c5fd2d

View File

@@ -0,0 +1,14 @@
/home/nik/oop/labs/lab7/MyClass/bin/Debug/net9.0/MyClass
/home/nik/oop/labs/lab7/MyClass/bin/Debug/net9.0/MyClass.deps.json
/home/nik/oop/labs/lab7/MyClass/bin/Debug/net9.0/MyClass.runtimeconfig.json
/home/nik/oop/labs/lab7/MyClass/bin/Debug/net9.0/MyClass.dll
/home/nik/oop/labs/lab7/MyClass/bin/Debug/net9.0/MyClass.pdb
/home/nik/oop/labs/lab7/MyClass/obj/Debug/net9.0/MyClass.GeneratedMSBuildEditorConfig.editorconfig
/home/nik/oop/labs/lab7/MyClass/obj/Debug/net9.0/MyClass.AssemblyInfoInputs.cache
/home/nik/oop/labs/lab7/MyClass/obj/Debug/net9.0/MyClass.AssemblyInfo.cs
/home/nik/oop/labs/lab7/MyClass/obj/Debug/net9.0/MyClass.csproj.CoreCompileInputs.cache
/home/nik/oop/labs/lab7/MyClass/obj/Debug/net9.0/MyClass.dll
/home/nik/oop/labs/lab7/MyClass/obj/Debug/net9.0/refint/MyClass.dll
/home/nik/oop/labs/lab7/MyClass/obj/Debug/net9.0/MyClass.pdb
/home/nik/oop/labs/lab7/MyClass/obj/Debug/net9.0/MyClass.genruntimeconfig.cache
/home/nik/oop/labs/lab7/MyClass/obj/Debug/net9.0/ref/MyClass.dll

Binary file not shown.

View File

@@ -0,0 +1 @@
cf9b031d6181c3e3db59efe4db6ebc6737086e3359187410580364e3ae497f75

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,73 @@
{
"format": 1,
"restore": {
"/home/nik/oop/labs/lab7/MyClass/MyClass.csproj": {}
},
"projects": {
"/home/nik/oop/labs/lab7/MyClass/MyClass.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/nik/oop/labs/lab7/MyClass/MyClass.csproj",
"projectName": "MyClass",
"projectPath": "/home/nik/oop/labs/lab7/MyClass/MyClass.csproj",
"packagesPath": "/home/nik/.nuget/packages/",
"outputPath": "/home/nik/oop/labs/lab7/MyClass/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/nik/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net9.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[9.0.9, 9.0.9]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/9.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/nik/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/nik/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.4</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/nik/.nuget/packages/" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@@ -0,0 +1,78 @@
{
"version": 3,
"targets": {
"net9.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net9.0": []
},
"packageFolders": {
"/home/nik/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/nik/oop/labs/lab7/MyClass/MyClass.csproj",
"projectName": "MyClass",
"projectPath": "/home/nik/oop/labs/lab7/MyClass/MyClass.csproj",
"packagesPath": "/home/nik/.nuget/packages/",
"outputPath": "/home/nik/oop/labs/lab7/MyClass/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/nik/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net9.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[9.0.9, 9.0.9]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/9.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}

View File

@@ -0,0 +1,10 @@
{
"version": 2,
"dgSpecHash": "VNfUtU6tkz0=",
"success": true,
"projectFilePath": "/home/nik/oop/labs/lab7/MyClass/MyClass.csproj",
"expectedPackageFiles": [
"/home/nik/.nuget/packages/microsoft.aspnetcore.app.ref/9.0.9/microsoft.aspnetcore.app.ref.9.0.9.nupkg.sha512"
],
"logs": []
}

View File

@@ -0,0 +1,26 @@
using System;
class Line
{
private Point pStart;
private Point pEnd;
public Line(Point pStart, Point pEnd)
{
this.pStart = pStart;
this.pEnd = pEnd;
}
public Line()
{ }
public void Show()
{
Console.WriteLine("Отрезок с координатами: ({0}) - ({1})", pStart, pEnd);
}
public double DlinL()
{
return pStart.Dlina(pEnd);
}
}

View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,33 @@
using System;
class Point
{
private double x;
private double y;
public Point(double x, double y)
{
this.x = x;
this.y = y;
}
public Point ()
{}
public void Show()
{
Console.WriteLine("Точка с координатами: ({0}, {1})", x, y);
}
public double Dlina(Point p)
{
double Dl = Math.Sqrt((this.x - p.x) * (this.x - p.x) + (this.y - p.y) * (this.y - p.y));
return Dl;
}
public override string ToString()
{
string ss = x + " ; " + y;
return ss;
}
}

View File

@@ -0,0 +1,18 @@
using System;
public class Program
{
public static void Main(string[] args)
{
Point p1 = new Point();
p1.Show();
Point p2 = new Point(12, 13);
p2.Show();
Line line = new Line(p1, p2);
line.Show();
double dtr = line.DlinL();
Console.WriteLine("Длина отрезка " + dtr);
}
}

Binary file not shown.

View File

@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v9.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v9.0": {
"MyClassLine/1.0.0": {
"runtime": {
"MyClassLine.dll": {}
}
}
}
},
"libraries": {
"MyClassLine/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

View File

@@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net9.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "9.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("MyClassLine")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8c63118e20b76593817b5efc05943736b1cf730a")]
[assembly: System.Reflection.AssemblyProductAttribute("MyClassLine")]
[assembly: System.Reflection.AssemblyTitleAttribute("MyClassLine")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
f60a94c1cede62b115d7c9a64a0b2d66651b596a14497334f17f69e1dce9798e

View File

@@ -0,0 +1,15 @@
is_global = true
build_property.TargetFramework = net9.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = MyClassLine
build_property.ProjectDir = /home/nik/oop/labs/lab7/MyClassLine/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 9.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1 @@
9353bce025d487fa11b1601227ab1678a5ab2f544bbf872d381664c871e663fd

View File

@@ -0,0 +1,14 @@
/home/nik/oop/labs/lab7/MyClassLine/obj/Debug/net9.0/MyClassLine.GeneratedMSBuildEditorConfig.editorconfig
/home/nik/oop/labs/lab7/MyClassLine/obj/Debug/net9.0/MyClassLine.AssemblyInfoInputs.cache
/home/nik/oop/labs/lab7/MyClassLine/obj/Debug/net9.0/MyClassLine.AssemblyInfo.cs
/home/nik/oop/labs/lab7/MyClassLine/obj/Debug/net9.0/MyClassLine.csproj.CoreCompileInputs.cache
/home/nik/oop/labs/lab7/MyClassLine/bin/Debug/net9.0/MyClassLine
/home/nik/oop/labs/lab7/MyClassLine/bin/Debug/net9.0/MyClassLine.deps.json
/home/nik/oop/labs/lab7/MyClassLine/bin/Debug/net9.0/MyClassLine.runtimeconfig.json
/home/nik/oop/labs/lab7/MyClassLine/bin/Debug/net9.0/MyClassLine.dll
/home/nik/oop/labs/lab7/MyClassLine/bin/Debug/net9.0/MyClassLine.pdb
/home/nik/oop/labs/lab7/MyClassLine/obj/Debug/net9.0/MyClassLine.dll
/home/nik/oop/labs/lab7/MyClassLine/obj/Debug/net9.0/refint/MyClassLine.dll
/home/nik/oop/labs/lab7/MyClassLine/obj/Debug/net9.0/MyClassLine.pdb
/home/nik/oop/labs/lab7/MyClassLine/obj/Debug/net9.0/MyClassLine.genruntimeconfig.cache
/home/nik/oop/labs/lab7/MyClassLine/obj/Debug/net9.0/ref/MyClassLine.dll

View File

@@ -0,0 +1 @@
7bf088fbd0869cfef42dbfc2476a23c7bccdebf70785642d74e82bf68d665291

Binary file not shown.

View File

@@ -0,0 +1,73 @@
{
"format": 1,
"restore": {
"/home/nik/oop/labs/lab7/MyClassLine/MyClassLine.csproj": {}
},
"projects": {
"/home/nik/oop/labs/lab7/MyClassLine/MyClassLine.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/nik/oop/labs/lab7/MyClassLine/MyClassLine.csproj",
"projectName": "MyClassLine",
"projectPath": "/home/nik/oop/labs/lab7/MyClassLine/MyClassLine.csproj",
"packagesPath": "/home/nik/.nuget/packages/",
"outputPath": "/home/nik/oop/labs/lab7/MyClassLine/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/nik/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net9.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[9.0.9, 9.0.9]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/9.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/nik/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/nik/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.4</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/nik/.nuget/packages/" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@@ -0,0 +1,78 @@
{
"version": 3,
"targets": {
"net9.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net9.0": []
},
"packageFolders": {
"/home/nik/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/nik/oop/labs/lab7/MyClassLine/MyClassLine.csproj",
"projectName": "MyClassLine",
"projectPath": "/home/nik/oop/labs/lab7/MyClassLine/MyClassLine.csproj",
"packagesPath": "/home/nik/.nuget/packages/",
"outputPath": "/home/nik/oop/labs/lab7/MyClassLine/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/nik/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net9.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[9.0.9, 9.0.9]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/9.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}

View File

@@ -0,0 +1,10 @@
{
"version": 2,
"dgSpecHash": "uG3QyhPHlEQ=",
"success": true,
"projectFilePath": "/home/nik/oop/labs/lab7/MyClassLine/MyClassLine.csproj",
"expectedPackageFiles": [
"/home/nik/.nuget/packages/microsoft.aspnetcore.app.ref/9.0.9/microsoft.aspnetcore.app.ref.9.0.9.nupkg.sha512"
],
"logs": []
}

View File

@@ -0,0 +1,23 @@
using System;
class ArithmeticProgression : Progression
{
private int a0;
private int b;
public ArithmeticProgression(int a0, int b)
{
this.a0 = a0;
this.b = b;
}
public override int GetElement(int k)
{
return a0 + (k - 1) * b;
}
public override int Sum(int n)
{
return (2 * a0 + (n - 1) * b) * n / 2;
}
}

View File

@@ -0,0 +1,24 @@
using System;
class GeometricProgression : Progression
{
private int p0;
private int q;
public GeometricProgression(int p0, int q)
{
this.p0 = p0;
this.q = q;
}
public override int GetElement(int k)
{
return p0 * (int)Math.Pow(q, k - 1);
}
public override int Sum(int n)
{
if (q == 1) return p0 * n;
return p0 * (int)((Math.Pow(q, n) - 1) / (q - 1));
}
}

View File

@@ -0,0 +1,18 @@
using System;
public class Program
{
public static void Main(string[] args)
{
Progression arith = new ArithmeticProgression(2, 3);
Progression geom = new GeometricProgression(2, 2);
Console.WriteLine("Арифметическая прогрессия:");
Console.WriteLine("5-й элемент = " + arith.GetElement(5));
Console.WriteLine("Сумма 5 элементов = " + arith.Sum(5));
Console.WriteLine("\nГеометрическая прогрессия:");
Console.WriteLine("5-й элемент = " + geom.GetElement(5));
Console.WriteLine("Сумма 5 элементов = " + geom.Sum(5));
}
}

View File

@@ -0,0 +1,7 @@
using System;
abstract class Progression
{
public abstract int GetElement(int k);
public abstract int Sum(int n);
}

View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

Binary file not shown.

View File

@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v9.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v9.0": {
"Progrssion/1.0.0": {
"runtime": {
"Progrssion.dll": {}
}
}
}
},
"libraries": {
"Progrssion/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

View File

@@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net9.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "9.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Progrssion")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8c63118e20b76593817b5efc05943736b1cf730a")]
[assembly: System.Reflection.AssemblyProductAttribute("Progrssion")]
[assembly: System.Reflection.AssemblyTitleAttribute("Progrssion")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
231b0612123ed9c81a58653fb6ef4a2e8228ba6cf401a20a47b808ae56470e20

View File

@@ -0,0 +1,15 @@
is_global = true
build_property.TargetFramework = net9.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Progrssion
build_property.ProjectDir = /home/nik/oop/labs/lab7/Progrssion/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 9.0
build_property.EnableCodeStyleSeverity =

Some files were not shown because too many files have changed in this diff Show More