View the step-by-step solution to:

I was wondering if someone could look at a visual basic assignment that I am trying to do and see what I am doing wrong?

I was wondering if someone could look at a visual basic assignment that I am trying to do and see what I am doing wrong? I am sending the instructions and an example. I have commented some things out because they told me that everything was a right triangle. Now what I have tells me that nothing is a right triangle. I don't know if I have the code wrong or just the math. If you could tell me that much I would really appreciate it. I need someone to teach me Visual Basic so I can understand it. I have written an email to the "contact us" tab asking if this is something that you all do. I don't mind paying at all, I just need someone to explain it to me in a way that I can learn it. My class moves way too fast for me to get it. Thank you for any help that you can give me.
Example right triangle.exe
Right Triangle.docx

Assignment 2 – Right Triangle
In a right triangle, the square of the length of the longest side is equal to the sum of
the squares of the lengths of the other two sides. Write and test a Visual Basic
program to complete the following project, determining whether a given triangle is
“right” or not based on the lengths of its sides.
GUI
Place three textboxes on a form, along with at least one label for the user to enter
the lengths of the sides of a triangle
Place a label beneath the three textboxes, centered horizontally on the form. Leave
the label’s text property empty.
Place a button beneath all the textboxes with the text “Is this a right triangle?”.
Size the button to display all the text on one line.
Place a single button at the bottom of the form, with the text “I don’t know yet”.
Code
Declare variables to hold the lengths of the three sides of a triangle. All should be
doubles.
Create an event handler for the click event in the first button. All the following
activities must take place within this event handler.
Reset the last button to its default appearance and text.
Input three values representing the lengths of three sides of a triangle in inches
from the three textboxes. Validate each of these values. If any input value is less
than 0.1 inches, clear the corresponding textbox and set the text in the label to
indicate that the offending value is too small.
Identify the longest side as the hypotenuse. Do no assume or require the user to
identify the longest side. Do this in code.
Calculate the expected length of the hypotenuse based on the lengths of the 2
shorter sides.
Compare the expected length of the hypotenuse to the length input by the user.
If the two lengths are the same, declare the triangle to be “Right”, display the
word “Right” in the last button and set its background color to green. Otherwise,
declare the triangle to be “Not Right”, display the words “Not Right” in the last
button and set its background color to red.

Sheila_Younkin_HW22.zip - Preview not available
Sign up to view the entire interaction

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question