Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING C# PROGRAMMING Arrays are considered to be fundamental data structures for storing a collection of items, each one being identified by its index. The

USING C# PROGRAMMING

Arrays are considered to be fundamental data structures for storing a collection of items, each one being identified by its index. The items in these collections can be stored in any given order. Arrays can be sorted using many different types of sorting algorithms that utilize various logic and control structures (loops). You are required to implement a basic console application that allows a user to sort an integer array using either a bubble sorting or selection sort algorithm approach. Your application should also allow the user to specify the sorting order (ascending or descending); hint, this can be done by specifying a parameter flag for your sort function.

Key Requirements -

Allow the user to enter 10 random integers

- Exception handling to ensure that unwanted inputs are caught (letters etc)

- Sort the array elements (in either Ascending or descending)

- Display both the unsorted list and sorted list back to the user

NB: Include your name as comments at the beginning of your source code for the main program.cs file

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

Intermediate Accounting

Authors: Loren A Nikolai, D. Bazley and Jefferson P. Jones

10th Edition

324300980, 978-0324300987

More Books

Students also viewed these Databases questions

Question

How is the NDAA used to shape defense policies indirectly?

Answered: 1 week ago

Question

Who was Fritz Haber and what did he do?

Answered: 1 week ago

Question

Draw the basics of the hydrological cycle

Answered: 1 week ago