Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Download and explore the code using Visual Studio 2 0 1 9 or 2 0 2 2 . Add a screenshot of the code from

Download and explore the code using Visual Studio 2019 or 2022. Add a screenshot of the
code from Visual Studio and include it in the report.using System;
namespace TigerSoccerClub
{
class Program
{
public Program(int players, string name, string registration, string jersey, double price)
{
Players = players;
Name = name;
Registration = registration;
Jersey = jersey;
Price = price;
}
public int Players { get; set; }
public string Name { get; set; }
public string Registration { get; set; }
public string Jersey { get; set; }
public double Price { get; set; }
static void Main(string[] args)
{
int i =0;
double total =0;
int jerseyamt =100;
String Name ="";
String Registration ="";
String Jersey ="";
int initalamt_kids =150;
int initalamt_adult =230;
//these lines of codes are for aligning items to center and contains heading portion
string s ="*****Welcome to TigerSoccerClub*****";
Console.SetCursorPosition((Console.WindowWidth - s.Length)/2, Console.CursorTop);
Console.WriteLine(s);
Console.Write("Enter the number of players per registrations: ");
int Players = Convert.ToInt32(Console.ReadLine());
if(Players>4|| Players<1)
{
Console.WriteLine("Invalid number, Please enter the registration number betweeen 1 to 4");
}
else
{
if(Players ==1)
{
Console.Write("Enter name: ");
Name = Console.ReadLine();
Console.Write("Registration type: ");
Registration = Console.ReadLine();
Console.Write("Enter Yes/No to indicate wheather you want jersey: ");
Jersey = Console.ReadLine();
if (Registration == "Kids" && Jersey == "Yes")
{
total = initalamt_kids + jerseyamt;
Console.Write("Total price from "+ Name +" is: "+ total);
Console.WriteLine("
");
}
else if (Registration == "Kids" && Jersey =="No")
{
total = initalamt_kids;
Console.Write("Total price from "+ Name +" is: "+ total);
Console.WriteLine("
");
}
else if (Registration == "Adult" && Jersey == "Yes")
{
total = initalamt_adult + jerseyamt;
Console.Write("Total price from "+ Name +" is: "+ total);
Console.WriteLine("
");
}
else
{
total = initalamt_adult;
Console.Write("Total price from "+ Name +" is: "+ total);
Console.WriteLine("
");
}
string s1= "Summary of Registrations";
Console.SetCursorPosition((Console.WindowWidth - s.Length)/2, Console.CursorTop);
Console.WriteLine(s1);
Console.WriteLine("******************************************************************************************************");
Console.WriteLine("Name "+" Type "+" Jersey "+" Total ");
Console.WriteLine("
");
for (int j =0; j < Players; j++)
{
Console.WriteLine(Name +""+ Registration +""+ Jersey +""+ total);
}
}
else
{
for (i =0; i < Players; i++)
{
Console.Write("Enter name: ");
Name = Console.ReadLine();
Console.Write("Registration type: ");
Registration = Console.ReadLine();
Console.Write("Enter Yes/No to indicate wheather you want jersey: ");
Jersey = Console.ReadLine();
if (Registration == "Kids" && Jersey == "Yes")
{
double test = initalamt_kids + jerseyamt;
double test1=(test *5)/100;
total = test - test1;
Console.Write("Total price from "+ Name +" is: "+ total);
Console.WriteLine("
");

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions