Commit 1fa1bf7
committed
feat: Create StudentInfo system to store and display details of two students
🧠 Logic:
- Defines a `Student` class with attributes: roll number, name, and percentage.
- Includes `getData()` method to take input from the user using Scanner, and `showData()` method to print student details.
- In `StudentInfo` class (main method), creates two `Student` objects, collects their data, and displays it using respective methods.
Signed-off-by: Somesh diwan <[email protected]>1 parent e6702f0 commit 1fa1bf7
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
0 commit comments