
// Everything you type after a "//" is a comment that you can put in your code.

public class CatMaker {
	public static void main(String []args){
		System.out.println("Hello There, see these cats.");
		new Cat("Google");
		new Cat("Casper");
		// Let's save this Hershal cat that we're creating in a variable.
		Cat x = new Cat("Hershal");	// "x" is like a container for holding Cat objects.
		
		System.out.println("This cat's name is " x.getName() );
		
		if( x.getName() == "Hershal" ) {
			System.out.println("You won't see this printed out because...");
		}
		
		if( x.getName().equals("Hershal")) {
			System.out.println("...a String is an object");
			// Just because two objects have the same value doesn't mean they're the same object.
		}
	}
}


/*  Everything within these two markings is also a comment
    and it can go across multiple lines */
    
/**
 *  This is a documentation type of comment.  There are tools which pull out these comments and put them into
 *  the documentation.  It's the two stars that make it different.
 */

class Cat {
	private String mName;	// This is a "variable" which contains a String.  We will use it to save the cat's name
	
	/**
	 * Constructor for the Cat class.
	 * 
	 * @param name		This is part of the documentation, it explains the meaning of the String "name" parameter.
	 * 
	 */
	public Cat(String name){
		System.out.println("Cat; " + name);
		mName = name;		// save the cat's name to a 
	}
	
	/**
	 * This is a "method", which is a function that can take inputs and return an output. 
	 * Return the name of this Cat object.
	 * @return		This returns a String which equals the name of the Cat.
	 */
	public String getName() {
		return mName;
	}
}

@@ -75,16 +75,823 @@
  code.%0A%0A
+%0A/**%0A *   Let's create a class for all animals.  The only thing it has is a variable for animal type.%0A */%0Apublic class Animal %7B%0A%09String mAnimalType;%0A%09%0A%09// We don't need a Constructor here: i.e. we don't need a public Animal() %7B  ...  %7D  method%0A%09// When we know we won't be using an object directly like this, we can write it like this...%0A%09// public abstract class Animal %7B%0A%09// That means it's just an abstract thing.  You must create a subclass to do anything with it.%0A%09%0A%09// This sets the type of animal%0A%09// NOTE: %22void%22 here means it doesn't return anything.%0A%09public void setAnimalType( String type ) %7B%0A%09%09mAnimalType = type;%0A%09%7D%0A%09%0A%09%0A%09// This returns the type of animal when you call it%0A%09// NOTE: %22String%22 here means it returns a String object.%0A%09public String getAnimalType() %7B%0A%09%09return mAnimalType;%0A%09%7D%0A%7D%0A%0A%0A%0A
 public c
@@ -1860,17 +1860,84 @@
 ass Cat 
-%7B
+extends Animal %7B%09// The Cat class is a subclass of the Animal class.
 %0A%09privat
@@ -2312,18 +2312,178 @@
 name to 
-a 
+the variable we have in the class.%0A%09%09%0A%09%09setAnimalType(%22Cat%22);%09// The Cat class %22inherits%22 the Animal class variables and methods.%0A%09%09%09%09%09// So we can use them here.
 %0A%09%7D%0A%09%0A%09/

Update CatMaker.java