Unit 4: Programming- Assignment 2 - SOURCE CODE(FREE with assignment document)
151 views 4 purchases
Course
Unit 4 - Programming
Institution
PEARSON (PEARSON)
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, me...
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");
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");
, 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");
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");
//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");
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();
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller DocsByPow. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $4.03. You're not tied to anything after your purchase.