Hi all and excuse me from the start of this post for any kind of solecism (grammar mistakes). I chose this place to post my problem in Java Programming, because 1st of all i am kind of new in the use of Java , 2nd hard to understand , and hoping that someone could help me by resolving a problem in creating a small program with abstract classes, classes etc, having this title :"Calculate the total area,base area,lateral area,volume of a cube and sphere." The program must have a abstract class that can be implemented obvious in those 2 classes, and in the main class i must call those methods (in this case those to abstract methods are CalculateArea(); and CalculateVolume();). This was easy for me at the start, but the hard parts are : must have those 3D points (x,y,z) that can show me the coordinates of a point(doesn't matter where is that point), and after, i need to set another point (still with this 3D coordinates), so i can calculate the distance from this 2 points, and then i will consider this segment is equal with those 12 sides of a cube.At this same stage i need to find and the center of gravity. Hope you understand what i am trying to say. The same thing i must do for the sphere, only there the center of gravity is exactly the start point from where i must trace the radius. Don't how to start and how to find the easy way to create this cube and sphere and then use all the formulas to calculate this 3D Forms. If someone knows a easy way to make this program, it is worth of try, but i will give all my ambition to learn by using a quicker solution in making a program, by finding the logic of this contructors. Please if someone could help me, i will very thankful.
Best regards Byemi.
Have a nice day.