# Visual basic programming help!

May 3, 2011 at 19:23:19
Specs: Windows 7
 Write a program to provide information on the height of a ball thrown straight up into the air. The program should request the initial height, h feet, and the initial velocity,v feet per second, as input. The four options to be provided by buttons are as follows: (3) Determine the maximum height of the ball. Note: The ball will reach its maximum height after v/32 seconds. (b) Determine approximately when the ball will hit the ground. Hint: Calculate the height after every . 1 second and observe when the height is no longer a positive number. (c) Display a table showing the height of the ball every quarter second for five seconds or until it hits the ground. (d) Quit. The formula for the height of the ball after t seconds, h + v*t — 16*t*t shouldbe specified in a user-defined function. (Test the program with v = 148 and h = 0. This velocity is approximately the top speed clocked for a ball thrown by a proffesional baseball pitcher.It is homework help. I honestly do not know where to begin after designing the form. Any help would be great. I figured I would try and get some sort of help if someone was bored and willing. Thanks!

See More: Visual basic programming help!

#1
May 4, 2011 at 14:26:44
 I'm bored but I'm not that bored.Design the code to do the calculations first then think about how you are going to display the output. You have all the information you need, all you need to do is to apply a little logic and thought. That is what programming homework is meant to do, teach you how to think, not how to ask questions on an on-line forum. If you are still stuck then it's back to your tutor. I take it you do know how to programme a While/Wend loop.Stuart

Report •

#2
May 4, 2011 at 17:07:23
 I have the correct equations set and working. The part that I am stuck on is how to format the output neatly into two columns in the listbox. Any ideas??

Report •

#3
May 4, 2011 at 17:21:37
 It is awkward to format two columns in a list box. You would be better using a two column grid control or two separate but linked list boxes. A two column grid control is by far the easiest.Stuart

Report •

Related Solutions

#4
May 4, 2011 at 17:35:09
 Alright. Also, what would be the easiest way to add the solution to the grid control after each loop until the loop ends?

Report •

#5
May 4, 2011 at 18:24:01
 Use the Grid control Additem function with an Index counter.Stuart

Report •