kkevlar / section-searcher

Project for CSC 308 and 309
1 stars 0 forks source link

Course.java Constructors Comments #113

Closed ryank262 closed 5 years ago

ryank262 commented 5 years ago

Add comments to each of these constructors to clarify their purpose and when to use one versus the other.

       public Course() {
        name = "";
        department = "";
        sections = new ArrayList<Section>();
    }

    public Course(String name) {
        this.sections = new ArrayList<Section>();
        this.name = name.trim(); //.trim() removes whitespace from ends of string
        this.department = "";
    }

    public Course(String name, String department, List<Section> sections) {
        setSections(sections);
        this.name = name.trim(); //.trim() removes whitespace from ends of string
        this.department = department;
    }
kkevlar commented 5 years ago

84