How to write the last three methodsThanks Work with a partne

How to write the last three methods?Thanks.

Work with a partner to create a new class called Course. Java that has the following attributes: fields: the name of the course (String) the number of credits (double) an array of Student objects (Student []) constructors: One that creates a new blank Course object One that creates a course object with all three fields defined, methods: Getters and setters for each field A method for printing out the names and grades of all students A method for determining if all students are passing the course A method to compute the average grade in the class. Use the main method in Course.Java to create several Student objects to use in testing the attributes of the Course class. Don\'t forget to put in java doc comments.

Solution

public class Course
{
private String name;
private int noOfCre;
private Student[] stuArr;
Course(){}
Course(String s,int a,Student[] b)
{
name=s;
noOfCre=a;
stuArr=b;
}
public void setName(String s)
{
name=s;
}
public void setStuArr(Student[] b)
{
stuArr=b;
}
public void setNoOfCre(int a)
{
noOfCre=a;
}
public String getName()
{
return name;
}
public int getNoOfCre()
{
return noOfCre;
}
public Student[] getStuArr()
{
return stuArr;
}
}

Unable to implement remaining methods because their is strucuture of Student class defined in the question

How to write the last three methods?Thanks. Work with a partner to create a new class called Course. Java that has the following attributes: fields: the name of

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site