Browse Source

Documentation: Admin Class

remotes/origin/fdai7780
Tobias Herbert 11 months ago
parent
commit
0e3339ab64
  1. 13
      src/main/java/org/example/Admin.java

13
src/main/java/org/example/Admin.java

@ -1,5 +1,8 @@
package org.example; package org.example;
/**
* Represents an administrative user in the system.
*/
public class Admin { public class Admin {
public String name; public String name;
public String id; public String id;
@ -8,6 +11,12 @@ public class Admin {
public Admin() { public Admin() {
} }
/**
*
* @param name the name of the admin
* @param id the id of the admin
* @param role the role of the admin in the system (should typically be "Admin")
*/
public Admin(String name, String id, String role) { public Admin(String name, String id, String role) {
this.name = name; this.name = name;
this.id = id; this.id = id;
@ -34,6 +43,10 @@ public class Admin {
this.role = role; this.role = role;
} }
/**
* Prints the basic information of the admin in the console.
* This methods displays the admin´s ID, name and role, providing a quick overview of the admin´s identity
*/
public void printAdminInfo() public void printAdminInfo()
{ {
System.out.println("Name: " + getName()); System.out.println("Name: " + getName());

Loading…
Cancel
Save