Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Given a Student class, create a class with following characteristics The class name should be ClassRoom . Private variable students to maintain the list of
Given a Student class, create a class with following characteristics
- The class name should be ClassRoom.
- Private variable students 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 students name and roll number. And so on.
Output
1 - Jack
2 - Jones
3 - Marry
Assume that,
- Maximum students count can be 10.
(Use Java to work on this question please).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started