Question

INSTRUCTIONS #6. Your science teacher has asked you to create an application that displays how much a person would weigh on the following planets: Venus, Mars, and Jupiter. The applications interface should allow the user to enter the persons weight on Earth. Perform the steps involved in creating an OO application. (See the Note at the beginning of the Exercises section.) Include a button for clearing the screen. . Create an application, using the following names for the solution and project, respectively Planet Solution and Planet Project. Save the application in the VB20151Chap02 folder. Change the form files name to Main Form.vb. Change the forms name to frmMain. Code the application using the Val and Format functions. One pound on Earth is equal to 0.91, 0.38, and 2.53 pounds on Venus, Mars, and Jupiter, respectively. Add appropriate comments in the General Declarations section and in the coded procedures. Test the application using both valid and invalid data. Planet Calculator Screen Note . Your name should appear in a label on the form and in the code as a comment Change the name of the appropriate controls Compare the GUI to given .exe Check for correct output ?mrm -Activate Windows GseneaGo to Settinas to activate Windows 4 ENG 7/14/18
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dim message, title, defaultValue As String

Dim myValue As Object

' Set prompt.

message = "Enter weight on earth"

' Set title.

title = "Weights on planets"

defaultValue = "10" ' Set default value.

weightOnEarth = InputBox(message, title, defaultValue)

Private Sub clearButton_Click() Handles clearButton.Click

' Clear the weight.

weightOnEarth.setText("");

End Sub

Private Sub cmdLogin_Click()

   Double earth = weightOnEarth.getText();

   Double venus = earth*0.91;

   Double mars = 0.38 * earth;

   Double Jupiter = 2.53*earth;

   ResultTxt.setText("Venus: "+venus+" Mars: "+mars+" Jupiter: "+Jupiter);

End Sub

Add a comment
Know the answer?
Add Answer to:
INSTRUCTIONS #6. Your science teacher has asked you to create an application that displays how much...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PLEASE USE VISUAL BASIC* BY VISUAL STUDIO. Visual Basic INTERMEDIATE Create a Windows Forms application. Use...

    PLEASE USE VISUAL BASIC* BY VISUAL STUDIO. Visual Basic INTERMEDIATE Create a Windows Forms application. Use the following names for the project and solution, respectively: Chopkins Project and Chopkins Solution. Save the application in the VB2017\Chap03 folder. Change the form file's name to Main Form.vb. Change the form's name to frmMain. Create the interface shown in Figure 3-37. The interface contains six labels, three text boxes, and two buttons. The application calculates and displays the total number of packs ordered...

  • 1. Describe how a Windows Store app is displayed differently from a Windows application. 2. Instead...

    1. Describe how a Windows Store app is displayed differently from a Windows application. 2. Instead of icons, Windows Store apps are launched by tapping or clicking _________. 3. What is the file extension of an app package in the Windows Store? 4. What does touch-first mean when using Windows Store apps? 5. How many touch points does a Windows 8 device typically have? 6. Windows Store apps can be written in which programming languages? 7. What does XAML stand...

  • Lab 6 Instructions Objectives: • Executing and experimenting with programs that handle array related topics such...

    Lab 6 Instructions Objectives: • Executing and experimenting with programs that handle array related topics such as declaration, initialization, storing, retrieving, and processing elements. • Effectively manipulating and using ArrayList objects. • Becoming familiar with the use of arrays as method arguments and how array elements are passed to and returned from the called method. • Mastering the use of various debugging tools available on the Eclipse IDU. Important: EVERY one of the following Activities MUST be in a separate...

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT