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
Get step-by-step solutions from verified subject matter experts
