Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello I am working on a Course.java program. I need to include courseName, cours

ID: 674206 • Letter: H

Question

Hello I am working on a Course.java program. I need to include courseName, courseDescription, courseInstructor, and numberofstudents and an array of students. the constructor should intialize all the attributes and allocate an empty array of students.

My course program so far:

public class Course {
private String courseName;
private Student[]
students = new Student[100];
private int numberofStudents;

public Course(String courseName) {
this.courseName = courseName;
}

public void addStudent(String[] Student) {
students[numberofStudents] = student[];
numberofStudents++;
}

public Student[] getStudent() {
return Student;
}

public int getnumberofStudents() {
return numberofStudents;
}

public String getCourseName() {
return courseName;
}

public void dropStudent(String student) {

}
}

Explanation / Answer

public class Course {
private String courseName,courseDescription,courseInstructor;
private Student[]
students = new Student[100];
private int numberofStudents;

public Course(String courseName) {
this.courseName = courseName;
}

public void addStudent(String[] Student) {
students[numberofStudents] = student[];
numberofStudents++;
}

public Student[] getStudent() {
return Student;
}

public int getnumberofStudents() {
return numberofStudents;
}

public String getCourseName() {
return courseName;
}

public String getCourseDescription(){

return courseDescription;

}

public String getCourseInstructor(){

return courseInstructor;

}

public void dropStudent(String student) {

}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote