From 117f1edbd4c74c2e9b1ccfb7c7732906c2739b66 Mon Sep 17 00:00:00 2001 From: fdai7887 Date: Tue, 6 Feb 2024 18:27:23 +0100 Subject: [PATCH] Added printStudentInfo to Student class --- src/main/java/org/example/Student.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/org/example/Student.java b/src/main/java/org/example/Student.java index 0383cc3..64eb6e1 100644 --- a/src/main/java/org/example/Student.java +++ b/src/main/java/org/example/Student.java @@ -40,4 +40,11 @@ public class Student { public void setRole(String role) { this.role = role; } + public void printStudentInfo() + { + System.out.println("Name: " + getStudentName()); + System.out.println("ID: " + getStudentID()); + System.out.println("role: " + getRole()); + } + }