//import java.io.*;
/* A coffee cup. */
public class CoffeeCup {
	// Constructor to ask the persons name and create coffee cup
	public CoffeeCup(String nameGiven) {
		name = nameGiven;
	}	
	
	public void getName() {
	System.out.println("The cup name is" + name);
	}
	// Return true if I contain coffee, false otherwise.
	public boolean isFull() {
		return isFull;
	}
	
	// Fill me with coffee.
	public void fill() {
		isFull = true;
	}
	
	// If I am full, drink from me.  If I am empty, print an error message.
	public void drink() {
		if (isFull) {
			System.out.println("Trying to drink from cup " + name + " You glug the coffee down.");
			isFull = false;
		} else {
			System.out.println("Trying to drink from cup " + name + "You sip furiously, but only suck air.");
		}
	}

	private boolean isFull;	 // Default value false.
	private String name;
}
