|
|
@ -1,4 +1,7 @@ |
|
|
|
package org.example; |
|
|
|
/** |
|
|
|
* Represents an student user in the system. |
|
|
|
*/ |
|
|
|
|
|
|
|
public class Student { |
|
|
|
String name; |
|
|
@ -10,6 +13,13 @@ public class Student { |
|
|
|
} |
|
|
|
|
|
|
|
public Student(String name, String id, String role) { |
|
|
|
/** |
|
|
|
* |
|
|
|
* @param name the name of the student |
|
|
|
* @param id the id of the student |
|
|
|
* @param role the role of the student in the system (should typically be "Student") |
|
|
|
*/ |
|
|
|
|
|
|
|
this.name = name; |
|
|
|
this.id = id; |
|
|
|
this.role = role; |
|
|
@ -38,6 +48,12 @@ public class Student { |
|
|
|
public void setRole(String role) { |
|
|
|
this.role = role; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Prints the basic information of the student in the console. |
|
|
|
* This methods displays the student´s ID, name and role, providing a quick overview of the student´s identity |
|
|
|
*/ |
|
|
|
|
|
|
|
public void printStudentInfo() |
|
|
|
{ |
|
|
|
System.out.println("Name: " + getName()); |
|
|
|