Question
public class Course { private String courseName; private String[] students = new String[100]; private int numberofstudents ; private String[] books = new String[100]; private int
public class Course { private String courseName; private String[] students = new String[100]; private int numberofstudents ; private String[] books = new String[100]; private int numberofbooks ; public void addstudent(String student){ students[numberofstudents] = student; numberofstudents++; } public void addsbook(String book){ books[numberofbooks] = book; numberofbooks++; } public String[] getStudents(){ return students; } public int getNumberofStudents(){ return numberofstudents; } public int getNumberOfBooks(){ return numberofbooks; } public String getCourseName(){ return courseName; } public void setCourseName(String name){ courseName = name; } can anyone help me write a test class for this code?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started