package course;

import course.Course;
import java.io.PrintWriter;

public class CourseTests {

  public static void main (String[] args) 
        throws Exception {

        // Set up framework for printing results
        PrintWriter out = new PrintWriter (System.out, true);

        // create two courses, using the two constructors
        Course myCourse = new Course ("CSC", 151, 4, "Fund. of CS I");
        Course yourCourse = new Course ("Physics");

        // print results of initialization
        /* first use toString, then use extractors */
        out.println ("Initialization");
        out.println ("My course is ");
        out.println (myCourse.toString());
        out.println  ("Your course is ");
        out.print(yourCourse.getSubject() + " ");
        out.println (yourCourse.getNumber() + ":  " + yourCourse.getTitle());
        out.println ("     your credits:  " + yourCourse.getCredits());

        // set other fields of yourCourse
        yourCourse.setNumTitle (131, "Physics I");
        yourCourse.setCredits (4);

        // print results of modifications
        out.println ("\nAfter modification");
        out.println ("Your course is \n" + yourCourse);
    }


}
