Answer:
ssume 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() {}
};
Answer:
- #include <iostream>
- using namespace std;
- int main() {
- int number =5;
- if (number>=0&& number <=100){
- cout<<"passed.\n";
- }
- else{
- cout<<"failed.\n";
- }
- return 0;
- }
Explanation:
There where multiple errors in the code given in the questions
Line 1: Missing <iostream>
Line 5: The comparison operator was wrong correction is highlighted
Line 12 Missing closing brace for the main function
All the errors have been fixed and the code above compiles
Explanation:
A map is the correct answer hope that helps you.