JAVA PRGRAM HELP????????

Nov 2nd, 2014
Sigchi4life
Category:
Programming
Price: $90 USD

Question description

(The Rectangle class ) Following the example of the Circle class  in Section 8.2, design a class  named  Rectangle to represent a rectangle. The class  contains: ■ Two double  data fields named  width and height that specify the width and height of the rectangle. The default  values  are 1 for both width and height. ■ A no-arg constructor  that creates a default  rectangle. ■ A constructor  that creates a rectangle with the specified width and height. ■ A method  named  getArea() that returns the area of this rectangle. A method  named  getPerimeter() that returns the perimeter. Draw the UML diagram for the class  and then implement the class . Write a test program  that creates two Rectangle objects —one with width 4 and height 40 and the other with width 3.5 and height 35.9. Display the width, height, area, and perimeter of each rectangle in this order.

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: UT Austin
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
darnay
Dec 6th, 2016
" The best tutor out there!!!! "
dontuwannaknow
Nov 27th, 2016
" Excellent work as always thanks so much "
SjSurvivor143
Nov 13th, 2016
" Thanks for the help. "
ddg82
Nov 4th, 2016
" Thanks, good work "
tinytim47
Oct 22nd, 2016
" Wow this is really good.... didn't expect it. Sweet!!!! "
jestin7
Oct 13th, 2016
" This tutor is great! "
mixedballz
Oct 8th, 2016
" excellent work as always thanks for the help "
lilmoe415
Sep 29th, 2016
" Thank you, Thank you, for top quality work, this is your guy!! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1824 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors