Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

Students also viewed these Databases questions