Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java: Rectangle Class: 1. Design a class named RightRectangularPrism that extends Rectangle from lab 4 post Lab. This class shall contain: . One double

In Java:
image text in transcribed
Rectangle Class:
image text in transcribed
1. Design a class named RightRectangularPrism that extends Rectangle from lab 4 post Lab. This class shall contain: . One double data field named height that specify the height of the Right Rectangular Prism A no-arg constructor that creates a default Right Rectangular Prism. The default values is 1. A constructor that creates a Right Rectangular Prism with the specified length and width and height. A method named calculateVolumethat returns the volume of this Right Rectangular Prism I A method named calculate SurfaceArea() that returns the surface area. 2. Write a Manager class that creates two Right Rectangular Prism objects-one with length 4, width 5 and height 40 and the other with length 3.5, width 73 and height 35.9. The Manger class shall print the volume and surface area of both Right Rectangular Prism objects. public class Rectangle double width= 40; double length - 4; Rectangle() { width= 40; length= 4; } Rectangle (double w, double 1) { width= w; length= 1; } double getArea() { return width*length; } double getPerimeter() { return 2*(width+length); } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

a donor to the university or school?

Answered: 1 week ago

Question

Lo6 Identify several management development methods.

Answered: 1 week ago