/** encapsulate the characteristics of any one student ** @author: Jonathan Doughty **/ public abstract class AnyStudent { private static long nextId = 0; // Instance variables (fields) that will be associated with each student private String name; private long id; private long tuitionPaid; private long tuitionOwed; // A constructor that will create student objects with specified name and id public AnyStudent( String studentName) { name = studentName; id = nextId; nextId++; } // I'm not going to allow other users of the AnyStudent class create // Students without a name and an id value. private AnyStudent() { } public String toString() { return name + ":" + id; } public void payTuition(int amount) { tuitionPaid += amount; tuitionOwed -= amount; } public long tuitionOwed() { return tuitionOwed; } }