two left
This commit is contained in:
13
labs/lab2_done/BankAccount/.idea/.idea.BankAccount.dir/.idea/.gitignore
generated
vendored
Normal file
13
labs/lab2_done/BankAccount/.idea/.idea.BankAccount.dir/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/modules.xml
|
||||
/contentModel.xml
|
||||
/projectSettingsUpdater.xml
|
||||
/.idea.BankAccount.iml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
4
labs/lab2_done/BankAccount/.idea/.idea.BankAccount.dir/.idea/encodings.xml
generated
Normal file
4
labs/lab2_done/BankAccount/.idea/.idea.BankAccount.dir/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
8
labs/lab2_done/BankAccount/.idea/.idea.BankAccount.dir/.idea/indexLayout.xml
generated
Normal file
8
labs/lab2_done/BankAccount/.idea/.idea.BankAccount.dir/.idea/indexLayout.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
6
labs/lab2_done/BankAccount/.idea/.idea.BankAccount.dir/.idea/vcs.xml
generated
Normal file
6
labs/lab2_done/BankAccount/.idea/.idea.BankAccount.dir/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
10
labs/lab2_done/BankAccount/BankAccount.csproj
Normal file
10
labs/lab2_done/BankAccount/BankAccount.csproj
Normal 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>
|
||||
16
labs/lab2_done/BankAccount/Enum.cs
Normal file
16
labs/lab2_done/BankAccount/Enum.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
public enum AccountType { Checking, Deposit }
|
||||
|
||||
public class Enum
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
AccountType goldAccount;
|
||||
AccountType platinumAccount;
|
||||
|
||||
goldAccount = AccountType.Checking;
|
||||
platinumAccount = AccountType.Deposit;
|
||||
|
||||
Console.WriteLine("The Customer Account Type is {0}", goldAccount);
|
||||
Console.WriteLine("The Customer Account Type is {0}", platinumAccount);
|
||||
}
|
||||
}
|
||||
BIN
labs/lab2_done/BankAccount/bin/Debug/net9.0/BankAccount
Executable file
BIN
labs/lab2_done/BankAccount/bin/Debug/net9.0/BankAccount
Executable file
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v9.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v9.0": {
|
||||
"BankAccount/1.0.0": {
|
||||
"runtime": {
|
||||
"BankAccount.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"BankAccount/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
labs/lab2_done/BankAccount/bin/Debug/net9.0/BankAccount.dll
Normal file
BIN
labs/lab2_done/BankAccount/bin/Debug/net9.0/BankAccount.dll
Normal file
Binary file not shown.
BIN
labs/lab2_done/BankAccount/bin/Debug/net9.0/BankAccount.pdb
Normal file
BIN
labs/lab2_done/BankAccount/bin/Debug/net9.0/BankAccount.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net9.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "9.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"/home/nik/oop/labs/lab2/BankAccount/BankAccount.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"/home/nik/oop/labs/lab2/BankAccount/BankAccount.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/nik/oop/labs/lab2/BankAccount/BankAccount.csproj",
|
||||
"projectName": "BankAccount",
|
||||
"projectPath": "/home/nik/oop/labs/lab2/BankAccount/BankAccount.csproj",
|
||||
"packagesPath": "/home/nik/.nuget/packages/",
|
||||
"outputPath": "/home/nik/oop/labs/lab2/BankAccount/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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" />
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]
|
||||
@@ -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("BankAccount")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8bd93df2aef7759930e05e648a2010f5b8955d40")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("BankAccount")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("BankAccount")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
47f1dd24be30fc82b288fde12d24fcecfb3a84f7edf545e3942fab6fad4d4c11
|
||||
@@ -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 = BankAccount
|
||||
build_property.ProjectDir = /home/nik/oop/labs/lab2/BankAccount/
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.EffectiveAnalysisLevelStyle = 9.0
|
||||
build_property.EnableCodeStyleSeverity =
|
||||
@@ -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.
@@ -0,0 +1 @@
|
||||
2eb8d99d04da0c06ac51f6a1cc403f963d4b76d46a8c62b8760eb82d624567ea
|
||||
@@ -0,0 +1,14 @@
|
||||
/home/nik/oop/labs/lab2/BankAccount/bin/Debug/net9.0/BankAccount
|
||||
/home/nik/oop/labs/lab2/BankAccount/bin/Debug/net9.0/BankAccount.deps.json
|
||||
/home/nik/oop/labs/lab2/BankAccount/bin/Debug/net9.0/BankAccount.runtimeconfig.json
|
||||
/home/nik/oop/labs/lab2/BankAccount/bin/Debug/net9.0/BankAccount.dll
|
||||
/home/nik/oop/labs/lab2/BankAccount/bin/Debug/net9.0/BankAccount.pdb
|
||||
/home/nik/oop/labs/lab2/BankAccount/obj/Debug/net9.0/BankAccount.GeneratedMSBuildEditorConfig.editorconfig
|
||||
/home/nik/oop/labs/lab2/BankAccount/obj/Debug/net9.0/BankAccount.AssemblyInfoInputs.cache
|
||||
/home/nik/oop/labs/lab2/BankAccount/obj/Debug/net9.0/BankAccount.AssemblyInfo.cs
|
||||
/home/nik/oop/labs/lab2/BankAccount/obj/Debug/net9.0/BankAccount.csproj.CoreCompileInputs.cache
|
||||
/home/nik/oop/labs/lab2/BankAccount/obj/Debug/net9.0/BankAccount.dll
|
||||
/home/nik/oop/labs/lab2/BankAccount/obj/Debug/net9.0/refint/BankAccount.dll
|
||||
/home/nik/oop/labs/lab2/BankAccount/obj/Debug/net9.0/BankAccount.pdb
|
||||
/home/nik/oop/labs/lab2/BankAccount/obj/Debug/net9.0/BankAccount.genruntimeconfig.cache
|
||||
/home/nik/oop/labs/lab2/BankAccount/obj/Debug/net9.0/ref/BankAccount.dll
|
||||
BIN
labs/lab2_done/BankAccount/obj/Debug/net9.0/BankAccount.dll
Normal file
BIN
labs/lab2_done/BankAccount/obj/Debug/net9.0/BankAccount.dll
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
d4e8dfe422bd02918055e12e3c30a4424b6c9dff76b38c963a27775688f7cb63
|
||||
BIN
labs/lab2_done/BankAccount/obj/Debug/net9.0/BankAccount.pdb
Normal file
BIN
labs/lab2_done/BankAccount/obj/Debug/net9.0/BankAccount.pdb
Normal file
Binary file not shown.
BIN
labs/lab2_done/BankAccount/obj/Debug/net9.0/apphost
Executable file
BIN
labs/lab2_done/BankAccount/obj/Debug/net9.0/apphost
Executable file
Binary file not shown.
BIN
labs/lab2_done/BankAccount/obj/Debug/net9.0/ref/BankAccount.dll
Normal file
BIN
labs/lab2_done/BankAccount/obj/Debug/net9.0/ref/BankAccount.dll
Normal file
Binary file not shown.
Binary file not shown.
78
labs/lab2_done/BankAccount/obj/project.assets.json
Normal file
78
labs/lab2_done/BankAccount/obj/project.assets.json
Normal 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/lab2/BankAccount/BankAccount.csproj",
|
||||
"projectName": "BankAccount",
|
||||
"projectPath": "/home/nik/oop/labs/lab2/BankAccount/BankAccount.csproj",
|
||||
"packagesPath": "/home/nik/.nuget/packages/",
|
||||
"outputPath": "/home/nik/oop/labs/lab2/BankAccount/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
labs/lab2_done/BankAccount/obj/project.nuget.cache
Normal file
10
labs/lab2_done/BankAccount/obj/project.nuget.cache
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "RbJOLZTYaW0=",
|
||||
"success": true,
|
||||
"projectFilePath": "/home/nik/oop/labs/lab2/BankAccount/BankAccount.csproj",
|
||||
"expectedPackageFiles": [
|
||||
"/home/nik/.nuget/packages/microsoft.aspnetcore.app.ref/9.0.9/microsoft.aspnetcore.app.ref.9.0.9.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
1
labs/lab2_done/BankAccount/obj/project.packagespec.json
Normal file
1
labs/lab2_done/BankAccount/obj/project.packagespec.json
Normal file
@@ -0,0 +1 @@
|
||||
"restore":{"projectUniqueName":"/home/nik/oop/labs/lab2/BankAccount/BankAccount.csproj","projectName":"BankAccount","projectPath":"/home/nik/oop/labs/lab2/BankAccount/BankAccount.csproj","outputPath":"/home/nik/oop/labs/lab2/BankAccount/obj/","projectStyle":"PackageReference","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"}}
|
||||
@@ -0,0 +1 @@
|
||||
17583465165360554
|
||||
@@ -0,0 +1 @@
|
||||
17583465165360554
|
||||
10
labs/lab2_done/EnglishDist/EnglishDist.csproj
Normal file
10
labs/lab2_done/EnglishDist/EnglishDist.csproj
Normal 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>
|
||||
39
labs/lab2_done/EnglishDist/Program.cs
Normal file
39
labs/lab2_done/EnglishDist/Program.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
struct Distance
|
||||
{
|
||||
public int feet;
|
||||
public int inches;
|
||||
|
||||
public void Print()
|
||||
{
|
||||
Console.WriteLine("{0}' - {1}''", feet, inches);
|
||||
}
|
||||
}
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Distance d1, d2, d3;
|
||||
|
||||
Console.Write("Input the first distance (feet): ");
|
||||
d1.feet = int.Parse(Console.ReadLine());
|
||||
Console.Write("Input the first distance (inches): ");
|
||||
d1.inches = int.Parse(Console.ReadLine());
|
||||
|
||||
Console.Write("Input the second distance (feet): ");
|
||||
d2.feet = int.Parse(Console.ReadLine());
|
||||
Console.Write("Input the second distance (inches): ");
|
||||
d2.inches = int.Parse(Console.ReadLine());
|
||||
|
||||
d3.feet = d1.feet + d2.feet;
|
||||
d3.inches = d1.inches + d2.inches;
|
||||
|
||||
d3.feet += d3.inches % 12;
|
||||
d3.inches = d3.inches / 12;
|
||||
|
||||
d3.Print();
|
||||
|
||||
}
|
||||
}
|
||||
BIN
labs/lab2_done/EnglishDist/bin/Debug/net9.0/EnglishDist
Executable file
BIN
labs/lab2_done/EnglishDist/bin/Debug/net9.0/EnglishDist
Executable file
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v9.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v9.0": {
|
||||
"EnglishDist/1.0.0": {
|
||||
"runtime": {
|
||||
"EnglishDist.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"EnglishDist/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
labs/lab2_done/EnglishDist/bin/Debug/net9.0/EnglishDist.dll
Normal file
BIN
labs/lab2_done/EnglishDist/bin/Debug/net9.0/EnglishDist.dll
Normal file
Binary file not shown.
BIN
labs/lab2_done/EnglishDist/bin/Debug/net9.0/EnglishDist.pdb
Normal file
BIN
labs/lab2_done/EnglishDist/bin/Debug/net9.0/EnglishDist.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net9.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "9.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]
|
||||
@@ -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("EnglishDist")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8bd93df2aef7759930e05e648a2010f5b8955d40")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("EnglishDist")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("EnglishDist")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
d04fafd00bb476991b48062a690b003ae1468652837a69f7d81bdef04f3c1a94
|
||||
@@ -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 = EnglishDist
|
||||
build_property.ProjectDir = /home/nik/oop/labs/lab2/EnglishDist/
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.EffectiveAnalysisLevelStyle = 9.0
|
||||
build_property.EnableCodeStyleSeverity =
|
||||
@@ -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.
@@ -0,0 +1 @@
|
||||
cae6c7a27e4a395c2151e3222efe594e7415ac119bd8ccc6f408f094be55f509
|
||||
@@ -0,0 +1,14 @@
|
||||
/home/nik/oop/labs/lab2/EnglishDist/obj/Debug/net9.0/EnglishDist.GeneratedMSBuildEditorConfig.editorconfig
|
||||
/home/nik/oop/labs/lab2/EnglishDist/obj/Debug/net9.0/EnglishDist.AssemblyInfoInputs.cache
|
||||
/home/nik/oop/labs/lab2/EnglishDist/obj/Debug/net9.0/EnglishDist.AssemblyInfo.cs
|
||||
/home/nik/oop/labs/lab2/EnglishDist/obj/Debug/net9.0/EnglishDist.csproj.CoreCompileInputs.cache
|
||||
/home/nik/oop/labs/lab2/EnglishDist/bin/Debug/net9.0/EnglishDist
|
||||
/home/nik/oop/labs/lab2/EnglishDist/bin/Debug/net9.0/EnglishDist.deps.json
|
||||
/home/nik/oop/labs/lab2/EnglishDist/bin/Debug/net9.0/EnglishDist.runtimeconfig.json
|
||||
/home/nik/oop/labs/lab2/EnglishDist/bin/Debug/net9.0/EnglishDist.dll
|
||||
/home/nik/oop/labs/lab2/EnglishDist/bin/Debug/net9.0/EnglishDist.pdb
|
||||
/home/nik/oop/labs/lab2/EnglishDist/obj/Debug/net9.0/EnglishDist.dll
|
||||
/home/nik/oop/labs/lab2/EnglishDist/obj/Debug/net9.0/refint/EnglishDist.dll
|
||||
/home/nik/oop/labs/lab2/EnglishDist/obj/Debug/net9.0/EnglishDist.pdb
|
||||
/home/nik/oop/labs/lab2/EnglishDist/obj/Debug/net9.0/EnglishDist.genruntimeconfig.cache
|
||||
/home/nik/oop/labs/lab2/EnglishDist/obj/Debug/net9.0/ref/EnglishDist.dll
|
||||
BIN
labs/lab2_done/EnglishDist/obj/Debug/net9.0/EnglishDist.dll
Normal file
BIN
labs/lab2_done/EnglishDist/obj/Debug/net9.0/EnglishDist.dll
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
4d67ba85762d57a69def13271f8557918e09a31f5980be1189368d8150ec2d11
|
||||
BIN
labs/lab2_done/EnglishDist/obj/Debug/net9.0/EnglishDist.pdb
Normal file
BIN
labs/lab2_done/EnglishDist/obj/Debug/net9.0/EnglishDist.pdb
Normal file
Binary file not shown.
BIN
labs/lab2_done/EnglishDist/obj/Debug/net9.0/apphost
Executable file
BIN
labs/lab2_done/EnglishDist/obj/Debug/net9.0/apphost
Executable file
Binary file not shown.
BIN
labs/lab2_done/EnglishDist/obj/Debug/net9.0/ref/EnglishDist.dll
Normal file
BIN
labs/lab2_done/EnglishDist/obj/Debug/net9.0/ref/EnglishDist.dll
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"/home/nik/oop/labs/lab2/EnglishDist/EnglishDist.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"/home/nik/oop/labs/lab2/EnglishDist/EnglishDist.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/nik/oop/labs/lab2/EnglishDist/EnglishDist.csproj",
|
||||
"projectName": "EnglishDist",
|
||||
"projectPath": "/home/nik/oop/labs/lab2/EnglishDist/EnglishDist.csproj",
|
||||
"packagesPath": "/home/nik/.nuget/packages/",
|
||||
"outputPath": "/home/nik/oop/labs/lab2/EnglishDist/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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" />
|
||||
78
labs/lab2_done/EnglishDist/obj/project.assets.json
Normal file
78
labs/lab2_done/EnglishDist/obj/project.assets.json
Normal 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/lab2/EnglishDist/EnglishDist.csproj",
|
||||
"projectName": "EnglishDist",
|
||||
"projectPath": "/home/nik/oop/labs/lab2/EnglishDist/EnglishDist.csproj",
|
||||
"packagesPath": "/home/nik/.nuget/packages/",
|
||||
"outputPath": "/home/nik/oop/labs/lab2/EnglishDist/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
labs/lab2_done/EnglishDist/obj/project.nuget.cache
Normal file
10
labs/lab2_done/EnglishDist/obj/project.nuget.cache
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "lf7NTUB/PoM=",
|
||||
"success": true,
|
||||
"projectFilePath": "/home/nik/oop/labs/lab2/EnglishDist/EnglishDist.csproj",
|
||||
"expectedPackageFiles": [
|
||||
"/home/nik/.nuget/packages/microsoft.aspnetcore.app.ref/9.0.9/microsoft.aspnetcore.app.ref.9.0.9.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
27
labs/lab2_done/StructType/Struct.cs
Normal file
27
labs/lab2_done/StructType/Struct.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
public enum AccountType { Checking, Deposit }
|
||||
|
||||
public struct BankAccount
|
||||
{
|
||||
public long accNo;
|
||||
public decimal accBal;
|
||||
public AccountType accType;
|
||||
}
|
||||
|
||||
public class Struct
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
BankAccount goldAccount;
|
||||
|
||||
|
||||
goldAccount.accType = AccountType.Checking;
|
||||
goldAccount.accBal = (decimal)3200.00;
|
||||
Console.Write("Enter account number: ");
|
||||
goldAccount.accNo = long.Parse(Console.ReadLine());
|
||||
|
||||
Console.WriteLine("*** Account Summary ***");
|
||||
Console.WriteLine("Acct Number {0}", goldAccount.accNo);
|
||||
Console.WriteLine("Acct Type {0}", goldAccount.accType);
|
||||
Console.WriteLine("Acct Balance ${0}", goldAccount.accBal);
|
||||
}
|
||||
}
|
||||
10
labs/lab2_done/StructType/StructType.csproj
Normal file
10
labs/lab2_done/StructType/StructType.csproj
Normal 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>
|
||||
BIN
labs/lab2_done/StructType/bin/Debug/net9.0/StructType
Executable file
BIN
labs/lab2_done/StructType/bin/Debug/net9.0/StructType
Executable file
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v9.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v9.0": {
|
||||
"StructType/1.0.0": {
|
||||
"runtime": {
|
||||
"StructType.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"StructType/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
labs/lab2_done/StructType/bin/Debug/net9.0/StructType.dll
Normal file
BIN
labs/lab2_done/StructType/bin/Debug/net9.0/StructType.dll
Normal file
Binary file not shown.
BIN
labs/lab2_done/StructType/bin/Debug/net9.0/StructType.pdb
Normal file
BIN
labs/lab2_done/StructType/bin/Debug/net9.0/StructType.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net9.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "9.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]
|
||||
@@ -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("StructType")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8bd93df2aef7759930e05e648a2010f5b8955d40")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StructType")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StructType")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
99e59ebcd46ba6763b1624655055434888becf29f2035a3cb1f953c92bfce1ca
|
||||
@@ -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 = StructType
|
||||
build_property.ProjectDir = /home/nik/oop/labs/lab2/StructType/
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.EffectiveAnalysisLevelStyle = 9.0
|
||||
build_property.EnableCodeStyleSeverity =
|
||||
@@ -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.
@@ -0,0 +1 @@
|
||||
694e7fb4c0dbb8dfc911b1f7753d0a690594b252d77fd14376819f1511d074b4
|
||||
@@ -0,0 +1,14 @@
|
||||
/home/nik/oop/labs/lab2/StructType/bin/Debug/net9.0/StructType
|
||||
/home/nik/oop/labs/lab2/StructType/bin/Debug/net9.0/StructType.deps.json
|
||||
/home/nik/oop/labs/lab2/StructType/bin/Debug/net9.0/StructType.runtimeconfig.json
|
||||
/home/nik/oop/labs/lab2/StructType/bin/Debug/net9.0/StructType.dll
|
||||
/home/nik/oop/labs/lab2/StructType/bin/Debug/net9.0/StructType.pdb
|
||||
/home/nik/oop/labs/lab2/StructType/obj/Debug/net9.0/StructType.GeneratedMSBuildEditorConfig.editorconfig
|
||||
/home/nik/oop/labs/lab2/StructType/obj/Debug/net9.0/StructType.AssemblyInfoInputs.cache
|
||||
/home/nik/oop/labs/lab2/StructType/obj/Debug/net9.0/StructType.AssemblyInfo.cs
|
||||
/home/nik/oop/labs/lab2/StructType/obj/Debug/net9.0/StructType.csproj.CoreCompileInputs.cache
|
||||
/home/nik/oop/labs/lab2/StructType/obj/Debug/net9.0/StructType.dll
|
||||
/home/nik/oop/labs/lab2/StructType/obj/Debug/net9.0/refint/StructType.dll
|
||||
/home/nik/oop/labs/lab2/StructType/obj/Debug/net9.0/StructType.pdb
|
||||
/home/nik/oop/labs/lab2/StructType/obj/Debug/net9.0/StructType.genruntimeconfig.cache
|
||||
/home/nik/oop/labs/lab2/StructType/obj/Debug/net9.0/ref/StructType.dll
|
||||
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/StructType.dll
Normal file
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/StructType.dll
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
832b291bc2dab5102850df6d66b6b28db841ae6072fdc3e24e247dd4e776f238
|
||||
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/StructType.pdb
Normal file
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/StructType.pdb
Normal file
Binary file not shown.
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/apphost
Executable file
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/apphost
Executable file
Binary file not shown.
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/ref/StructType.dll
Normal file
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/ref/StructType.dll
Normal file
Binary file not shown.
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/refint/StructType.dll
Normal file
BIN
labs/lab2_done/StructType/obj/Debug/net9.0/refint/StructType.dll
Normal file
Binary file not shown.
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"/home/nik/oop/labs/lab2/StructType/StructType.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"/home/nik/oop/labs/lab2/StructType/StructType.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/nik/oop/labs/lab2/StructType/StructType.csproj",
|
||||
"projectName": "StructType",
|
||||
"projectPath": "/home/nik/oop/labs/lab2/StructType/StructType.csproj",
|
||||
"packagesPath": "/home/nik/.nuget/packages/",
|
||||
"outputPath": "/home/nik/oop/labs/lab2/StructType/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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" />
|
||||
78
labs/lab2_done/StructType/obj/project.assets.json
Normal file
78
labs/lab2_done/StructType/obj/project.assets.json
Normal 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/lab2/StructType/StructType.csproj",
|
||||
"projectName": "StructType",
|
||||
"projectPath": "/home/nik/oop/labs/lab2/StructType/StructType.csproj",
|
||||
"packagesPath": "/home/nik/.nuget/packages/",
|
||||
"outputPath": "/home/nik/oop/labs/lab2/StructType/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
labs/lab2_done/StructType/obj/project.nuget.cache
Normal file
10
labs/lab2_done/StructType/obj/project.nuget.cache
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "t1oLKu9XqIc=",
|
||||
"success": true,
|
||||
"projectFilePath": "/home/nik/oop/labs/lab2/StructType/StructType.csproj",
|
||||
"expectedPackageFiles": [
|
||||
"/home/nik/.nuget/packages/microsoft.aspnetcore.app.ref/9.0.9/microsoft.aspnetcore.app.ref.9.0.9.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
BIN
labs/lab2_done/assets/1.png
Normal file
BIN
labs/lab2_done/assets/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
BIN
labs/lab2_done/assets/2.png
Normal file
BIN
labs/lab2_done/assets/2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 216 KiB |
BIN
labs/lab2_done/assets/3.png
Normal file
BIN
labs/lab2_done/assets/3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
BIN
labs/lab2_done/report.pdf
Normal file
BIN
labs/lab2_done/report.pdf
Normal file
Binary file not shown.
219
labs/lab2_done/report.typ
Normal file
219
labs/lab2_done/report.typ
Normal file
@@ -0,0 +1,219 @@
|
||||
#set text(size: 1.3em)
|
||||
|
||||
#show raw.where(block: false): box.with(
|
||||
fill: luma(240),
|
||||
inset: (x: 3pt, y: 0pt),
|
||||
outset: (y: 3pt),
|
||||
radius: 2pt,
|
||||
)
|
||||
|
||||
#show raw.where(block: true): block.with(
|
||||
fill: luma(240),
|
||||
inset: 10pt,
|
||||
radius: 4pt,
|
||||
)
|
||||
|
||||
// title
|
||||
|
||||
#align(center)[Санкт-Петербургский национальный исследовательский университет информационных технологий, механики и оптики]
|
||||
\
|
||||
\
|
||||
\
|
||||
#align(center)[Факультет инфокоммуникационных технологий]
|
||||
#align(center)[Направление подготовки 11.03.02]
|
||||
\
|
||||
\
|
||||
#align(center)[Лабораторная работа №2]
|
||||
#align(center)[Создание и использование размерных типов данных]
|
||||
\
|
||||
\
|
||||
\ //#align(center)[Вариант 19]
|
||||
\
|
||||
\
|
||||
\
|
||||
\
|
||||
\
|
||||
\
|
||||
\
|
||||
#align(right)[Выполнил:]
|
||||
#align(right)[Дощенников Никита Андреевич]
|
||||
#align(right)[Группа: К3221]
|
||||
#align(right)[Проверил:]
|
||||
#align(right)[Иванов Сергей Евгеньевич]
|
||||
\
|
||||
\
|
||||
#align(center)[Санкт-Петербург]
|
||||
#align(center)[2025]
|
||||
|
||||
#pagebreak()
|
||||
|
||||
=== Цель работы:
|
||||
|
||||
Изучить размерные типы данных и приобрести навыки работы со структурными типами.
|
||||
|
||||
=== Упражнение 1. Создание перечисления.
|
||||
|
||||
Я создал перечисление для представления различных типов банковских счетов и использовал его для создания двух переменных, которым присвоил значения `Checking` и `Deposit`. Затем я вывел значения этих переменных при помощи функции `Console.WriteLine()`.
|
||||
|
||||
```cs
|
||||
using System;
|
||||
|
||||
public enum AccountType { Checking, Deposit }
|
||||
|
||||
public class Enum
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
AccountType goldAccount;
|
||||
AccountType platinumAccount;
|
||||
|
||||
goldAccount = AccountType.Checking;
|
||||
platinumAccount = AccountType.Deposit;
|
||||
|
||||
Console.WriteLine("The Customer Account Type is {0}", goldAccount);
|
||||
Console.WriteLine("The Customer Account Type is {0}", platinumAccount);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Пример работы:
|
||||
|
||||
#align(center)[#image("assets/1.png")]
|
||||
|
||||
=== Упражнение 2. Создание и использование структуры.
|
||||
|
||||
Я создал структуру, которую можно использовать для представления банковских счетов. Для хранения номеров счетов (`long`), балансов счетов (`decimal`) и типов счетов (`AccountType`). Затем создал переменную типа структуры, заполнил ее данными и вывел результаты на консоль.
|
||||
|
||||
```cs
|
||||
using System;
|
||||
|
||||
public enum AccountType { Checking, Deposit }
|
||||
|
||||
public struct BankAccount
|
||||
{
|
||||
public long accNo;
|
||||
public decimal accBal;
|
||||
public AccountType accType;
|
||||
}
|
||||
|
||||
public class Struct
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
BankAccount goldAccount;
|
||||
|
||||
|
||||
goldAccount.accType = AccountType.Checking;
|
||||
goldAccount.accBal = (decimal)3200.00;
|
||||
Console.Write("Enter account number: ");
|
||||
goldAccount.accNo = long.Parse(Console.ReadLine());
|
||||
|
||||
Console.WriteLine("*** Account Summary ***");
|
||||
Console.WriteLine("Acct Number {0}", goldAccount.accNo);
|
||||
Console.WriteLine("Acct Type {0}", goldAccount.accType);
|
||||
Console.WriteLine("Acct Balance ${0}", goldAccount.accBal);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Пример работы:
|
||||
|
||||
#align(center)[#image("assets/2.png")]
|
||||
|
||||
=== Упражнение 3. Реализация структуры Distance.
|
||||
|
||||
Создал структуру Distance, определяющую длину в английской системе мер.
|
||||
|
||||
```cs
|
||||
using System;
|
||||
|
||||
struct Distance
|
||||
{
|
||||
public int feet;
|
||||
public int inches;
|
||||
|
||||
public void Print()
|
||||
{
|
||||
Console.WriteLine("{0}' - {1}''", feet, inches);
|
||||
}
|
||||
}
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Distance d1, d2, d3;
|
||||
|
||||
Console.Write("Input the first distance (feet): ");
|
||||
d1.feet = int.Parse(Console.ReadLine());
|
||||
Console.Write("Input the first distance (inches): ");
|
||||
d1.inches = int.Parse(Console.ReadLine());
|
||||
|
||||
Console.Write("Input the second distance (feet): ");
|
||||
d2.feet = int.Parse(Console.ReadLine());
|
||||
Console.Write("Input the second distance (inches): ");
|
||||
d2.inches = int.Parse(Console.ReadLine());
|
||||
|
||||
d3.feet = d1.feet + d2.feet;
|
||||
d3.inches = d1.inches + d2.inches;
|
||||
|
||||
d3.feet += d3.inches % 12;
|
||||
d3.inches = d3.inches / 12;
|
||||
|
||||
d3.Print();
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Пример работы:
|
||||
|
||||
#align(center)[#image("assets/3.png")]
|
||||
|
||||
=== Выводы.
|
||||
|
||||
В ходе выполнения лабораторной работе я изучил размерные типы данных и приобрел навыки работы со структурными типами.
|
||||
|
||||
=== Code Review. (by #link("https://zzzcode.ai/")[zzzcode.ai])
|
||||
|
||||
*Резюме*
|
||||
|
||||
Код, представленный выше, демонстрирует использование перечислений, структур и базовых операций ввода-вывода в C\#. Однако, он содержит несколько недостатков, которые могут повлиять на его читаемость, производительность и безопасность.
|
||||
|
||||
*Ошибка*
|
||||
|
||||
В коде есть несколько потенциальных ошибок, связанных с обработкой ввода. Например, если пользователь введет некорректные данные (нечисловые значения), программа вызовет исключение. Рекомендуется использовать `TryParse` для безопасного парсинга.
|
||||
|
||||
*Стиль кода*
|
||||
|
||||
Стиль кода в целом соответствует стандартам C\#. Однако, использование имен классов Enum и Struct не является удачным, так как они могут вызвать путаницу с встроенными типами. Рекомендуется использовать более описательные имена, такие как `AccountEnum` и `BankAccountStruct`.
|
||||
|
||||
*Структура кода*
|
||||
|
||||
Код разбит на три отдельных класса, что хорошо для организации, но может быть улучшено. Например, можно объединить функциональность в один класс с методами, чтобы избежать дублирования кода.
|
||||
|
||||
*Читаемость*
|
||||
|
||||
Читаемость кода можно улучшить, добавив комментарии и более четкие имена переменных. Например, вместо `d1`, `d2`, `d3` можно использовать `firstDistance`, `secondDistance`, `resultDistance`.
|
||||
|
||||
*Производительность*
|
||||
|
||||
Производительность кода не вызывает серьезных проблем, однако, использование `Console.ReadLine()` в цикле может быть оптимизировано, если ввод данных будет обрабатываться в одном методе.
|
||||
|
||||
*Масштабируемость*
|
||||
|
||||
Код не очень масштабируемый, так как добавление новых типов счетов или новых единиц измерения потребует значительных изменений. Рекомендуется использовать более гибкие структуры данных, такие как классы или коллекции.
|
||||
|
||||
*Безопасность*
|
||||
|
||||
Безопасность кода может быть улучшена путем добавления обработки исключений и проверки ввода. Это поможет избежать сбоев программы при некорректном вводе данных.
|
||||
|
||||
*Обработка ошибок*
|
||||
|
||||
Обработка ошибок в текущем коде отсутствует. Рекомендуется добавить блоки *try-catch* для обработки возможных исключений, особенно при работе с вводом пользователя.
|
||||
|
||||
*Заключение*
|
||||
|
||||
Код демонстрирует базовые концепции C\#, но требует доработки для повышения его надежности, читаемости и безопасности. Рекомендуется внести изменения, чтобы улучшить структуру и обработку ошибок, а также использовать более описательные имена для классов и переменных.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user