I've been asked to create a Course class with the following attributes :

Course code string
course name string
roster student[]
count int

I know how to set first 2 and the last one, but I am having problems with the aaray one.

This is what i've done so far:

public class Course
{
	private String courseCode;
	private String courseName;
	private
	private int count

If you made a Student class, then you can create a student with the syntax private Student[] roster; . But only if you already made a Student class.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.