Create a two & three -Dimensional Shapes Mini-system that consists of 6 shapes, Square, Rectangle, Triangle, Circle, Cube and Sphere and then calculate area, perimeter, volume , or draw the shape. After that, it does the following tasks:
1. The code ask the user to enter the required values should be in the main method.
2. All input values are must be positive.
3. The Triangle must a Right Isosceles (two sides are equal).
4. For each shape, the code calculates either
Perimeter for Square, Rectangle, and Triangle
Diameter, and Circumference for Circle.
Volume for Cube and Sphere.
The code draw using asterisks "*" and spaces for each shape except for circle, cube, and sphere only show the following message: “Drawing a circle in the text mode without a Drawing library is too hard to do!” .
5. The project' main method should provide a menu and sub menu that will allow the users to choose one of the six shapes shown below. The program exists when the user selects option 7. For each 2-D shapes, there is a submenu for area, perimeter, and draw. For each 3-D shapes, there is a submenu for area, volume, and draw.
All 4 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.