Write a program that reads an unspecified number

Assignment Help Visual Basic Programming
Reference no: EM132321057

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

Reference no: EM132321057

Questions Cloud

Problems using biometrics can present to society : Discuss the potential problems using biometrics can present to society, and in particular, what effect the loss of biometric records could have.
Determining the single-function device : A toaster is a single-function device, but a computer can be programmed to carry out different tasks.
Define differences in internal and external benchmarking : Explain the concept and value of benchmarking, and define the differences between internal and external benchmarking.
What role do end users play in incident reporting : What role do end users play in incident reporting? Should end users be encouraged to report suspicious occurrences? Why or why not?
Write a program that reads an unspecified number : CS 5110 Assignment - Write a program that reads an unspecified number of integers and prints the numbers
Protect organizational assets against malware : Why is it important to protect organizational assets against malware? What tools other than the ones provided by Microsoft can help fight against malware?
Evaluate two sets of 5 speed manual transmission gear ratio : Develop a new compact and small sedan with 5 speed manual transmission and 1200 cc 4 cylinder spark ignition engine.
Identify the agency or directorate legal missions : Identify the agency or directorate's legal missions, and from the reviewed strategic plan, Identify agency or directorate's legal missions. Identify the agency
Understanding flowcharts and pseudocode : How can I get better at understanding flowcharts and pseudocode?

Reviews

Write a Review

Visual Basic Programming Questions & Answers

  Create a visual basic .net application

Create a Visual Basic .NET Application - User Interface Elements - Add the missing txtAssessed and lblTax controls to the form.

  Calculate the gross pay of an employee based on the number

Write a program to take two numbers from user, divide them and return remainder - Write a program to take 3 numbers from the user convert to integer

  Describes the characteristics of the designed system

Describes the characteristics of the designed system - describes the characteristics of the designed system and well as how it will be important for the users at the company.

  Perform the character shift encryption and decryption

Referencing Project, instantiate an encryption class to perform the character shift encryption and decryption. Include clsSecurity.vb in your Project (see the Solution Explorer in the Visual Studio IDE)

  Populate both matrices with random integers

CS367 - Populate both matrices with random Integers. Allow the user to set the min and the max of these Integer values

  How to define a tester program to test the object

How to design and define class? How to create object? How to define a tester program to test the object? Develop a "" BankAccount "" windows form project, which will allow user to Enter amount of money to deposit, withdraw or move.

  Develop vb-net application that includes arrays and loops

Develop a VB.NET application that includes arrays, loops, and IF statements to do the following. Your output must also display the number of applicant(s) being interviewed.

  Create a program to determine johns gas bill

What are the inputs? How are they validated? What character keys are needed and what processing is required here

  Prepare a brief summary of the purpose of the organization

Identify the ICT personnel skills required to support the organisational unit as defined in the SLA that you prepared in Assessment. Prepare job descriptions

  Prepare a data management programme with visual basic

You need to prepare a data management programme with visual basic 2012 as front end and MySql as back end.

  Write a console application called daydreaming

Write a console application called DayDreaming that declares a minutes variable to represent time spent daydreaming on the job. Assign a value to that variable in your program then display the value in hours and minutes.

  Write a program to request a positive integer

Continue this process until the number equals 1. Then display the number of repetitions the program required - write a program to determine when the world's population was under 6 million.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd