Add an isACube() method to the RectangularPrism class.

What will be an ideal response?

```
Solution is part of Instructor’s implementation of RectangularPrism.

/**
* Determine if this RectangularPrism is a cube.
* @return boolean true if this RectangularPrism is a cube.
*/
public boolean isACube()
{
return this.depth == this.getHeight() && this.depth == this.getLength();
}

```

Computer Science & Information Technology

You might also like to view...

____ display subsets of data from the tables in response to a command that asks a question.

A. Forms B. Queries C. Switchboards D. Records

Computer Science & Information Technology

Answer the following statements true (T) or false (F)

1. Consider the class and struct definitions below. ``` struct myStruct { int i; double d; }; class myClass { int i; double d; }; myStruct a; a.i = 3; myClass b; b.i = 3; ``` 2. The concept of class is central to Object Oriented Programming. 3. A class type cannot be used in some ways that a built-in type can be used 4. In defining a member function whose declaration is in a class, you use the dot operator to specify that the member function being defined belongs in the class, as ``` class foo { public: // other members void output( ); // other members }; void foo.output( ) { /* whatever */ } ```

Computer Science & Information Technology