Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I wrote some code already in the second photo. I am trying to follow the instructions given in the outline, but I am confused reading

image text in transcribedimage text in transcribed

image text in transcribed

I wrote some code already in the second photo. I am trying to follow the instructions given in the outline, but I am confused reading my professor's code. The coding in the main method was written by my professor, it was the preset provided. I want to use an array because it is in the title, however I am not too familiar with the function of arrays. Thank you for your help!

Student list using object array Given a Student class, create a class with following characteristics The class name should be Class Room. Private variable students to maintain the list of Student objects. Function addStudent with input parameter name (string) and rollNoint) adds a new student in "students" list. Method getAllStudents should return all the students in ClassRoom. Input Jack Jones Marry where, First & Second line represent a student's name and roll number. And so on. Output 1 - Jack 2 - Jones 3 - Marry Assume that, Maximum "students" count can be 10. + Test Case(s) 1. import java.util.*; 3. class Student { 4 public String name; 5 public int rollno; 6 } 8 // Write your code here 9. class Class Room { 10 private int students; private int Jack; private int Jones; private int Mary; 15 16 Student[] studentArray = new Student[3]; 13 14 17 18 for (int i =0; i

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

Database Theory Icdt 97 6th International Conference Delphi Greece January 8 10 1997 Proceedings Lncs 1186

Authors: Foto N. Afrati ,Phokion G. Kolaitis

1st Edition

3540622225, 978-3540622222

More Books

Students also viewed these Databases questions

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago

Question

The nature and importance of the global marketplace.

Answered: 1 week ago