Question: JAVA 1. Create a new class called Cube inside package ca.bcit.comp1510.lab05: a. Include a Javadoc comment at the top of the class. The Javadoc comment

JAVA
1. Create a new class called Cube inside package ca.bcit.comp1510.lab05: a. Include a Javadoc comment at the top of the class. The Javadoc comment should contain: i. The name of the class and a (very) short description ii. An @author tag followed by your name iii. An @version tag followed by the version number. b. Do not include a main method inside the class definition. We will create our main method in a separate Driver class. 2. A Cube should have instance variables that represent the following: a. X-coordinate b. Y-coordinate c. Z-coordinate d. Edge length. 3. The Cube class needs a constructor which accepts a parameter for each of these four attributes and assigns the value to the respective instance variable. 4. Create an accessor and a mutator for each instance variable. 5. Create a toString() method which returns a String composed of the concatenation of the information in the Cube. 6. Create a method that returns the surface area of the Cube. The formula for the surface area A of a cube of edge length a=6a2. 7. Create a method that returns the volume of the Cube. The formula for the volume V of a Cube of edge length a=a3. 8. Create a method that returns the face diagonal of the Cube. The formula for the face diagonal F of a Cube of edge length a=2a. 9. Create a method that returns the space diagonal of the Cube. The formula for the space diagonal S of a Cube of edge length a=3a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
