For this course, for most assignments, you will be submitting source files (i.e. ".java").

These files must be plain text files.

You may use any editor (as long as it produces plain text files).

When the grader looks at a ".java" file (like the example below), they will not be able to tell what editor you used (Notepad++, TextPad, Brackets, Eclipse, etc). That's a primary purpose of a plain text file -- it can be shared between Windows, unix, MAC -- and any plain text editor can open it up (i.e., it's portable).

There are code editor suggestions in this chapter -- but it is coder's choice.

public class SmartInteger {

	private int n;

	/** Returns new SmartInteger on <aNumber> */
	public SmartInteger(int aNumber) {
		this.n = aNumber;
	}

	/** Returns friendly string of this object */
	public String toString() {
		return "n: " + this.n;
	}

	/** Returns square of this number */
	public int squared() {
		return this.n * this.n;
	}

	/** Returns cube of this number */
	public int cubed() {
		return this.n * this.n * this.n;
	}

	/** Returns the square root (rounded) of this number */
	public int squareRoot() {
		return (int)Math.round(Math.sqrt(this.n));
	}

	/** Returns the quotient (rounded) of this number divided by the passed divisor */
	public int dividedBy(int divisor) {
		return (int)Math.round((double)this.n / (double)divisor);
	}

}