![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 02.03.2020 23:32 ladybugys
HW3_P1 - Student list using array
Given a Student class, create a class with following characteristics:
The class name should be ClassRoom.
Private variable students array to maintain the list of Student objects.
Function addStudent with input parameter name (string) and rollNo(int) adds a new student in "students" list.
Method getAllStudents should return all the students in ClassRoom.
Input
Jack
1
Jones
2
Marry
3
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.
*Driver Class*
*Solution class*
import java. util.*;
class Student {
private String name;
private int rollNo;
public String getName() {}
public void setName(String name) {}
public int getRollNo() {}
public void setRollNo(int rollNo) {}
};
class ClassRoom {
private int i;
private Student[] students;
public void addStudent(String name, int rollNo) {}
public Student[] getAllStudents() {}
};
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 08:10
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 03:30
Auniform resource locator (url) is a formatted string of text that web browsers, email applications, and other software programs use to identify a particular resource on the internet. true false
Answers: 2
You know the right answer?
HW3_P1 - Student list using array
Given a Student class, create a class with following c...
Given a Student class, create a class with following c...
Questions
![question](/tpl/images/cats/ekonomika.png)
Business, 05.11.2020 03:30
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/fizika.png)
Physics, 05.11.2020 03:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.11.2020 03:30
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 05.11.2020 03:30
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 05.11.2020 03:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.11.2020 03:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/ekonomika.png)
Business, 05.11.2020 03:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 05.11.2020 03:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.11.2020 03:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.11.2020 03:30
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 05.11.2020 03:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.11.2020 03:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.11.2020 03:30
![question](/tpl/images/cats/mkx.png)
Arts, 05.11.2020 03:30