public class Student
{
    //the static fields

    private static int    classNumber = 175000;
    private static String className   = "Intro To Java";
    private static String instructor  = "Sam Sultan";
    private static int    nextID      = 1000;
    
    
    //the instance fields

    private int studentID;
    private String firstName, lastName, address, city, state, email;


    //the constructors

    Student(String firstName, String lastName)		//small constructor
    {
        this.firstName = firstName;
        this.lastName  = lastName;
        this.address   = "";
        this.city      = "";
        this.state     = "";
        this.email     = "";

        this.studentID = ++nextID;      //add 1 to nextId, and assign it to studentId

    }

    Student(String firstName, String lastName, String address, String city, String state, String email)
    {
        this(firstName,lastName);       //call the small constructor 
        this.address = address;
        this.city    = city;
        this.state   = state;
        this.email   = email;
    }


    //the getter methods

    static int getClassNumber()         //getter for static field
    {
        return(classNumber);
    }

    static String getClassName()
    {
        return(className);
    }

    static String getInstructor()
    {
        return(instructor);
    }

    int getStudentID()              //getter for instance field
    {
        return(studentID);
    }
    
    String getFirstName()
    {
        return(firstName);
    }

    String getLastName()
    {
        return(lastName);
    }

    String getFullName()
    {
        return(firstName + " " + lastName);  
    }

    String getAddress()
    {
        return(address);
    }

    String getCity()
    {
        return(city);
    }

    String getState()
    {
        return(state);
    }    

    String getEmail()
    {
        return(email);
    }


    //the setter methods

    static void setClassName(String name)
    {
        className = name;
    }

    static void setInstructor(String instructor)
    {
        Student.instructor = instructor;       	//setter for a static field
    }

    void setFirstName(String firstName)
    {
        this.firstName = firstName;             //setter for an instance field 
    }

    void setLastName(String lastName)
    {
        this.lastName = lastName;
    }

    void setAddress(String address)
    {
        this.address = address;
    }

    void setCity(String city)
    {
        this.city = city;
    }

    void setState(String state)
    {
        this.state = state;
    }

    void setEmail(String email)
    {
        this.email = email;
    }


    //the toString() method used to print the objects

    public String toString ()
    {
        String data = "Course........: " + classNumber   + "\t" + className + "\tInstructor: " + instructor + "\n" +
                      "Student Number: " + studentID     + "\n" +
                      "Student Name..: " + getFullName() + "\n" +
                      "Address.......: " + address       + "\t" + city + "\t" + state + "\n" + 
                      "Email Addr....: " + email         + "\n";
        return (data);
    }
}