Login|Contact Us
Question and Answer

Programming

Ask a Programming Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

http://wikisend.com/download/796026/Assignment_9(1).pdf Using

 
jatechexpert's Avatar
  • Answered by:jatechexpert
  • Computer Software Engineer
  • Positive Feedback: 96.7 %
  • Accepted Answers: 1288
Verified Expert
in Programming

Recent Feedback

Positive
Great Help! Will use again!
Positive
Type your review here...
Positive
great job
Positive
Awesome, thank you! I really appreciate your quick response and the solution.
Positive
Work was excellent and will recommend to everyone who needs programming help.
Positive
nice job
Positive
Great! Thank you!
Positive
Fast response and quality work
Positive
very helpful and did exactly what was asked for
Positive
Thanks

Customer Question

http://wikisend.com/download/796026/Assignment_9(1).pdf

Using the RectangleProgram, GUI version, program from our class discussion as a starting point you are to make the following modifications:

Modify this program so that in addition to calculating the area and perimeter of a rectangle, it additionally calculates the length of the diagonal between the corners.

Length of diagonal = the square root[ width2 + height2]

Hint: use methods from the Math class

Since your program will be calculating the diagonal, it also needs to display that calculated value. Meaning add the necessary gui components for displaying the calculated length of the diagonal.

Using the inner class CalculateButtonHandler as your example, add additional buttons and event handlers as follows:

Create an Area button which when clicked just calculates the area for the rectangle and displays the results in the area JtextField.

Create an Perimeter button which when clicked just calculates the perimeter for the rectangle and displays the results in the perimeter JtextField.

Create an Diagonal button which when clicked just calculates the length of the diagonal for the rectangle and displays the results in the diagonal JtextField.

Create a Clear button which when clicked resets (i.e. erases) all the displayed JtextField values.

Additionally, you are to write 3 user-defined methods as part of the outer class as follows:

a method which calculates and returns the area of the rectangle.

a method which calculates and returns the perimeter of the rectangle.

a method which calculates and returns the length of the diagonal of the rectangle.

Now that your program has separate methods for calculating the area, perimeter, and diagonal, change each of your xxxButtonHandler inner classes to call these methods for these values

rather than calculating these values within the respective xxxButtonHandler.




Using the RectangleProgram, GUI version, program from our class discussion as a starting point you are to make the following modifications:

Modify this program so that in addition to calculating the area and perimeter of a rectangle, it additionally calculates the length of the diagonal between the corners.

Length of diagonal = the square root[ width2 + height2]

Hint: use methods from the Math class

Since your program will be calculating the diagonal, it also needs to display that calculated value. Meaning add the necessary gui components for displaying the calculated length of the diagonal.

Using the inner class CalculateButtonHandler as your example, add additional buttons and event handlers as follows:

Create an Area button which when clicked just calculates the area for the rectangle and displays the results in the area JtextField.

Create an Perimeter button which when clicked just calculates the perimeter for the rectangle and displays the results in the perimeter JtextField.

Create an Diagonal button which when clicked just calculates the length of the diagonal for the rectangle and displays the results in the diagonal JtextField.

Create a Clear button which when clicked resets (i.e. erases) all the displayed JtextField values.

Additionally, you are to write 3 user-defined methods as part of the outer class as follows:

a method which calculates and returns the area of the rectangle.

a method which calculates and returns the perimeter of the rectangle.

a method which calculates and returns the length of the diagonal of the rectangle.

Now that your program has separate methods for calculating the area, perimeter, and diagonal, change each of your xxxButtonHandler inner classes to call these methods for these values

rather than calculating these values within the respective xxxButtonHandler.

 

Optional Information:
Computer OS: Windows 7
Browser: Firefox
Programming Language: java
Compiler: textpad

Submitted: 418 days and 8 hours ago.
Category: Programming
Value: $45
Status: CLOSED
Picture
Expert:  jatechexpert replied418 days and 7 hours ago.

hi

thanks for requesting me

when you need this

Customer replied418 days and 7 hours ago.

The 9th of April

Picture
Expert:  jatechexpert replied418 days and 7 hours ago.

hi

ok i will do this

Customer replied418 days and 7 hours ago.

thanks alot, i accidently pasted two instructions on the program, u may just ignore the 2nd one. If the link doesn't work i can send it as an attachment

Picture
Expert:  jatechexpert replied418 days and 7 hours ago.

hi

is this http://wikisend.com/download/796026/Assignment_9(1).pdf

correct

send the correct one you need

Customer replied418 days and 7 hours ago.

Yes, thats correct

Picture
Expert:  jatechexpert replied418 days and 7 hours ago.

hi

ok

Customer replied410 days and 3 hours ago.

Relist: No answer yet.

Picture
Expert:  jatechexpert replied410 days and 3 hours ago.

hi

you need it 9th April , right

Customer replied410 days and 2 hours ago.

yeah, have u gotten a start as yet?

Customer replied410 days and 1 hours ago.

Relist: Incomplete answer.

Picture
Expert:  jatechexpert replied409 days and 20 hours ago.

hi
i will send it soon , within some hours

Picture
Expert:  jatechexpert replied409 days and 13 hours ago.

hi


here is the answer link below

http://wikisend.com/download/138666/rectGUI.java]rectGUI.java

hope this helps

Customer replied409 days and 9 hours ago.

program doesn't run

Accepted Answer

Picture
Expert:  jatechexpert replied409 days and 9 hours ago.

hi

here run and got the output

i am sending the output that i got

http://wikisend.com/download/602764/screenshotRectangle.doc]screenshotRectangle.doc

check it

Expert TypeComputer Software Engineer
Category: Programming
Pos. Feedback: 96.7 %
Accepts: 1288
Answered: 4/9/2012

Experience: Master of Computer Application plus 5+ year experience in Software development

Ask this Expert a Question >
Customer replied409 days and 9 hours ago.

Thanks anyways

Picture
Expert:  jatechexpert replied409 days and 9 hours ago.

hi

ok then see you

 
Tweet

3 Programmers are Online Right Now

Ask Your Question Now
Programming Questions Date Submitted
For The Doctor ONLY - Please fix the Doe Valley town Meeting 5/18/2013
Scenario: 5/17/2013
I need help with my website, I put in the Infolink ad code 5/17/2013
Microsoft Visual Basic 2010 Programming Exercise 5/16/2013
I am programming and auto reply macro and Outlook 10 that is 5/16/2013
Hello. I really need help with C Programming. I need a program 5/15/2013
I need to make the submit button bigger 5/15/2013
"For Jatechexpert" Part 1Programming Exercise 2—Calories 5/14/2013
INSTRUCTIONS: VERY IMPORTANT, THIS IS TO BE DONE USING MICROSOFT 5/13/2013
I have a JavaScript programming question. I have a form and 5/13/2013
RSS
Next 10 >
Ask A Programmer
Type Your Programming Question Here...
characters left:

Top Programming Experts

See More Programmers

JustAnswer in the News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More

Ask a Programmer

Get a Professional Answer. 100% Satisfaction Guaranteed.
180 Programmers are Online Now
Type Your Programming Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us | Our Network
© 2003-2013 JustAnswer LLC
  • Pearl.com
  • JustAnswer UK
  • JustAnswer Germany
  • JustAnswer Spanish
  • JustAnswer Japan