Box3D
box3d.Box3D Class Reference

Classes

enum  Face
 

Public Member Functions

 Box3D (int[] corner, int[] size)
 Constructor for Box3D. More...
 
int [] getFrontTopLeftCorner ()
 returns the front top left corner tuple. More...
 
void setFrontTopLeftCorner (int[] newCorner)
 sets the front top left corner. More...
 
int [] getDimensions ()
 returns width, height and depth. More...
 
void setDimensions (int[] newSize)
 sets width, height and depth. More...
 
int [] getDimensionsOfFace (Face face)
 This function sets the dimensions of the given face. More...
 
int getAreaOfFace (Face face)
 This function calculates the area of the given face. More...
 
int getPerimeterOfFace (Face face)
 This function calculates the perimeter of the given face. More...
 
int getVolume ()
 This function calculates the volume of the rectangle. More...
 
int getSurfaceArea ()
 This function calculates the surface area for the rectangle. More...
 

Static Public Member Functions

static void main (String[] args)
 Example of the usage. More...
 

Constructor & Destructor Documentation

§ Box3D()

box3d.Box3D.Box3D ( int []  corner,
int []  size 
)

Constructor for Box3D.

Constructor accepts two parameters for the top left corner and size dimensions.

Parameters
corner(x,y,z) tuple for the top left corner.
size(w,h,d) tuple containing the width, height and depth.

Member Function Documentation

§ getAreaOfFace()

int box3d.Box3D.getAreaOfFace ( Face  face)

This function calculates the area of the given face.

Author
Mustafa Haddara
Parameters
faceFace of the box: FRONT or TOP or SIDE.
Returns
Area of the given face.
Date
1/10/2016

§ getDimensions()

int [] box3d.Box3D.getDimensions ( )

returns width, height and depth.

Returns
dimensions

§ getDimensionsOfFace()

int [] box3d.Box3D.getDimensionsOfFace ( Face  face)

This function sets the dimensions of the given face.

Author
Mustafa Haddara
Parameters
faceFace of the box: FRONT or TOP or SIDE.
Returns
dimension of the given face.
Date
1/10/2016

§ getFrontTopLeftCorner()

int [] box3d.Box3D.getFrontTopLeftCorner ( )

returns the front top left corner tuple.

Returns
frontTopLeftCorner

§ getPerimeterOfFace()

int box3d.Box3D.getPerimeterOfFace ( Face  face)

This function calculates the perimeter of the given face.

Author
Mustafa Haddara
Parameters
faceFace of the box: FRONT or TOP or SIDE.
Returns
Perimeter of the given face.
Date
1/10/2016

§ getSurfaceArea()

int box3d.Box3D.getSurfaceArea ( )

This function calculates the surface area for the rectangle.

Author
Mustafa Haddara
Returns
Surface area of the rectangle.
Date
1/10/2016

§ getVolume()

int box3d.Box3D.getVolume ( )

This function calculates the volume of the rectangle.

Author
Mustafa Haddara
Returns
Volume of the rectangle.
Date
1/10/2016

§ main()

static void box3d.Box3D.main ( String []  args)
static

Example of the usage.

Author
Mustafa Haddara
Date
1/10/2016

§ setDimensions()

void box3d.Box3D.setDimensions ( int []  newSize)

sets width, height and depth.

Parameters
newSizedimensions

§ setFrontTopLeftCorner()

void box3d.Box3D.setFrontTopLeftCorner ( int []  newCorner)

sets the front top left corner.

Parameters
newCornerFront top left corner coordinates.

The documentation for this class was generated from the following file: