diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..104b544 --- /dev/null +++ b/.gitignore @@ -0,0 +1,484 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from `dotnet new gitignore` + +# dotenv files +.env + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp diff --git a/Programming-Skills-Level1.sln b/Programming-Skills-Level1.sln new file mode 100644 index 0000000..e9b1a2e --- /dev/null +++ b/Programming-Skills-Level1.sln @@ -0,0 +1,30 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.002.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "jonathanisl", "jonathanisl", "{AA442CF3-71CF-4956-9464-93F12376F913}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Manchester_United_Players_Analysis", "jonathanisl\Manchester_United_Players_Analysis\Manchester_United_Players_Analysis.csproj", "{F45AD2A1-6A2C-4D68-B5DC-054CD0EBE051}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F45AD2A1-6A2C-4D68-B5DC-054CD0EBE051}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F45AD2A1-6A2C-4D68-B5DC-054CD0EBE051}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F45AD2A1-6A2C-4D68-B5DC-054CD0EBE051}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F45AD2A1-6A2C-4D68-B5DC-054CD0EBE051}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F45AD2A1-6A2C-4D68-B5DC-054CD0EBE051} = {AA442CF3-71CF-4956-9464-93F12376F913} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C098CE96-221E-456B-88F5-C258DCCA2D1D} + EndGlobalSection +EndGlobal diff --git a/jonathanisl/Manchester_United_Players_Analysis/.gitignore b/jonathanisl/Manchester_United_Players_Analysis/.gitignore new file mode 100644 index 0000000..104b544 --- /dev/null +++ b/jonathanisl/Manchester_United_Players_Analysis/.gitignore @@ -0,0 +1,484 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from `dotnet new gitignore` + +# dotenv files +.env + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp diff --git a/jonathanisl/Manchester_United_Players_Analysis/Manchester_United_Players_Analysis.csproj b/jonathanisl/Manchester_United_Players_Analysis/Manchester_United_Players_Analysis.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/jonathanisl/Manchester_United_Players_Analysis/Manchester_United_Players_Analysis.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/jonathanisl/Manchester_United_Players_Analysis/Program.cs b/jonathanisl/Manchester_United_Players_Analysis/Program.cs new file mode 100644 index 0000000..d8ba38e --- /dev/null +++ b/jonathanisl/Manchester_United_Players_Analysis/Program.cs @@ -0,0 +1,255 @@ +using System.Numerics; +using System.Security.Cryptography; + +namespace Manchester_United_Players_Analysis; + +class Player +{ + public int JerseyNumber { get; set; } + public string Name { get; set; } + public int Goals { get; set; } + public int Speed { get; set; } + public int Assists { get; set; } + public int Passing { get; set; } + public int Defensive { get; set; } + + public Player(string name, int jerseyNumber, int goals, int speed, int assists, int passing, int defensive) + { + this.Name = name; + this.JerseyNumber = jerseyNumber; + this.Goals = goals; + this.Speed = speed; + this.Assists = assists; + this.Passing = passing; + this.Defensive = defensive; + } +} + +class Program +{ + + const int EXIT_OPTION = 8; + + // Players Data Charge + + static void Main(string[] args) + { + Player BrunoFernandes = new Player("Bruno Fernandes",8,5,6,9,10,3); + Player RasmusHojlund = new Player("Rasmus Hojlund",11,12,8,2,6,2); + Player HarryMaguire = new Player("Harry Maguire",5,1,5,1,7,9); + Player AlejandroGarnacho = new Player("Alejandro Garnacho",17,2,6,4,8,1); + Player MasonMount = new Player("Mason Mount",7,2,6,4,8,1); + + Player[] team = [BrunoFernandes,RasmusHojlund,HarryMaguire,AlejandroGarnacho,MasonMount]; + + int selectedOption = 0; + while (selectedOption != EXIT_OPTION) + { + Console.Clear(); + showMenu(); + selectedOption = int.Parse(Console.ReadLine()); + + switch (selectedOption) + { + case 1: // Player review + playerReview(team); + break; + case 2: // Compare two players + comparePlayers(team); + break; + case 3: // Fastest player + fastestPlayer(team); + break; + case 4: // Top goal + topGoalScorer(team); + break; + case 5: // Assists + mostAssistPlayer(team); + break; + case 6: // Passing + highestPassingAccuracyPlayer(team); + break; + case 7: // Defensive + mostDefensiveInvolvementsPlayer(team); + break; + } + } + } + + static void showMenu() + { + Console.WriteLine("Manchester United FC"); + Console.WriteLine("--------------------"); + Console.WriteLine("1. Player review"); + Console.WriteLine("2. Compare two players"); + Console.WriteLine("3. Identify the fastest player"); + Console.WriteLine("4. Identify the top goal scorer"); + Console.WriteLine("5. Identify the player with the most assists"); + Console.WriteLine("6. Identify the player with the highest passing accuracy"); + Console.WriteLine("7. Identify the player with the most defensive involvements"); + Console.WriteLine("-----------------------------------------------------------"); + Console.WriteLine("Select an option (Press 8 to exit): "); + } + + static void playerReview(Player[] team) + { + Console.Clear(); + Console.WriteLine("Enter player's jersey number: "); + int jerseyNumber = int.Parse(Console.ReadLine()); + + foreach (var player in team) + { + if (player.JerseyNumber == jerseyNumber) + { + showPlayerInfo(player); + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + } + } + + static void comparePlayers(Player[] team) + { + Console.Clear(); + Console.WriteLine("Enter player's 1 jersey number: "); + int firstJerseyNumber = int.Parse(Console.ReadLine()); + Console.WriteLine("Enter player's 2 jersey number: "); + int secondJerseyNumber = int.Parse(Console.ReadLine()); + + foreach (var player in team) + { + if (player.JerseyNumber == firstJerseyNumber) + { + Console.WriteLine("First Selected Player"); + showPlayerInfo(player); + } + + if (player.JerseyNumber == secondJerseyNumber) + { + Console.WriteLine("Second Selected Player"); + showPlayerInfo(player); + } + } + + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + + static void fastestPlayer(Player[] team) + { + int majorSpeed = 0; + Player fastestPlayer = null; + + foreach (var player in team) + { + if (player.Speed > majorSpeed) + { + majorSpeed = player.Speed; + fastestPlayer = player; + } + } + + Console.WriteLine("Fastest Player"); + showPlayerInfo(fastestPlayer); + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + + static void topGoalScorer(Player[] team) + { + int topGoals = 0; + Player topScorerPlayer = null; + + foreach (var player in team) + { + if (player.Goals > topGoals) + { + topGoals = player.Goals; + topScorerPlayer = player; + } + } + + Console.WriteLine("Top Scorer Player"); + showPlayerInfo(topScorerPlayer); + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + + static void mostAssistPlayer(Player[] team) + { + int topAssists = 0; + Player topAssistsPlayer = null; + + foreach (var player in team) + { + if (player.Goals > topAssists) + { + topAssists = player.Assists; + topAssistsPlayer = player; + } + } + + Console.WriteLine("Top Assist Player"); + showPlayerInfo(topAssistsPlayer); + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + + static void highestPassingAccuracyPlayer(Player[] team) + { + int numberPassing = 0; + Player highestPassingPlayer = null; + + foreach (var player in team) + { + if (player.Passing > numberPassing) + { + numberPassing = player.Passing; + highestPassingPlayer = player; + } + } + + Console.WriteLine("Highest Passing Accuracy Player"); + showPlayerInfo(highestPassingPlayer); + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + + static void mostDefensiveInvolvementsPlayer(Player[] team) + { + int defensivePoints = 0; + Player mostDefensivePlayer = null; + + foreach (var player in team) + { + if (player.Defensive > defensivePoints) + { + defensivePoints = player.Defensive; + mostDefensivePlayer = player; + } + } + + Console.WriteLine("Most Defensive Player"); + showPlayerInfo(mostDefensivePlayer); + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + + static void showPlayerInfo(Player player) + { + Console.WriteLine(""); + Console.WriteLine("Selected Player Data"); + Console.WriteLine("--------------------"); + Console.WriteLine($"({player.JerseyNumber}) Name: {player.Name}"); + Console.WriteLine("--------------------"); + Console.WriteLine(""); + Console.WriteLine("Stats"); + Console.WriteLine("--------------------"); + Console.WriteLine($"Goals: {player.Goals}"); + Console.WriteLine($"Speed: {player.Speed}"); + Console.WriteLine($"Assists: {player.Assists}"); + Console.WriteLine($"Passing: {player.Passing}"); + Console.WriteLine($"Defensive: {player.Defensive}"); + Console.WriteLine(""); + } +} diff --git a/jonathanisl/RH_Hotels_Booking/.gitignore b/jonathanisl/RH_Hotels_Booking/.gitignore new file mode 100644 index 0000000..104b544 --- /dev/null +++ b/jonathanisl/RH_Hotels_Booking/.gitignore @@ -0,0 +1,484 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from `dotnet new gitignore` + +# dotenv files +.env + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp diff --git a/jonathanisl/RH_Hotels_Booking/Program.cs b/jonathanisl/RH_Hotels_Booking/Program.cs new file mode 100644 index 0000000..5e96557 --- /dev/null +++ b/jonathanisl/RH_Hotels_Booking/Program.cs @@ -0,0 +1,255 @@ +namespace RH_Hotels_Booking; + +class Prices +{ + public int SingleRoom = 100; + public int DoubleRoom = 200; + public int GroupRoom = 350; + public int VipSuite = 450; + public int LuxurySuite = 550; +} + +class Program +{ + static int MAX_ATTEMPTS = 3; + // RH Hotels Localizations: Spain, France, Portugal, Italy, Germany + const int EXIT_OPTION = 2; + const string USER = "system"; + const string PASSWORD = "123456*"; + static int singlePrice = 100; + static int doublePrice = 200; + static int groupPrice = 350; + static int vipPrice = 450; + static int luxuryPrice = 550; + + static string[] SpainCities = ["MADRID","BARCELONA","VALENCIA"]; + static string[] GermanyCities = ["MUNICH","BERLIN"]; + static string[] ItalyCities = ["ROME","MILAN"]; + static string[] FranceCities = ["Paris","Marseille"]; + static string[] PortugalCities = ["Madeira","Lisbon","Porto"]; + + static void Main(string[] args) + { + Console.WriteLine("Input username: "); + string user = Console.ReadLine(); + Console.WriteLine("Input password"); + string password = Console.ReadLine(); + + if (!loginSuccess(user,password)) + { + Console.WriteLine("You are reaching max attempts allowed. Try again later"); + Console.WriteLine(""); + return; + } + + int selectedOption = 0; + + while ( selectedOption != EXIT_OPTION ) + { + showMenu(); + selectedOption = int.Parse(Console.ReadLine()); + + switch (selectedOption) + { + case 1: + makeReservation(); + break; + default: + break; + } + } + } + + static void showMenu() + { + Console.WriteLine("RH Hotels - Booking"); + Console.WriteLine("-------------------"); + Console.WriteLine("1. Make a reservation"); + Console.WriteLine("--------------------"); + Console.WriteLine("Select an option (press 2 to exit): "); + } + + static bool loginSuccess(string user, string password) + { + int loginAttempts = 0; + + while (loginAttempts <= MAX_ATTEMPTS) + { + + if (user == USER) + { + if (password == PASSWORD) + { + return true; + } + else + { + loginAttempts++; + } // (password == PASSWORD) + } + else + { + Console.WriteLine("User does not exists. Try again"); + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + + } + + return false; + } + + static void makeReservation() + { + Console.WriteLine("Select a country (SPAIN, FRANCE, PORTUGAL, ITALY, GERMANY): "); + string selectedCountry = Console.ReadLine(); + showCitiesForCountrySelected(selectedCountry); + string selectedCity = Console.ReadLine(); + Console.WriteLine("Select rooms quantity"); + Console.WriteLine("---------------------"); + Console.WriteLine("How many Single Rooms ($100)? (0 to continue):"); + int singleRoomsQuantity = int.Parse(Console.ReadLine()); + Console.WriteLine("How many Double Rooms ($200)? (0 to continue):"); + int doubleRoomsQuantity = int.Parse(Console.ReadLine()); + Console.WriteLine("How many Group Rooms ($350)? (0 to continue):"); + int groupRoomsQuantity = int.Parse(Console.ReadLine()); + Console.WriteLine("How many VIP Rooms ($450)? (0 to continue):"); + int vipRoomsQuantity = int.Parse(Console.ReadLine()); + Console.WriteLine("How many Luxury Suites ($550)? (0 to continue):"); + int luxuryRoomsQuantity = int.Parse(Console.ReadLine()); + + Console.WriteLine("Are you confirming this transaction? (y/n):"); + string confirmation = Console.ReadLine(); + + if ( confirmation == "n" ) + { + return; + } + + Console.WriteLine("Input your name: "); + string name = Console.ReadLine(); + Console.WriteLine("Input your surname: "); + string surname = Console.ReadLine(); + Console.WriteLine("Input your ID / Passport number: "); + string idNumber = Console.ReadLine(); + + // making calculations + + int singleTotal = singleRoomsQuantity * singlePrice, doubleTotal = doubleRoomsQuantity * doublePrice; + int groupTotal = groupRoomsQuantity * groupPrice, vipTotal = vipRoomsQuantity * vipPrice, luxuryTotal = luxuryRoomsQuantity * luxuryPrice; + int totalAmount = singleTotal + doubleTotal + groupTotal + vipTotal + luxuryTotal; + + Console.WriteLine("Reservation Information"); + Console.WriteLine("-----------------------"); + Console.WriteLine($"Name: {name}"); + Console.WriteLine($"Surname: {surname}"); + Console.WriteLine($"Identification Number: {idNumber}"); + Console.WriteLine("----------------------------------"); + Console.WriteLine("Reservation Details"); + Console.WriteLine("----------------------------------"); + + if (singleRoomsQuantity > 0) + { + Console.WriteLine($"Single Rooms: {singleRoomsQuantity}"); + Console.WriteLine($"Total: {singleTotal}"); + } + + if (doubleRoomsQuantity > 0) + { + Console.WriteLine($"Double Rooms: {doubleRoomsQuantity}"); + Console.WriteLine($"Total: {doubleTotal}"); + } + + if (groupRoomsQuantity > 0) + { + Console.WriteLine($"Group Rooms: {groupRoomsQuantity}"); + Console.WriteLine($"Total: {groupTotal}"); + } + + if (vipRoomsQuantity > 0) + { + Console.WriteLine($"VIP Rooms: {vipRoomsQuantity}"); + Console.WriteLine($"Total: {vipTotal}"); + } + + if (luxuryRoomsQuantity > 0) + { + Console.WriteLine($"Luxury Suites: {luxuryRoomsQuantity}"); + Console.WriteLine($"Total: {luxuryTotal}"); + } + + Console.WriteLine($"Total amount: {totalAmount}"); + Console.WriteLine("----------------------------"); + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + + static void showCitiesForCountrySelected(string country) + { + Console.WriteLine($"{country} Available Cities"); + Console.WriteLine("-------------------------"); + Console.WriteLine(""); + + int menuOption = 1; + switch (country) + { + case "SPAIN": + + foreach ( string city in SpainCities ) + { + Console.WriteLine($"{menuOption}. {city}"); + menuOption++; + } + + break; + + case "FRANCE": + + foreach ( string city in FranceCities ) + { + Console.WriteLine($"{menuOption}. {city}"); + menuOption++; + } + + break; + + case "PORTUGAL": + + foreach ( string city in PortugalCities ) + { + Console.WriteLine($"{menuOption}. {city}"); + menuOption++; + } + + break; + + case "ITALY": + + foreach ( string city in ItalyCities ) + { + Console.WriteLine($"{menuOption}. {city}"); + menuOption++; + } + + break; + + case "GERMANY": + + foreach ( string city in GermanyCities ) + { + Console.WriteLine($"{menuOption}. {city}"); + menuOption++; + } + + break; + } + + Console.WriteLine(""); + Console.WriteLine("Select an option: "); + } + + static void showPricelist() + { + + } +} \ No newline at end of file diff --git a/jonathanisl/RH_Hotels_Booking/RH_Hotels_Booking.csproj b/jonathanisl/RH_Hotels_Booking/RH_Hotels_Booking.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/jonathanisl/RH_Hotels_Booking/RH_Hotels_Booking.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/jonathanisl/Travel_Agency/.gitignore b/jonathanisl/Travel_Agency/.gitignore new file mode 100644 index 0000000..104b544 --- /dev/null +++ b/jonathanisl/Travel_Agency/.gitignore @@ -0,0 +1,484 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from `dotnet new gitignore` + +# dotenv files +.env + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp diff --git a/jonathanisl/Travel_Agency/Program.cs b/jonathanisl/Travel_Agency/Program.cs new file mode 100644 index 0000000..7d35b8d --- /dev/null +++ b/jonathanisl/Travel_Agency/Program.cs @@ -0,0 +1,114 @@ +namespace Travel_Agency; + +class Program +{ + const int WINTER_COST = 100; + const int AUTUMN_COST = 200; + const int SPRING_COST = 300; + const int SUMMER_COST = 400; + static int userBudget; + static string selectedSeason; + static string selectedActivity; + static string selectedCountry; + static int selectedCost; + + static void Main(string[] args) + { + Console.WriteLine("Input your budget: "); + userBudget = int.Parse(Console.ReadLine()); + + Console.WriteLine("Choose a Season (WINTER, AUTUMN, SPRING, SUMMER): "); + selectedSeason = Console.ReadLine(); + + Console.WriteLine("Now, you need choose your preference about activities: "); + + switch (selectedSeason) + { + case "WINTER": + Console.WriteLine("1. Skiing Activities"); + Console.WriteLine("2. Tour of the Swiss Alps"); + Console.WriteLine("-------------------------"); + Console.WriteLine("Select an option: "); + int winter_Option = int.Parse(Console.ReadLine()); + + if (winter_Option == 1) { + selectedActivity = "Skiing Activities"; + selectedCountry = "ANDORRA"; + } + else + { + selectedActivity = "Tour of the Swiss Alps"; + selectedCountry = "SWITZERLAND"; + } + + selectedCost = WINTER_COST; + break; + + case "AUTUMN": + Console.WriteLine("1. Hiking and Extreme Sports Activities"); + Console.WriteLine("2. Cultural and Historical Activities"); + Console.WriteLine("-------------------------"); + Console.WriteLine("Select an option: "); + int autumnOption = int.Parse(Console.ReadLine()); + + if (autumnOption == 1) { + selectedActivity = "Skiing Activities"; + selectedCountry = "BELGIUM"; + } + else + { + selectedActivity = "Tour of the Swiss Alps"; + selectedCountry = "AUSTRIA"; + } + selectedCost = AUTUMN_COST; + break; + + case "SPRING": + Console.WriteLine("1. Extreme Sports Activities"); + Console.WriteLine("2. Cultural and Historical Tour"); + Console.WriteLine("-------------------------"); + Console.WriteLine("Select an option: "); + int spring_option = int.Parse(Console.ReadLine()); + + if (spring_option == 1) { + selectedActivity = "Extreme Sports Activities"; + selectedCountry = "FRANCE"; + } + else + { + selectedActivity = "Cultural and Historical Tour"; + selectedCountry = "ITALY"; + } + selectedCost = SPRING_COST; + break; + + case "SUMMER": + Console.WriteLine("1. Hiking and Extreme Sports Activities"); + Console.WriteLine("2. Activities on Beaches"); + Console.WriteLine("-------------------------"); + Console.WriteLine("Select an option: "); + int summerOption = int.Parse(Console.ReadLine()); + + if (summerOption == 1) { + selectedActivity = "Hiking and Extreme Sports Activities"; + selectedCountry = "SPAIN"; + } + else + { + selectedActivity = "Activities on Beaches"; + selectedCountry = "PORTUGAL"; + } + selectedCost = SUMMER_COST; + break; + default: + Console.WriteLine("Wrong option. Press a key to continue"); + Console.ReadLine(); + return; + } + + Console.WriteLine(""); + Console.WriteLine($"Our recommendation to you for destination is {selectedCountry} in {selectedSeason}"); + Console.WriteLine(""); + } + +} \ No newline at end of file diff --git a/jonathanisl/Travel_Agency/Travel_Agency.csproj b/jonathanisl/Travel_Agency/Travel_Agency.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/jonathanisl/Travel_Agency/Travel_Agency.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/jonathanisl/Travel_Agency/Travel_Agency.sln b/jonathanisl/Travel_Agency/Travel_Agency.sln new file mode 100644 index 0000000..e94bbe6 --- /dev/null +++ b/jonathanisl/Travel_Agency/Travel_Agency.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34316.72 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Travel_Agency", "Travel_Agency.csproj", "{B5B67D2C-8D46-4E09-874F-10FB6DA475A9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B5B67D2C-8D46-4E09-874F-10FB6DA475A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5B67D2C-8D46-4E09-874F-10FB6DA475A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5B67D2C-8D46-4E09-874F-10FB6DA475A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5B67D2C-8D46-4E09-874F-10FB6DA475A9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9DF2E0EB-6259-4900-B3D7-F52FF426E40D} + EndGlobalSection +EndGlobal diff --git a/jonathanisl/Valencia_Hospital_Appointments/.gitignore b/jonathanisl/Valencia_Hospital_Appointments/.gitignore new file mode 100644 index 0000000..104b544 --- /dev/null +++ b/jonathanisl/Valencia_Hospital_Appointments/.gitignore @@ -0,0 +1,484 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from `dotnet new gitignore` + +# dotenv files +.env + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp diff --git a/jonathanisl/Valencia_Hospital_Appointments/Program.cs b/jonathanisl/Valencia_Hospital_Appointments/Program.cs new file mode 100644 index 0000000..3421b29 --- /dev/null +++ b/jonathanisl/Valencia_Hospital_Appointments/Program.cs @@ -0,0 +1,96 @@ +using System.Diagnostics; + +namespace Valencia_Hospital_Appointments; + +class Program +{ + const string USER = "system"; + const string PASSWORD = "123456*"; + const string EXIT_OPTION = "E"; + const int MAX_ATTEMPTS = 3; + const int DOCTORS_PER_SPECIALTY = 3; + const int MAX_APPOINTMENT_LIMIT = 3; + static string[] doctors_GeneralMedicine = ["Pedro Pérez", "Luisa López", "Valentina Ramírez"]; + static string[] doctors_EmergencyCare = ["Luis Brito","Angela Abad","John Hopkins"]; + static string[] doctors_ClinicalAnalysis = ["María Elena Franco","Aura Morales","Gabriel Bustamante"]; + static string[] doctors_Cardiology = ["Armando Bianco","Mailin Piñero","Juan Luque"]; + static string[] doctors_Neurology = ["Luis Torres","Marlene Odremán","Eliécer Urbina"]; + static string[] doctors_Nutrition = ["Héctor Machado","Maricarmen Rincones","Amada Ruiz"]; + static string[] doctors_Physiotherapy = ["Fabiola Luna","Andrés Zapata","Lorgelys Martínez"]; + static string[] doctors_Traumatology = ["Madis Siso","César Arveláez","Carolina Suárez"]; + static string[] doctors_InternalMedicine = ["Gerardo Vitale","Rubén Pereira","Katiuska Ramírez"]; + Dictionary userAppointments = new Dictionary(); + + + static void Main(string[] args) + { + Console.WriteLine("Input username: "); + string user = Console.ReadLine(); + Console.WriteLine("Input password"); + string password = Console.ReadLine(); + + if (!loginSuccess(user,password)) + { + Console.WriteLine("You are reaching max attempts allowed. Try again later"); + Console.WriteLine(""); + return; + } + + showMenu(); + string selectedOption = Console.ReadLine(); + + switch (int.Parse(selectedOption)) + { + case 1: + break; + } + } + + static bool loginSuccess(string user, string password) + { + int loginAttempts = 0; + + while (loginAttempts <= MAX_ATTEMPTS) + { + + if (user == USER) + { + if (password == PASSWORD) + { + return true; + } + else + { + loginAttempts++; + } // (password == PASSWORD) + } + else + { + Console.WriteLine("User does not exists. Try again"); + Console.WriteLine("Press a key to continue..."); + Console.ReadLine(); + } + + } + + return false; + } + + static void showMenu() + { + Console.WriteLine("Valencia Hospital Appointments"); + Console.WriteLine("------------------------------"); + Console.WriteLine("Choose specialty: "); + Console.WriteLine("1. General Medicine"); + Console.WriteLine("2. Emergency Care"); + Console.WriteLine("3. Clinical Analysis"); + Console.WriteLine("4. Cardiology"); + Console.WriteLine("5. Neurology"); + Console.WriteLine("6. Nutrition"); + Console.WriteLine("7. Physiotherapy"); + Console.WriteLine("8. Traumatology"); + Console.WriteLine("9. Internal Medicine"); + Console.WriteLine("------------------------------"); + Console.WriteLine("Choose an option (Press E to exit): "); + } +} \ No newline at end of file diff --git a/jonathanisl/Valencia_Hospital_Appointments/Valencia_Hospital_Appointments.csproj b/jonathanisl/Valencia_Hospital_Appointments/Valencia_Hospital_Appointments.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/jonathanisl/Valencia_Hospital_Appointments/Valencia_Hospital_Appointments.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/jonathanisl/Valencia_Hospital_Appointments/Valencia_Hospital_Appointments.sln b/jonathanisl/Valencia_Hospital_Appointments/Valencia_Hospital_Appointments.sln new file mode 100644 index 0000000..586af11 --- /dev/null +++ b/jonathanisl/Valencia_Hospital_Appointments/Valencia_Hospital_Appointments.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34316.72 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Valencia_Hospital_Appointments", "Valencia_Hospital_Appointments.csproj", "{85B6C296-07F1-4850-BABC-E3BDD49753EA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {85B6C296-07F1-4850-BABC-E3BDD49753EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85B6C296-07F1-4850-BABC-E3BDD49753EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85B6C296-07F1-4850-BABC-E3BDD49753EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85B6C296-07F1-4850-BABC-E3BDD49753EA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B66764A0-E6D8-46BC-A755-6386279F9C0D} + EndGlobalSection +EndGlobal