class Course{
private String courseID = "";
private String courseName = "";
private String credit = "";
public Course(){
}
public Course(String courseID){
this.courseID = courseID;
}
public Course(String courseID,String courseName){
this(courseName);
this.courseID = courseID;
}
public Course(String courseID,String courseName,int credit){
this.courseID = courseID;
this.courseName = courseName;
this.credit = credit;
}
public void printcourse(){
System.out.println(courseID);
System.out.println(courseName);
System.out.println(credit);
}
}
public class CourseTest {
public static void main(String args[]){
Course ol=new Course();
Course o2=new Course("0537331165");
Course o3=new Course("0537331165","JAVA");
Course o4=new Course("0537331165","JAVA",4);
o1.printcourse();
o2.printcourse();
o3.printcourse();
o4.printcourse();
}