Question: Solve in C# given the following code. In Chapter 6, you continued to modify the GreenvilleRevenue program. Now, modify the program so that the major
Solve in C# given the following code.
In 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 years number of contestants and once for this years 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
Here is a sample code to begin with.
using System; using static System.Console; 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. } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
