
// a class that models a real world bucket 

class Bucket {
	// fields hold data that can be used anywhere in
	// this class

	/* general form of a field

	<modifiers list> type identifier <= value>;
	
	*/

	double height = 0;
	double radius = 0;


	// a constructor is a block of code that is 
	// executed when a new instance of the class is 
	// created.

	// If no constructor is declared, the "general"  
	// contructor is used.

	// the name of a constructor is always the same
	// as the name of the class

	Bucket() {
		System.out.println("in constructor");
		System.out.println(this);

		height = 1;
		radius = 1;
	}

	Bucket(int h, int r) {
		height = h;
		radius = r;
	}
	
	double getHeight() {
		return this.height;
	}

	static String getName() {
		//System.out.println(this);  // cannot use this - static
		return "Bucket";
	}

	

}
