+1-415-670-9189
info@expertsmind.com
Write a program that reads an unspecified number
Course:- Visual Basic Programming
Reference No.:- EM132321057




Assignment Help
Expertsmind Rated 4.9 / 5 based on 47215 reviews.
Review Site
Assignment Help >> Visual Basic Programming

Assignment -

1. Bubble Sort

Create a generic bubble sort method. Refer to the file attached to the Blackboard assignment for this test, BubbleSortTest.cs, for an implementation of a non-generic Bubble Sort. Your method must be able to sort an array of any type of objects that implements the IComparable interface. The method is also to have a bool parameter called isAscending to indicate whether the array is to be sorted in ascending or descending order. Create a main method that creates an array of 50 integers. The integers are to be randomly selected, ranging from 0 to 99, inclusive. Also create an array of 50 strings. The strings are to be randomly generated, consisting of only lowercase letters, and ranging in a randomly selected length from 1 to 10 characters. Display the contents of both arrays before sorting, after sorting in ascending order, and after sorting in descending order.

2. Count Numbers

Write a program that reads an unspecified number of integers and prints the numbers and their count of occurrences sorted in ascending order first by number, and then by the number of times they occur. The input ends when the input is 0. For example, if you entered 2 3 3 5 4 -3 3 3 2 0, the output would look something like:

Number

Count

-3

1

4

1

5

1

2

2

3

4

The program should be implemented using a SortedDictionary to track occurrences, and use LINQ to sort the results. The LINQ used may either be SQL or method syntax.

3. Sorting Letters and Removing Duplicates

Write a console app that inserts 30 random letters (Upper and Lower case) into a List<char>.

Perform the following queries on the List and display your results:

1. Use LINQ to sort the List in ascending order.

2. Use LINQ to convert all of the letters in the List to upper case, filter the list so it only contains characters from M-Z, and sort the List in descending order.

3. Display the List in ascending order with duplicates removed.

4. Exercise

Follow the instructions in the textbook, also shown here.

(Guess the Number Game) Write a program that plays "guess the number" as follows: Your program chooses the number to be guessed by selecting an int at random in the range 1-1000. The program then displays the following text in a label: I have a number between 1 and 1000--can you guess my number? Please enter your first guess.

A TextBox should be used to input the guess. As each guess is input, the background color should change to red or blue. Red indicates that the user is getting "warmer," blue that the user is getting "colder." A Label should display either " Too High" or "Too Low," to help the user zero in on the correct answer. When the user guesses the correct answer, display "correct ! ' in a message box, change the Form 's background color to green and disable the TextBox Recall that a TextBox (like other controls) can be disabled by setting the control's Enabled property to false . Provide a Button that allows the user to play the game again. When the Button is clicked, generate a new random number, change the background to the default color and enable the TextBox.

Attachment:- Assignment Files.rar




Put your comment
 
Minimize


Ask Question & Get Answers from Experts
Browse some more (Visual Basic Programming) Materials
Create a sample splash screen for your application (a splash screen is a screen that runs at program startup). This screen should have the application name, your name, the d
List the common interface features seen in this applications versions of each of the following office applications installed on a computer. List installed version for all of
Provide a set and a get method for each instance variable. provide a method getInvoiceDetail that returns all the information(in the form of string) contained in the invoi
Validate that the data entered has the correct format and is within a reasonable range. Calculate and display the cost for operating a home appliance as soon as the data is en
The aim of the assessment is to develop a Visual Basic console application that performs a number of mathematical functions. The mathematics package will be menu driven, i.e.
Determine the output displayed when the button is clicked. Replace each phrase containing "Until" with an equivalent phrase containing "While", and vice versa. For instance,
Create a window application form on Visual basic 2012., that verifiers a customers personal identification number (PIN). A valid PIN is a seven-digit number that meets the f
Winner of a sales contest would input number of units sold by each sales person. Write down visual basic application which inputs series of 10 integers and finds and display