Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

INSTRUCTIONS #6. Your science teacher has asked you to create an application tha

ID: 3913396 • Letter: I

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 application's interface should allow the user to enter the person's 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 file's name to Main Form.vb. Change the form's 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

Explanation / Answer

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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote