Commit e6702f0
committed
feat: Identify topper among multiple students using object-oriented approach
🧠 Logic:
- Defines a class `SolveIT` with fields: roll number, name, and percentage, and methods to input (`getData`) and output (`display`) student details.
- In the `Student` class (main driver), takes input for the number of students.
- Creates an array of `SolveIT` objects, collects data for each student, and displays it.
- Iterates through all students to determine the one with the highest percentage and stores their position.
- Finally, prints the topper’s details by accessing the object at the stored index.
Signed-off-by: Somesh diwan <[email protected]>1 parent f79adb2 commit e6702f0
1 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
0 commit comments