Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new project called PreLab09 with two separate classes called TestCylinder and TestRectangle. The TestRectangle.java file contains the TestRectangle class which includes the main

Create a new project called PreLab09 with two separate classes called TestCylinder and TestRectangle. The TestRectangle.java file contains the TestRectangle class which includes the main method, and another class called SimpleRectangle with instance variables for length and width and two constructors (one with arguments, one with no arguments), and instance methods that return the area, perimeter, and diagonal for rectangles. The TestCylinder.java file contains the TestCylinder class which includes the main method, and another class called SimpleCylinder with instance variables for radius and height, and two constructors (one with arguments, one with no arguments), and instance methods that get the surface area and get the volume for cylinders. Use length =10 and width=20 for the rectangle, and radius =10 and height=30 for the cylinder. You can right click on eachs source code and select run file to test each file. image text in transcribed
image text in transcribed
PreLab09 PreLab09 with two separate classes called TestCylinder and TestBectangle The folder structure looks as follows: PreLab09- NetBeans IDE 8.0.2 File Edit View Navigate Source Ref Projects X Files PreLabo9 eSource Padages e prelab09 TestCyinder java TestRectangle.java a B Libraries The TestRectangle java file contains the TestRectangle class which includes the main method, and another class called SimpleRectangle with instance variables for length and width and two constructors (one with arguments, one with no arguments), and instance methods that return the area, perimeter, and diagonal for rectangles. The TestCylinder java file contains the TestCylinder class which includes the main method, and another class called SimpleCylinder with instance variables for radius and height, and two constructors (one with arguments, one with no arguments), and instance methods that get the surface area and get the volume for cylinders. Use length- 10 and width- 20 for the rectangle and radius 10 and height = 30 for the cylinder. You can right-click on each's source code and select Run file to test each file. Zip the folder, calling it "Your Name PreLab09.zip" and send it to me as an attachment in a Blackboard message. Use the sample below to model your solution. Rectangle: Area-Length 1st cylinde ri surface Area-2-(n,r,L.: ( 2-r * height); Volume (2 Length)(2Width): Diagonai-ength length)+(widch width) ( . r. height zun

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

Students also viewed these Databases questions

Question

=+2 Is the decision sustainable in the long run?

Answered: 1 week ago

Question

=+1 Is the decision fair to employees?

Answered: 1 week ago