|
|
@ -0,0 +1,56 @@ |
|
|
|
package org.example; |
|
|
|
|
|
|
|
/** |
|
|
|
* Represents an administrative user in the system. |
|
|
|
*/ |
|
|
|
public class Admin { |
|
|
|
public String name; |
|
|
|
public String id; |
|
|
|
public String role; |
|
|
|
|
|
|
|
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) { |
|
|
|
this.name = name; |
|
|
|
this.id = id; |
|
|
|
this.role = role; |
|
|
|
} |
|
|
|
|
|
|
|
public String getName() { |
|
|
|
return name; |
|
|
|
} |
|
|
|
public void setName(String name) { |
|
|
|
this.name = name; |
|
|
|
} |
|
|
|
public String getId() { |
|
|
|
return id; |
|
|
|
} |
|
|
|
public void setId(String id) { |
|
|
|
this.id = id; |
|
|
|
} |
|
|
|
public String getRole() { |
|
|
|
return role; |
|
|
|
} |
|
|
|
|
|
|
|
public void setRole(String 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() |
|
|
|
{ |
|
|
|
System.out.println("Name: " + getName()); |
|
|
|
System.out.println("ID: " + getId()); |
|
|
|
System.out.println("Role: " + getRole()); |
|
|
|
} |
|
|
|
} |