The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 1 Day Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
This is for visual basic. I need everything in order to make it work.Â
Distance Calculator
If you know a vehicles speed and the amount of time it has traveled, you can calculate the distance it has traveled as follows:
Distance = Speed * Time
For example, if a train travels 40 miles per hour for 3 hours, the distance traveled is 120 miles. Create an application with a form similar to the one shown in figure 5-47. When the user clicks the Calculate button, the application should display an input box asking the user for the speed of the vehicle in miles-per-hour, followed by another input box asking for the amount of time, in hours, that the vehicle has traveled. Then it should use a loop to display in a list box the distance the vehicle has traveled for each hour of that time period. Figure 5-48 shows an example of what the application's form should look like.Â
Use the following test data to determine if the application is calculating properly.Â
Vehicle Speed: 60
Hours Traveled: 7
Hours        Distance traveled
1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 60
2Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 120
3Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 180
4Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 240
5Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 300
6Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 360
7Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 420
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly