/**
 * The client in a homegrown example of remote method invocation
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class ClientDriver
{

    /**
     * The entry point
     *
     * @param args  The command line arguments
     */
    public static void main(String[] args)
    {
	Course               course;
	CourseDatabase       db;


	try {

	    db = CourseDatabaseFactory.createCourseDatabaseStub();

	    db.add(new Course("CS",139,"Algorithm Development"));
	    db.add(new Course("CS",240,"Data Structures and Algorithms"));
	    db.add(new Course("CS",349,"Developing Multimedia Content"));
	    db.add(new Course("CS",462,"Network Applications Development"));

	    course = db.get("CS",462);
	    System.out.println(course.getDesignation()+"\t"+
			       course.getTitle());

	    System.out.flush();

	} catch (Exception ex) {

	    ex.printStackTrace();
	}
    }
}
