Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

public class TestCourse{ public static void main(String[] args){ Course course1 = new Course(Data structure) ; Course course2 = new Course(Database systems); course1.addStudent(peter jones); course1.addStudent(kim smith);

public class TestCourse{

public static void main(String[] args){

Course course1 = new Course("Data structure") ;

Course course2 = new Course("Database systems");

course1.addStudent("peter jones");

course1.addStudent("kim smith");

course1.addStudent("Anne Kennedy");

couse2.addStudent("peter jones");

course2.addStudent("steve smith");

System.out.println("number of students in course1:" + course1.getNumberOfStudents());

String[] Students = course1.getstudents();

for (int i=0; i< course= course1.getstudents(); i++)

System.out.print(students[i] + ","); System.out.println();

System.out.print("number of students in course2" +course2.getNumberOfStudents());

System.out.println("number of books in course1" + course1.getNumberofStudents());

string[] books = course1.getbooks();

for (int i=0; i< course= course1.getbooks();i++){ System.out.print(books[i] + ",");

System.out.println();

System.out.print("number of books in course2" +course2.getNumberOfBooks());

}

}

}

Can anyone help me fix this code,thank you

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_2

Step: 3

blur-text-image_3

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

Database Publishing With Filemaker Pro On The Web

Authors: Maria Langer

1st Edition

0201696657, 978-0201696653

More Books

Students also viewed these Databases questions

Question

What is database?

Answered: 1 week ago

Question

What are Mergers ?

Answered: 1 week ago

Question

=+ For what reasons can and do unions go on strike?

Answered: 1 week ago

Question

=+ Is secondary industrial action common and/or legal?

Answered: 1 week ago