100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Essay

Unit 4: Programming- Assignment 2 - SOURCE CODE(FREE with assignment document)

Rating
-
Sold
-
Pages
100
Grade
A+
Uploaded on
21-05-2023
Written in
2022/2023

The source code(written in C#) for Unit 4: Programming - Program development Note: This is included with main document if purchased in the bundle(the bundle is the same price as the document alone). If you accidentally purchase ONLY this document or the main document for this assignment, message me and I will send you the corresponding document to the one you purchased free of charge.

Show more Read less
Institution
Course











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Study Level
Examinator
Subject
Unit

Document information

Uploaded on
May 21, 2023
Number of pages
100
Written in
2022/2023
Type
Essay
Professor(s)
Unknown
Grade
A+

Subjects

Content preview

using System;
using System.IO;

namespace U4_A2_Prog_New
{
class Program
{
static void Main(string[] args)
{
//Welcomes user and explains what the software is for.

Console.WriteLine("Welcome to the tournament event scoring application");
Console.WriteLine("\nThis software will allow you to enter contestantss for
tournaments and enter their scores for events");
Console.WriteLine("\nIt will then tell you positions and scores for each event");
Console.WriteLine("\nThere is both a temas and individual options in this
tournament");
Console.WriteLine("\nPress any key to continue");

Console.WriteLine("\n(c)Close application");

char MenuChoice = Convert.ToChar(Console.ReadKey().KeyChar);

if (MenuChoice == Convert.ToChar("c"))
{
close();
}
else if (MenuChoice != Convert.ToChar("c"))
{
MainMenu();
}

}

static void MainMenu()
//Provides the first options to the user; which will allow them to change, or view,
individual or team data.
{
clear();
Console.WriteLine("Welcome to the main menu \nPlease choose to input, or view,
individual or team data ");
Console.WriteLine("\n(1) Individuals");
Console.WriteLine("(2)Teams");
Console.WriteLine("\n(c) Close application");

char mainMenuChoice = Convert.ToChar(Console.ReadKey().KeyChar);

, if (mainMenuChoice == Convert.ToChar("1"))
{
IndividualTournMenu();
}
else if (mainMenuChoice == Convert.ToChar("2"))
{
TeamTournMenu();
}
else if (mainMenuChoice == Convert.ToChar("c"))
{
close();
}
else
{
MainMenu();
}
Console.ReadKey();

}




static void IndividualTournMenu()
//Provides options of what they would like to do regarding the individual tournament.
{
clear();
Console.WriteLine("Welcome to the Individual tournament menu, please select what
you would like to do");

Console.WriteLine("\n(1)Enter competitors into the individual tournament");
Console.WriteLine("\n(2)Record the scores for competitors");
Console.WriteLine("\n(3)View results for events and the tournament");
Console.WriteLine("\n(x)Exit menu (Main Menu)");
Console.WriteLine("(c)Close application");

char indTournMenuChoice = Convert.ToChar(Console.ReadKey().KeyChar);


if (indTournMenuChoice == Convert.ToChar("1"))
{
IndividualEntry();

}

else if (indTournMenuChoice == Convert.ToChar("2"))
{
IndividualScoresMenu();

, }
else if (indTournMenuChoice == Convert.ToChar("3"))
{
IndividualResults();
}
else if (indTournMenuChoice == Convert.ToChar("x"))
{
MainMenu();
}
else if (indTournMenuChoice == Convert.ToChar("c"))
{
close();
}
else
{
IndividualTournMenu();
}
Console.ReadKey();
}




static void IndividualScoresMenu()
//Allow user to choose which event they would like to input scores for
{
clear();
Console.WriteLine("Please enter the event you would like to record the scores for");

Console.WriteLine("(1) Tennis");
Console.WriteLine("(2) Badminton");
Console.WriteLine("(3) Boxing");
Console.WriteLine("(4) Chess");
Console.WriteLine("(5) Checkers");

Console.WriteLine("\n(x)Exit menu");
Console.WriteLine("(c)Close application");


//Creates the variable for the choice based on the input
char indEventScoreChoice = Convert.ToChar(Console.ReadKey().KeyChar);

//Takes the user to the a static void which will allow them to input scores for each
event
if (indEventScoreChoice == Convert.ToChar("1"))
{
TennisScoring();
}
else if (indEventScoreChoice == Convert.ToChar("2"))

, {
BadmintonScoring();
}
else if (indEventScoreChoice == Convert.ToChar("3"))
{
BoxingScoring();
}
else if (indEventScoreChoice == Convert.ToChar("4"))
{
ChessScoring();
}
else if (indEventScoreChoice == Convert.ToChar("5"))
{
CheckersScoring();
}
else if (indEventScoreChoice == Convert.ToChar("x"))
//Menu exit option
{
clear();
Console.WriteLine("Which menu would you like to exit to");
Console.WriteLine("(1)Individual tournament menu");
Console.WriteLine("(2)Main Menu");
Console.WriteLine("\n(c)Close application");

char menuChoice = Convert.ToChar(Console.ReadKey().KeyChar);

if (menuChoice == Convert.ToChar("1"))
{
IndividualTournMenu();
}
else if (menuChoice == Convert.ToChar("2"))
{
MainMenu();
}
}
else if (indEventScoreChoice == Convert.ToChar("c"))
//Application close option
{
close();
}

Console.ReadKey();
}
static void IndividualResults()
//The menu where the user can choose to view the results of individual events of the
tournament(events combined)
{
clear();
$4.11
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
DocsByPow Coleg Menai
Follow You need to be logged in order to follow users or courses
Sold
55
Member since
2 year
Number of followers
38
Documents
6
Last sold
2 months ago
DocsByPow

3.7

7 reviews

5
1
4
3
3
3
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions