GetContestantNumber - This method gets and returns a valid number of contestants and is called twice once for last year’s number of contestants and once for this year’s value DisplayRelationship - This method accepts the number of contestants this year and last year and displays one of the three messages that describes the relationship between the two contestant values GetContestantData - This method fills the array of competitors and their talent codes GetLists - This method continuously prompts for talent codes and displays contestants with the corresponding talent until a sentinel value is entered

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

C#

n Chapter 6, you continued to modify the GreenvilleRevenue program. Now, modify the program so that the major functions appear in the following individual methods:

  • GetContestantNumber - This method gets and returns a valid number of contestants and is called twice once for last year’s number of contestants and once for this year’s value
  • DisplayRelationship - This method accepts the number of contestants this year and last year and displays one of the three messages that describes the relationship between the two contestant values
  • GetContestantData - This method fills the array of competitors and their talent codes
  • GetLists - This method continuously prompts for talent codes and displays contestants with the corresponding talent until a sentinel value is entered

An example of the program is shown below:

Enter number of contestants last year >> 2 Enter number of contestants this year >> 3 Last year's competition had 2 contestants, and this year's has 3 contestants Revenue expected this year is $75.00 The competition is bigger than ever! Enter contestant name >> Matt Talent codes are: S Singing D Dancing M Musical instrument O Other Enter talent code >> S Enter contestant name >> Sarah Talent codes are: S Singing D Dancing M Musical instrument O Other Enter talent code >> D Enter contestant name >> Bruno Talent codes are: S Singing D Dancing M Musical instrument O Other Enter talent code >> M The types of talent are: Singing 1 Dancing 1 Musical instrument 1 Other 0

In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output statements as follows: WriteLine("This is an example: {0}", value.ToString("C", CultureInfo.GetCultureInfo("en-US")));

using System;
using static System.Console;
using System.Globalization;
class GreenvilleRevenue
{
   static void Main()
   {
      // Write your main here.     
   }
   public static int GetContestantNumber(string when, int min, int max)
  {
    // Write your GetContestantNumber() here.
   }
   public static void DisplayRelationship(int numThisYear, int numLastYear)
   {
    // Write your DisplayRelationship() here.
   }
   public static void GetContestantData(int numThisYear, string[] names, char[] talents, char[] talentCodes, string[] talentCodesStrings, int[] counts)
   {
     // Write your GetContestantData() here.
   }
   public static void GetLists(int numThisYear, char[] talentCodes, string[] talentCodesStrings, string[] names, char[] talents, int[] counts)
   {
     // Write your GetLists() here.
   }
}

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY