Skip to content

Commit 1fa1bf7

Browse files
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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Section8LoopAB/Loop 2.O/src/Solve2/StudentInfo.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package Solve2;
2+
13
import java.util.Scanner;
24

35
class StudentInfo {

0 commit comments

Comments
 (0)