FileDocCategorySizeDatePackage
Room.javaAPI DocExample698Sun Oct 28 09:17:22 GMT 2001myprojects.compareobjects

Room

public class Room extends Object

Fields Summary
private double
width
private double
depth
Constructors Summary
Methods Summary
public booleancompareSize(myprojects.compareobjects.Room roomIn)

		if((roomIn.getWidth()*roomIn.getDepth()) == width*depth) {
			// the same size, return true
			return true;
		} else {
			// Not the same size, return false
			return false;
		}
	
public doublegetDepth()

		// ditto for the depth
		return depth;
	
public doublegetWidth()

		// Accessor method to return the width
		return width;
	
public voidsetSize(double width, double depth)

		this.width = width;
		this.depth = depth;
		System.out.println("Setting the size of room to "+width+" "+depth);