You modified the GreenvilleRevenue program to include a number of methods. Now modify every data entry statement to use a TryParse() method to ensure that each piece of data is the correct type. Any invalid user entries should generate an appropriate message, and the user should be required to reenter the data.
using System;
using static System.Console;
class GreenvilleRevenue
{
static void Main(string[] args)
{
const int fee = 25;
int lastYearsContestants;
int thisYearsContestants;
const int LOW = 0;
const int HIGH = 30;
int other = 0;
int dancer = 0;
int musician = 0;
int singer = 0;
WriteLine("**********************************");
WriteLine("* The stars shine in Greenville. *");
WriteLine("**********************************");
WriteLine("");
lastYearsContestants = getContestantsNum(message, LOW, HIGH);
string[] contestant = new string[thisYearsContestants];
string[] talent = new string[thisYearsContestants];
getContestantsInfo(contestant, talent);
for (int x = 0; x < talent.Length; ++x)
{
if (talent[x] == "O")
{
++other;
}
else if (talent[x] == "S")
{
++singer;
}
else if (talent[x] == "D")
{
++dancer;
}
else if (talent[x] == "M")
{
++musician;
}
}
Clear();
WriteLine("Currently signed up, there are..");
WriteLine("{0} dancers", dancer);
WriteLine("{0} singers", singer);
WriteLine("{0} musicians", musician);
WriteLine("{0} everything else!", other);
contestantByTalent(contestant, talent);
Clear();
contestantInfo(thisYearsContestants, lastYearsContestants, fee);
}
static int getContestantsNum(string message, int LOW, int HIGH)
{
WriteLine("Please enter the number of contestants for last year.>>");
string input = ReadLine();
int contestantsNum = Convert.ToInt32(input);
while (contestantsNum < LOW || contestantsNum > HIGH)
{
WriteLine("Valid numbers are 0 through 30, Please try again.>>");
contestantsNum = Convert.ToInt32(ReadLine());
}
return contestantsNum;
WriteLine("Please enter the number of contestants for this year.>>");
string input = ReadLine();
int contestantsNum = Convert.ToInt32(input);
while (contestantsNum < LOW || contestantsNum > HIGH)
{
WriteLine("Valid numbers are 0 through 30, Please try again.>>");
contestantsNum = Convert.ToInt32(ReadLine());
}
return contestantsNum;
}
static string getTalent(int contestantsNum)
{
bool correct = false;
string talentType = "";
while (!correct)
{
WriteLine("What is contestant " + contestantsNum + "'s skill? Please enter 'S' for Singer, 'D' for Dancer, 'M' for " +
"Musician, 'O' for Other.>>");
talentType = ReadLine().ToUpper();
if (talentType == "S" || talentType == "D" || talentType == "M" || talentType == "O")
{
correct = true;
}
else
{
WriteLine("Please enter a valid response.>>");
}
}
return talentType;
}
static void contestantByTalent(string[] contestant, string[] talent)
{
WriteLine ("To see a list of all contestants with a specific talent, Please enter a talent code.talent codes are(S)inger, (D)ancer, (M)usician, (O)ther; altenatively, you may type (E) to exit.>>");
string entry = ReadLine().ToUpper();
while (entry != "E")
{
if (entry != "S" && entry != "D" && entry != "M" && entry != "O")
{
WriteLine("That wasn't a valid talent code. Valid talent codes are (S)inger, (D)ancer, (M)usician, (O)ther; altenatively, you may type (E) to exit.>>");
entry = ReadLine().ToUpper();
if (entry == "E")
break;
}
for (int x = 0; x < talent.Length; ++x)
{
if (entry == talent[x])
WriteLine("Contestant " + contestant[x] + " talent " + talent[x]);
}
WriteLine("To see a list of all contestants with a specific talent, Please enter a talent code. talent codes are (S)inger, (D)ancer, (M)usician, (O)ther; altenatively, you may type (E) to exit.>>");
entry = ReadLine().ToUpper();
}
}
static void getContestantsInfo(string[] contestant, string[] talent)
{
for (int x = 0; x < contestant.Length; ++x)
{
WriteLine("What is the name for Contestant " + (x + 1) + "?");
contestant[x] = ReadLine();
talent[x] = getTalent(x + 1);
}
}
static void contestantInfo (int thisYearsContestants, int lastYearsContestants, int fee)
{
if (thisYearsContestants > lastYearsContestants * 2)
{
WriteLine("The competition is more than twice as big this year!");
WriteLine("The expected revenue for this year's competition is {0:C}", (thisYearsContestants * fee));
}
else
if (thisYearsContestants > lastYearsContestants && thisYearsContestants <= (lastYearsContestants * 2))
{
WriteLine("The competition is bigger than ever!");
WriteLine("The expected revenue for this year's competition is {0:C}", (thisYearsContestants * fee));
}
else
if (thisYearsContestants < lastYearsContestants)
{
WriteLine("A tighter race this year! Come out and cast your vote!");
WriteLine("The expected revenue for this year's competition is {0:C}.", (thisYearsContestants * fee));
}
}
}

Answers

Answer 1
Doin it for points sorry

Related Questions

What is the grooming process as it relates to online predators

Answers

the process by which online predators lure in minors to get close enough to hurt them.

Fill in the blank: _____ data are statistical and numerical facts about a project.
Subjective



Quantitative



Mathematical



Qualitative

Answers

Quantitative data are statistical and numerical facts about a project that can be counted, measured or expressed using numbers.

Quantitative data is statistical and its nature is usually structured, it uses numbers and values that are most suitable for the analysis of a project.

The collection of quantitative data offers the possibility of statistical analysis.

This type of data allows you to easily measure and quantify facts in an organized and accessible way within relational databases.

Therefore, we can conclude that quantitative data is data that comes from numerical information, quantities, percentages, proportions and statistics.

Learn more about quantitative data here: https://brainly.com/question/96076

Write a recursive function called DigitCount() that takes a positive integer as a parameter and returns the number of digits in the integer. Hint: The number of digits increases by 1 whenever the input number is divided by 10. Ex: If the input is:

Answers

Recursive functions are functions that are called from within itself

The recursive function DigitCount() in Python where comments are used to explain each line is as follows:

#This defines the function

def countDigits(n):

   #If the integer is less than 10

   if n< 10:

       #Then the integer has 1 digit

       return 1

   #Otherwise,  

   else:

       #Count the number of integers

       return 1 + countDigits(n / 10)

At the end of the function, the count of integers is returned to the main function

Read more about similar programs at:

https://brainly.com/question/20397067

The system tray contains _____.
A. the battery life
B. the computer's hard drive
C. the operating system
D. Quick Launch

Answers

[tex]⇒[/tex]

the operating system

The notification area (also called the "system tray") is located in the Windows Taskbar, usually at the bottom right corner. It contains miniature icons for easy access to system functions such as antivirus settings, printer, modem, sound volume, battery status, and more.

Answer:

A BATTERY LIFEExplanation: The person said it and it was right I believed them, and they made me get a 100% thank you sir/madam and as you can see, I have proof so your welcome and thank you.

I Wouldn't just say the letter like A or C because everyone's quiz is different, and it changes but either way whatever your welcome and again thank you.

camera mount that is worn over the shoulders of a camera operator. What is it called?

Answers

It is called a camera stabilizer.
I hope this helped :)

In order to send and receive packets in the Internet, hosts require an IP address. What are the 2 ways a host can obtain an IP address

Answers

Answer:

Explanation:

An IP address is a 32-bit number. It uniquely identifies a host (computer or other device, such as a printer or router) on a TCP/IP network.

IP addresses are normally expressed in dotted-decimal format, with four numbers separated by periods, such as 192.168.123.132. To understand how subnet masks are used to distinguish between hosts, networks, and subnetworks, examine an IP address in binary notation.

For example, the dotted-decimal IP address 192.168.123.132 is (in binary notation) the 32-bit number 110000000101000111101110000100. This number may be hard to make sense of, so divide it into four parts of eight binary digits.

These 8-bit sections are known as octets. The example IP address, then, becomes 11000000.10101000.01111011.10000100. This number only makes a little more sense, so for most uses, convert the binary address into dotted-decimal format (192.168.123.132). The decimal numbers separated by periods are the octets converted from binary to decimal notation.

For a TCP/IP wide area network (WAN) to work efficiently as a collection of networks, the routers that pass packets of data between networks don't know the exact location of a host for which a packet of information is destined. Routers only know what network the host is a member of and use information stored in their route table to determine how to get the packet to the destination host's network. After the packet is delivered to the destination's network, the packet is delivered to the appropriate host.

For this process to work, an IP address has two parts. The first part of an IP address is used as a network address, the last part as a host address. If you take the example 192.168.123.132 and divide it into these two parts, you get 192.168.123. Network .132 Host or 192.168.123.0 - network address. 0.0.0.132 - host address.

The second item, which is required for TCP/IP to work, is the subnet mask. The subnet mask is used by the TCP/IP protocol to determine whether a host is on the local subnet or on a remote network.

In TCP/IP, the parts of the IP address that are used as the network and host addresses aren't fixed. Unless you have more information, the network and host addresses above can't be determined. This information is supplied in another 32-bit number called a subnet mask. The subnet mask is 255.255.255.0 in this example. It isn't obvious what this number means unless you know 255 in binary notation equals 11111111. So, the subnet mask is 11111111.11111111.11111111.00000000.

Lining up the IP address and the subnet mask together, the network, and host portions of the address can be separated:

11000000.10101000.01111011.10000100 - IP address (192.168.123.132)

11111111.11111111.11111111.00000000 - Subnet mask (255.255.255.0)

The first 24 bits (the number of ones in the subnet mask) are identified as the network address. The last 8 bits (the number of remaining zeros in the subnet mask) are identified as the host address. It gives you the following addresses:

11000000.10101000.01111011.00000000 - Network address (192.168.123.0)

00000000.00000000.00000000.10000100 - Host address (000.000.000.132)

So now you know, for this example using a 255.255.255.0 subnet mask, that the network ID is 192.168.123.0, and the host address is 0.0.0.132. When a packet arrives on the 192.168.123.0 subnet (from the local subnet or a remote network), and it has a destination address of 192.168.123.132, your computer will receive it from the network and process it.

Almost all decimal subnet masks convert to binary numbers that are all ones on the left and all zeros on the right. Some other common subnet masks are:

Decimal Binary 255.255.255.192 1111111.11111111.1111111.11000000 255.255.255.224 1111111.11111111.1111111.11100000

Internet RFC 1878 (available from InterNIC-Public Information Regarding Internet Domain Name Registration Services) describes the valid subnets and subnet masks that can be used on TCP/IP networks.

Hope this helps!

Natural language generation is focused on?

Answers

While natural language understanding focuses on computer reading comprehension, natural language generation enables computers to write. NLG is the process of producing a human language text response based on some data input. This text can also be converted into a speech format through text-to-speech services.

- BRAINLIEST answerer

Consider the conditions and intentions behind the creation of the internet—that it was initially created as a tool for academics and federal problem-solvers. How might that explain some of the security vulnerabilities present in the “cloud” today?

Answers

It should be noted that the intention for the creation of the internet was simply for resources sharing.

The motivation behind the creation of the internet was for resources sharing. This was created as a tool for academics and federal problem-solvers.

It transpired as it wasn't for its original purpose anymore. Its users employed it for communication with each other. They sent files and softwares over the internet. This led to the security vulnerabilities that can be seen today.

Learn more about the internet on:

https://brainly.com/question/2780939

computer Graphics:
B. Arbitrary reference point:
1) Apply a rotation by 60° on the Pivot Point (-10, 10) and display it.
2) Apply a rotation by 270° on the Pivot Point (10, 0) and then translate it by tx
= -20 and ty = 5. Display the final result.

Answers

Thanks hope it helps

Viewing digital content

Answers

Digital Content Creation Platforms offer content subscription or pay-as-you-go services for organizations. ... By offering access to this media, Digital Content Creation platforms make it so that organizations can share media of social interest while still complying with copyright laws.

Write a program, using case statements, that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbers, the operator, and the result. For division, of the denominator is zero, output an appropriate message.

Answers

Answer:#include<iostream>

using namespace std;

int main() {

int var1, var2;

char operation;

cout << "Enter the first number : ";

cin >> var1;

cout << endl;

cout <<"Enter the operation to be perfomed : ";

cin >> operation;

cout << endl;

cout << "Enter the second nuber : ";

cin >> var2;

cout << endl;

bool right_input = false;

if (operation == '+') {

cout << var1 << " " << operation << " " << var2 << " = " << (var1 + var2);

right_input = true;

}

if (operation == '-') {

cout << var1 << " " << operation << " " << var2 << " = " << (var1 - var2);

right_input = true;

}

if (operation == '*') {

cout << var1 << " " << operation << " " << var2 << " = " << (var1 * var2);

right_input = true;

}

if (operation == '/' && var2 != 0) {

cout << var1 << " " << operation << " " << var2 << " = " << (var1 - var2);

right_input = true;

}

if (operation == '/' && var2 == 0) {

cout << "Error. Division by zero.";

right_input = true;

}

if (!right_input) {

cout << var1 << " " << operation << " " << var2 << " = " << "Error;";

cout << "Invalid Operation!";

}

cout << endl;

system("pause");

return 0;

}

Explanation:

How does a computer work?

Answers

Answer:

A computer is a Device that can run multiple applications at a time and access the internet where you can find online stores and more also used to make video calls and more.

A computer system works by combining input, storage space, processing, and output. ... It is known as Computer Memory that keeps the data into it. A computer uses a hard drive for storing files and documents. It uses two types of memory, i.e., internal memory and external memory.

Which of the following is NOT a function of a Web Browser?
O Provide a platform that users can use to access web pages and sites
O Access a Web server and request a page on the Internet so the right information shows up
O Crawl through the World Wide Web searching for words and terms to index in Web Databases
O Interpret Web page's HTML tags and display the Web page's information in a way that is intended/easily readable for you

Answers

A web browser is used to gain access to the contents of a website, displaying the information in a readable and easily understandable format. Hence, an option which isn't a function of a web browser is Crawl through the World Wide Web searching for words and terms to index in Web Databases

A web browsers allows users to access web pages and sites, by accessing web servers and requesting access to display the contents.

Web pages are written in Hypertext Markup Language (HTML). Browsers interpret these document format and tags so that it is displayed in an understandable format.

Learn more : https://brainly.com/question/17130932

How does tracking changes relate to sharing a workbook in Excel?

Answers

Answer:When you highlight changes as you work, Excel outlines any revisions (such as changes, insertions, and deletions) with a highlighting color. On the Review tab, click Track Changes, and then click Highlight Changes. Select the Track changes while editing. This also shares your workbook check box.

Explanation:

A workbook in excel is a file that contains one or more worksheets to assist you with data organization.

What is a workbook?

A workbook in excel is a file that contains one or more worksheets to assist you with data organization. A blank workbook or a template can be used to build a new workbook.

The Advanced tab of the Share Workbook dialogue box gives further choices for changing how Excel records change. For example, you may choose the "Automatically Every" radio option and enter a value in the "Minutes" text box. If you enter 10, Excel will store changes made by users every 10 minutes.

When you highlight changes while you work, Excel highlights any modifications (such as updates, insertions, and deletions) with a highlighting colour. Track Changes and Highlight Changes may be found on the Review tab. Select the Track changes while editing.

Learn more about Workbook:

https://brainly.com/question/10321509

#SPJ2

What are 3 things message timing must include

Answers

Answer:

1)Message Timing. Another factor that affects how well a message is received and understood is timing. ...

2)Access Method. Access method determines when someone is able to send a message. ...

3)Flow Control. Timing also affects how much information can be sent and the speed that it can be delivered.

what are the main barriers to the adoption of an industry standard for internet system

Answers

Answer:

Industry experts say that although many companies find the potential of the Internet of Things very attractive, they either lack a clear value proposition for end-users or lack interoperability.

Question # 1 Multiple Select Which features are important when you plan a program? Select 4 options. Knowing what information is needed to find the result. Knowing what information is needed to find the result. Knowing what the user needs the program to accomplish. Knowing what the user needs the program to accomplish. Knowing how many lines of code you are allowed to use. Knowing how many lines of code you are allowed to use. Knowing what you want the program to do. Knowing what you want the program to do. Knowing how to find the result needed. Knowing how to find the result needed.

Answers

Answer:

c

Explanation:

Answer:

Knowing what the user needs the program to accomplish.Knowing how to find the result needed.Knowing what information is needed to find the result.Knowing what you want the program to do

Explanation:

:D

The capability of moving a completed programming solution easily from one type of computer to another is known as ________. Group of answer choices

Answers

Answer: Portability

Explanation: I hope it helps you!

What type of database replication relies on centralized control that determines when replicas may be created and how they are synchronized with the master copy

Answers

Database replication is very common in this Era. Traditional database replication is relies on centralized control that determines when replicas may be created and how they are synchronized with the master copy.

Database replication  is known to be the constant electronic copying of data from a database using one computer or server that is connected also to a database in another . this ensure that all users do share the same level of information.

Replication is often done to technologies which are used for copying and distributing data and database objects from one database to another and thereafter use in synchronizing between databases.

Conclusively, Replicas can only be made in the Traditional database replication through the power of centralized control.

See full question below

What type of database replication relies on centralized control that determines when replicas may be created and how they are synchronized with the master copy?

a distributed database model

b. traditional database replication

c. enterprise replication

d. local database model

Learn more about database replication from

https://brainly.com/question/6447559

Which statement best explains how the main idea relates to taking notes?

The main idea is always included in effective notes.
The main idea is always easy to identify.
The main idea is rarely used as a title for notes.
The main idea is rarely identified by listening or reading

Answers

Answer:

The main idea is always included in effective notes.

Answer:

a

Explanation:

I did the quiz

Other Questions
This should be pretty easy i think.Describe the components within the system involved in the collision between pilot and landing zone. solve pls brainliest The product of two positive numbers is 9. The reciprocal of one of these numbers is 4 times the reciprocal of the other number. What is the sum of the two numbers? Evaluate [tex]\frac{15}{k}[/tex] when k =3 please someone solve this please asap Dose any one know how to do this please Someone plz help me :( besides being located close to game food sources, where should ground blinds be located? A psychologically safety ________ represents a shared belief among team members that it is safe to engage in risky behaviors, such as questioning current practices without retribution or negative consequences. A 20-foot ladder is placed against a vertical wall of a building, with the bottom of the ladder standing on level ground 6 feet from the base of the building. How high up the wall does the ladder reach? i can't even do that tho im not verified Make menu cards showing TWO (2) Breakfast menus, TWO (2), 2 courses lunch/dinner menus, an a la carte menu and a table dhote menu On August 19, 2002, the ratio of stocks gaining value on the New York StockExchange to stocks losing value was about 43 to 20. If 869 stocks lost value, howmany gained?A)892B)1953C)1797D)1868 "By now, you might be thinking Im taking the same steps when writing a speech as I do when Im writing an essay or report. Youre correct! There are a number of similarities between the two forms a main point or thesis supported by examples, illustrations, proof, or details, clear organizational structure, introduction, body, conclusion. However, since a speech is written for the purpose of being heard. You need to make adjustments in style and structure taking into account the listeners will be depending on you not your paper for information. Sentences will probably be a little shorter. Vocabulary will be adjusted for the situation, but the composition process is basically the same. answer the following questionThe main idea is best expressed as _____.1 - writing a speech is the same as writing a paper2 - the process is basically the same for writing a speech or paper3 - sentences should be shorter when writing a speech Compare the two images in the article. How do the images, taken together, illustrate the shift in thinking caused by the Scientific Revolution?A. The first image shows the scientific approach to alchemy. The second image shows how scientific methods improved over timeB. The first image explains the theory behind alchemy .The second image shows the tools used in alchemy.C. The first image shows the mythological thinking behind alchemy. The second image shows the scientific instruments used in early chemistry.D. The first image shows an early understanding of molecules and atoms. The second image shows the tools used to conduct early experiments. NO LINKS! MARK YOU THE BRAINLIEST! 40 palabras en ingles sacadas por la palabra perseveranceAyuda :( for most people, taking 1000 mg of vitamin c daily will prevent a cold. true or false? Solve the inequality and graph the solution : k/-1 > 4 This circle is centered at the point (3,2) and the length of its radius is 5 what is the equation of the circle Helpppppppppppppppppppppppp