Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java Help

nwaiters
nwaiters 


Design and implement a Java class to represent a 3-D geometric shape of your choice. The class should contain a constructor, appropriate data fields and methods to return the volume of the shape, and the surface area of the shape and any other methods that seem to make sense for you shape. Name your Java file Yournamehw4.java. Create a Java Test Application to construct your shape and demonstrate the successful call to its methods. Document in a word document the results of running your application. Attachments
Tags Clarifications

Answers

3d Geomteric Shape - JAVA

SW_wizard
SW_wizard 



Attached the source code and a word document with details and testcases Attachments
3dGeometricShape.zip (57 K) Download

Preview
two parameters public SaraJameshw4(double rad, double hght) { radius = rad; height = hght; } // Method to calculate volume of Cylinder public double cylVolume(){ double volume; volume = 3.14*Math.pow(radius, 2)*height; return volume; } // Method to

Screenshots
Purchase Answer

3D Geo Shape

mariobeka
mariobeka 



Attached you'll find the java classes for the 3d geometric shape and the result. Attachments
Result.docx (5 K) Download
Rectangle.java (1 K) Download Preview
super(); } public Rectangle(int length, int width, int height) { super(); this.length = length; this.width = width; this.height = height; } public int getAreaSurface(int h, int w, int l){ return 2*(w*h+l*w+l*h); } public int getVolume(int h, int

Yournamehw4.java (1 K) Download Preview
Rectangle's volume is "+shape2.getVolume(4, 2, 8)); System.out.print("\nSecond Rectangle's Surface area

Screenshots
Purchase Answer