Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

namespace HighScoreTable { class Program { static void Main(string[] args) { // TODO: Ask the user how many high scores they want. // Then read

namespace HighScoreTable

{

class Program

{

static void Main(string[] args)

{

// TODO: Ask the user how many high scores they want.

// Then read in their input.

//

// ====> Support error checking (input validation).

//

// ====> The user should only be able to input a positive

// integer value (greater than 0).

// You may use Utility.ReadInt() which returns an int

// and Utility.IsReadGood() which returns a bool to

// indicate if the last read (ReadInt) was successful

// TODO: Define an array of ints, which will hold the high scores.

// Make the array the exact size indicated by the user above.

// TODO: Ask the user for each high score, and read in their inputs.

// Make sure to read in as many high scores are in the array.

// If the high score array is size 5, then read in 5 inputs.

// You DO NOT NEED to support error checking for each score;

// assume each input will be an integer.

// TODO: Uncomment the following lines

//Console.WriteLine();

//Console.WriteLine("High Scores - Unsorted");

// TODO: Call **your** PrintArray method (which you must write below)

// passing the array of high scores.

// TODO: Call the SortArrayHighToLow method (already written below so

// don'tattempt to change/re-write it). Pass the array of high

// scores, to sort them.

// TODO: Uncomment the following lines

//Console.WriteLine();

//Console.WriteLine("High Scores - Sorted");

// TODO: Call **your** PrintArray method (which you must write below)

// passing the array of high scores.

//Console.SetCursorPosition(0, Console.WindowHeight - 1);

Console.Write(" Press any key to exit . . .");

Console.ReadKey();

}

// TODO: Write a static method called PrintArray that accepts

// a single int array parameter, and does not return

// anything.

// The function will loop through the array and print out

// each int on its own line.

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_2

Step: 3

blur-text-image_3

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

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions

Question

4. What sales experience have you had?

Answered: 1 week ago