Question: Create Java program: -Implement the 4classes given below along with a main class and test every method in each class -variable names should be descriptive.

Create Java program:

-Implement the 4classes given below along with a main class and test every method in each class

-variable names

should be descriptive.

For multi-word names, use _(underscore) between words, or capitalize the first letter of the succeeding words.However, both methods shouldn't be mixed together in the same program.

Class 1

Name: Triangle

Data members: 3 points

Methods: constructor, setTriangle, getArea, getPerimeter

Class 2

Name: Cylinder

Data members: radius, height

Methods: constructor, setCylinder, getVolume, getSurfaceArea

Class 3

Name: RegularTetrahedron

Data members: edgeLength

Methods: constructor, setRegularTetrahedron, getVolume, getSurfaceArea

Class 4

Name: RectangularCuboid

Data members: length, depth, height

Methods: constructor, setRectangularCuboid, getVolume, getSurfaceArea

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!