Closed ryank262 closed 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; }
Add comments to each of these constructors to clarify their purpose and when to use one versus the other.