Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Science Project Ideas In Health Care Volume 1

Authors: Zemelak Goraga

1st Edition

B0CPX2RWPF, 979-8223791072

More Books

Students also viewed these Databases questions

Question

=+32-4 Discuss how emotions affect our memory processing.

Answered: 1 week ago