Question: java course as main class create three classes main class course student class major class use array student[ ] computer science student [ ] math
![student class major class use array student[ ] computer science student [](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66e3e4f45ffe9_31566e3e4f3b132f.jpg)

File Edit Format View Help create students of array program contain three clasess main class will be cources student[] computer scie student[] englsih student[]math array by major output 3-5 students name with their major. output students with same major Untitled - Notepad File Edit Format View Help creat of array of student major of student class student for comp student of english student of math creat class of student public class corces student[] java student[] english student [] math array by major three classess variable length "New Text Document - Notepad File Edit Format View Help public static void main(String[] args) { Student[]computer=new Student[5]; Student[math=new student[4]; Student[]english-new Student [3]; computer[@]-new Student("ABC", "Computer"); computer[1]=new Student("DEF", "Computer"); computer [2] =new Student("FHS", "Computer"); computer [3]=new Student ("SN", "Computer"); computer [4]=new Student("LSS", "Computer"); math[@]- new Student("BBA", "Maths"); math[1]= new Student("JS", "Maths"); math[2] = new Student ("KKKS", "Maths"); math[3]- new Student("WOW", "Maths"); english[@]=new Student("RUS", "English"); english[1]=new Student("EUE", "English"); english[2]=new Student("PPO", "English"); for(Student s: computer) System.out.println("Name: "+s.name+" Major: "+5.major.name); for(Student smath){ System.out.println("Name: *+s.name+" Major: "+5.major.name); New Text Document - Notepad File Edit Format View Help System.out.println("Name: "+ .name" Major: "+s.major.name); for(Student s:english){ System.out.println("Name: "+s.name+" Major: "+s.major.name); public class Course String name; int credits; Course(String n, int c){ name=n; credits=c; public class Student String name; Course major; Student(String n, String name=n; major=new Course(m, 4) On har
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
