Project #61458 - some basic computer science exercises, visual basic

must be use Visual Studio to do and must follow the book's rules which is named "Visual Basic 2012".

1, Assingment 2.

You have to name the project as "Assignment2".

A Guessing Game

Instructions: GuessingGame- directions.pdf预览文档在新窗口中查看

Sample program outline: GuessingGame Outline.pdf预览文档在新窗口中查看

Sample Executable: GuessingGame2.exe在新窗口中查看

Note: The directions refer to the Random class, but I did not tell you how to use it.  See Section 5.7 for an explanation on how to generate random numbers.

The directions also give you a sample Header Block, but I prefer you use the one I described in the Announcement, Header Blocks.

You will not be required to turn in a flowchart for this project, but I suggest you draw one.  It will help clarify the logic for you. 


If you are having trouble testing your guessing game - maybe a problem with the random number generator, you might try displaying the generated number in a temporary MessageBox or label.  That will help you control your testing and see if your hints (a little too high, much too high, etc.) are working properly.


2, Exercise 10

You have to name the project as Exercise 10

For this exercise, you will need to know how to use Input Boxes and ListBoxes.  These controls are described in sections 5.1 and 5.2.

Create a form containing a textbox, a button, an output label, and a list box.

Instruct user to enter beginning balance into the textbox.  When the "Compute" button is clicked, an InputBox will appear instructing user to enter a debit amount or to hit "Enter" to quit.  

In your program define a variable of type Double for the total.

After the user enters the beginning balance, the program should edit the input for numerics.  If the input is numeric, then an Input Box will be sent asking for the first debit.

The program will then use a Do Loop to have the user enter more debits. 

As the debits are entered, the amount will be subtracted from the total.  When the user enters a 

null value (hits enter key with no input), the current account balance will appear in the list box.

Sample Executable: Ch5-BankAccountNoRunBal.exe在新窗口中查看 

As an alternative, display the running balance next to each debit.

Sample alternative executable: Ch5-BankAccount.exe在新窗口中查看



3, Exercise 11(Chap 5 ForLoops)

you have to name the project as "Exercise 11"

Build a form with a TextBox and a ListBox in addition to your usual buttons and static labels.

Instruct the user to enter an integer representing the radius of a circle into the TextBox.

Edit the input to ensure it is numeric.

If it is numeric, call a routine to calculate the area of a circle for that radius - then for the initial radius plus 1, plus 2, etc. up to plus 10.  Output the results in the ListBox with a sentence such as:

"A circle with a radius of x has an area of y"


Sample Program:ForNextLoop.exe在新窗口中查看


4, Exercise13

you have to name the roject as "Exericse13"

Build a form containing the 3 usual buttons (Start, Clear, Exit), ID Label, and Output Label.

For the Start Button Click Handler, define an Integer Array containing 5 elements.

Generate 5 random numbers with values 1 to 6, and place each number in the array.

Then traverse the array and output the 5 numbers to the label.

On the next line of the label, output the total.

Hint: you will want to save your numbers and the total in a String and then output the whole string to a label.  Otherwise, you will be overlaying the contents of the label each time you add data to it.

Sample execution: Ch8Exercise1.exe在新窗口中查看





5,Exercise 14

Pick 5 cars - any that you like.

Create a String array containing the names of the cars.

Go to the website

Look up the combined gas mileage for each car and the price range.  For price, just pick a number somewhere  in the middle.

Create 2 parallel arrays containing those values (use an Integer array for the mileage - maybe Double for the price).   

Code a For..Next loop to output all 3 values for each car to a list box.

Example: The 2015 Toyota Prius has a combined gas mileage of 50 mpg. The price is $28000.00

Find the highest gas mileage and display in a MessageBox.  The technique for this is described in section 8.2 (p.486) Finding the Highest and Lowest Values in an Integer array.  It is tricky to also display the car name, so it is not required, but  makes the information more useful. 


6,Assignment 3

Board Game: This is an INDIVIDUAL project.  Sorry for the earlier message.

Instructions: CandyLand.pdf预览文档在新窗口中查看

A starter project is provided.  This contains the array of labels that I used in my Candy Land game along with code to place them around the edges of the Form.  Use this as you wish.  I will show you some of the games from last quarter if you would like some ideas.

Starter project: CandyLand Starter.zip在新窗口中查看

Sample executable:CandyLand.exe在新窗口中查看

Be sure to put all names in the header block and on the form (unless it totally destroys your design).

More help for CandyLand: Help with Candy Land.pdf


Assignment 2 and Assignment 3 which are no.2, no.6 both are need test plan and data dictionary.

send the whole file to me

Subject Computer
Due By (Pacific Time) 03/19/2015 11:59 pm
Report DMCA

Chat Now!

out of 1971 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 1164 reviews

Chat Now!

out of 721 reviews

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 680 reviews
All Rights Reserved. Copyright by - Copyright Policy