Implemented UI, fixed serialization inconsistency
This commit is contained in:
@@ -9,6 +9,8 @@ public class Group implements Serializable {
|
||||
|
||||
private Faculty faculty;
|
||||
|
||||
private List<Student> students = new ArrayList<>();
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@@ -25,8 +27,6 @@ public class Group implements Serializable {
|
||||
this.students = students;
|
||||
}
|
||||
|
||||
private List<Student> students = new ArrayList<>();
|
||||
|
||||
public Group(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -1,40 +1,53 @@
|
||||
package org.lumijiez.base;
|
||||
|
||||
import org.lumijiez.util.FullStudentData;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class Student implements Serializable {
|
||||
|
||||
public Student(String name, String surname, Group group, Faculty faculty) {
|
||||
this.name = name;
|
||||
this.surname = surname;
|
||||
this.fullname = name + " " + surname;
|
||||
this.group = group;
|
||||
this.FSD = new FullStudentData(name, surname, group.getName(), faculty.getName());
|
||||
}
|
||||
|
||||
|
||||
private String name;
|
||||
private String surname;
|
||||
private String fullname;
|
||||
private String email;
|
||||
private Date enrollmentDate;
|
||||
|
||||
private Date dateOfBirth;
|
||||
private Faculty faculty;
|
||||
private Group group;
|
||||
// This acts like an identification serial number for each student
|
||||
private FullStudentData FSD;
|
||||
private final List<Grade> grades = new ArrayList<>();
|
||||
|
||||
// Student stores a reference to its own Group and Faculty, bidirectional association
|
||||
private Group group;
|
||||
|
||||
public Faculty getFaculty() {
|
||||
return faculty;
|
||||
}
|
||||
|
||||
public FullStudentData getFSD() {
|
||||
return FSD;
|
||||
}
|
||||
|
||||
public void setFSD(FullStudentData FSD) {
|
||||
this.FSD = FSD;
|
||||
}
|
||||
|
||||
public void setFaculty(Faculty faculty) {
|
||||
this.faculty = faculty;
|
||||
}
|
||||
|
||||
private Faculty faculty;
|
||||
|
||||
private final List<Grade> grades = new ArrayList<>();
|
||||
|
||||
public Student(String name, String surname, Group group) {
|
||||
this.name = name;
|
||||
this.surname = surname;
|
||||
this.fullname = name + " " + surname;
|
||||
this.group = group;
|
||||
}
|
||||
|
||||
public void setGroup(Group gr) {
|
||||
this.group.deleteStudent(this);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package org.lumijiez.gui.forms;
|
||||
|
||||
import org.lumijiez.base.Grade;
|
||||
import org.lumijiez.util.NameSurnameGroup;
|
||||
import org.lumijiez.managers.Supervisor;
|
||||
import org.lumijiez.util.FullStudentData;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class AddGradeForm extends JFrame {
|
||||
public AddGradeForm(int centerX, int centerY, Supervisor studentManager, JTextArea outputTextArea) {
|
||||
public AddGradeForm(int centerX, int centerY, Supervisor sv, JTextArea outputTextArea) {
|
||||
this.setTitle("Add Grade");
|
||||
this.setSize(400, 300);
|
||||
this.setLocation(centerX, centerY);
|
||||
@@ -21,6 +21,8 @@ public class AddGradeForm extends JFrame {
|
||||
JTextField surnameField = new JTextField();
|
||||
JLabel groupLabel = new JLabel("Group:");
|
||||
JTextField groupField = new JTextField();
|
||||
JLabel facultyLabel = new JLabel("Faculty:");
|
||||
JTextField facultyField = new JTextField();
|
||||
JLabel subjectLabel = new JLabel("Subject:");
|
||||
JTextField subjectField = new JTextField();
|
||||
JLabel gradeLabel = new JLabel("Grade:");
|
||||
@@ -28,12 +30,15 @@ public class AddGradeForm extends JFrame {
|
||||
|
||||
JButton submitButton = new JButton("Submit");
|
||||
|
||||
|
||||
formPanel.add(nameLabel);
|
||||
formPanel.add(nameField);
|
||||
formPanel.add(surnameLabel);
|
||||
formPanel.add(surnameField);
|
||||
formPanel.add(groupLabel);
|
||||
formPanel.add(groupField);
|
||||
formPanel.add(facultyLabel);
|
||||
formPanel.add(facultyField);
|
||||
formPanel.add(subjectLabel);
|
||||
formPanel.add(subjectField);
|
||||
formPanel.add(gradeLabel);
|
||||
@@ -48,10 +53,11 @@ public class AddGradeForm extends JFrame {
|
||||
String group = groupField.getText();
|
||||
String subject = subjectField.getText();
|
||||
String grade = gradeField.getText();
|
||||
|
||||
if (!name.isEmpty() && !surname.isEmpty() && !group.isEmpty() && !subject.isEmpty() && !grade.isEmpty()) {
|
||||
studentManager.addGrade(new NameSurnameGroup(name, surname, group), new Grade(subject, Integer.parseInt(grade)));
|
||||
outputTextArea.setText("===== Students =====\n" + studentManager.getStudentsText());
|
||||
String faculty = facultyField.getText();
|
||||
FullStudentData data = new FullStudentData(name, surname, group, faculty);
|
||||
if (!name.isEmpty() && !surname.isEmpty() && !group.isEmpty() && !subject.isEmpty() && !grade.isEmpty() && !faculty.isEmpty()) {
|
||||
sv.getFm().getGm().getSm().getStudent(data).addGrade(new Grade(subject, Integer.parseInt(grade)));
|
||||
outputTextArea.setText("===== Students =====\n" + sv.getStudentsText());
|
||||
this.dispose();
|
||||
} else JOptionPane.showMessageDialog(this, "Please fill in all fields.");
|
||||
});
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.lumijiez.gui.forms;
|
||||
|
||||
import org.lumijiez.util.NameSurnameGroup;
|
||||
import org.lumijiez.managers.Supervisor;
|
||||
import org.lumijiez.util.FullStudentData;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class AddStudentForm extends JFrame {
|
||||
public AddStudentForm(int centerX, int centerY, Supervisor studentManager, JTextArea outputTextArea) {
|
||||
public AddStudentForm(int centerX, int centerY, Supervisor sv, JTextArea outputTextArea) {
|
||||
this.setTitle("Add Student");
|
||||
this.setSize(400, 300);
|
||||
this.setLocation(centerX, centerY);
|
||||
@@ -20,6 +20,8 @@ public class AddStudentForm extends JFrame {
|
||||
JTextField surnameField = new JTextField();
|
||||
JLabel groupLabel = new JLabel("Group:");
|
||||
JTextField groupField = new JTextField();
|
||||
JLabel facultyLabel = new JLabel("Faculty:");
|
||||
JTextField facultyField = new JTextField();
|
||||
JButton submitButton = new JButton("Submit");
|
||||
|
||||
formPanel.add(nameLabel);
|
||||
@@ -28,6 +30,8 @@ public class AddStudentForm extends JFrame {
|
||||
formPanel.add(surnameField);
|
||||
formPanel.add(groupLabel);
|
||||
formPanel.add(groupField);
|
||||
formPanel.add(facultyLabel);
|
||||
formPanel.add(facultyField);
|
||||
formPanel.add(submitButton);
|
||||
|
||||
this.add(formPanel);
|
||||
@@ -36,9 +40,11 @@ public class AddStudentForm extends JFrame {
|
||||
String name = nameField.getText();
|
||||
String surname = surnameField.getText();
|
||||
String group = groupField.getText();
|
||||
if (!name.isEmpty() && !surname.isEmpty() && !group.isEmpty()) {
|
||||
studentManager.addStudent(new NameSurnameGroup(name, surname, group));
|
||||
outputTextArea.setText("===== Students =====\n" + studentManager.getStudentsText());
|
||||
String faculty = facultyField.getText();
|
||||
FullStudentData data = new FullStudentData(name, surname, group, faculty);
|
||||
if (!name.isEmpty() && !surname.isEmpty() && !group.isEmpty() && !faculty.isEmpty()) {
|
||||
sv.getFm().getGm().getSm().addStudent(data);
|
||||
outputTextArea.setText("===== Students =====\n" + sv.getStudentsText());
|
||||
this.dispose();
|
||||
} else JOptionPane.showMessageDialog(this, "Please fill in all fields.");
|
||||
});
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.lumijiez.gui.forms;
|
||||
|
||||
import org.lumijiez.util.NameSurnameGroup;
|
||||
import org.lumijiez.managers.Supervisor;
|
||||
import org.lumijiez.util.FullStudentData;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class ChangeGroupForm extends JFrame {
|
||||
public ChangeGroupForm(int centerX, int centerY, Supervisor studentManager, JTextArea outputTextArea) {
|
||||
public ChangeGroupForm(int centerX, int centerY, Supervisor sv, JTextArea outputTextArea) {
|
||||
this.setTitle("Change Group");
|
||||
this.setSize(400, 300);
|
||||
this.setLocation(centerX, centerY);
|
||||
@@ -20,6 +20,8 @@ public class ChangeGroupForm extends JFrame {
|
||||
JTextField surnameField = new JTextField();
|
||||
JLabel groupLabel = new JLabel("Group:");
|
||||
JTextField groupField = new JTextField();
|
||||
JLabel facultyLabel = new JLabel("Faculty:");
|
||||
JTextField facultyField = new JTextField();
|
||||
JLabel newgroupLabel = new JLabel("New Group:");
|
||||
JTextField newgroupField = new JTextField();
|
||||
JButton submitButton = new JButton("Submit");
|
||||
@@ -30,6 +32,8 @@ public class ChangeGroupForm extends JFrame {
|
||||
formPanel.add(surnameField);
|
||||
formPanel.add(groupLabel);
|
||||
formPanel.add(groupField);
|
||||
formPanel.add(facultyLabel);
|
||||
formPanel.add(facultyField);
|
||||
formPanel.add(newgroupLabel);
|
||||
formPanel.add(newgroupField);
|
||||
formPanel.add(submitButton);
|
||||
@@ -41,9 +45,11 @@ public class ChangeGroupForm extends JFrame {
|
||||
String surname = surnameField.getText();
|
||||
String group = groupField.getText();
|
||||
String newgroup = newgroupField.getText();
|
||||
String faculty = facultyField.getText();
|
||||
FullStudentData data = new FullStudentData(name, surname, group, faculty);
|
||||
if (!name.isEmpty() && !surname.isEmpty() && !group.isEmpty() && !newgroup.isEmpty()) {
|
||||
studentManager.changeGroup(new NameSurnameGroup(name, surname, group), newgroup);
|
||||
outputTextArea.setText("===== Groups =====\n" + studentManager.getGroupsText());
|
||||
//studentManager.changeGroup(new NameSurnameGroup(name, surname, group), newgroup);
|
||||
outputTextArea.setText("===== Groups =====\n" + sv.getGroupsText());
|
||||
this.dispose();
|
||||
} else JOptionPane.showMessageDialog(this, "Please fill in all fields.");
|
||||
});
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.lumijiez.gui.forms;
|
||||
|
||||
import org.lumijiez.util.NameSurnameGroup;
|
||||
import org.lumijiez.managers.Supervisor;
|
||||
import org.lumijiez.util.FullStudentData;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class DeleteStudentForm extends JFrame {
|
||||
public DeleteStudentForm(int centerX, int centerY, Supervisor studentManager, JTextArea outputTextArea) {
|
||||
public DeleteStudentForm(int centerX, int centerY, Supervisor sv, JTextArea outputTextArea) {
|
||||
this.setTitle("Delete Student");
|
||||
this.setSize(400, 300);
|
||||
this.setLocation(centerX, centerY);
|
||||
@@ -20,6 +20,8 @@ public class DeleteStudentForm extends JFrame {
|
||||
JTextField surnameField = new JTextField();
|
||||
JLabel groupLabel = new JLabel("Group:");
|
||||
JTextField groupField = new JTextField();
|
||||
JLabel facultyLabel = new JLabel("Faculty:");
|
||||
JTextField facultyField = new JTextField();
|
||||
JButton submitButton = new JButton("Submit");
|
||||
|
||||
formPanel.add(nameLabel);
|
||||
@@ -28,6 +30,8 @@ public class DeleteStudentForm extends JFrame {
|
||||
formPanel.add(surnameField);
|
||||
formPanel.add(groupLabel);
|
||||
formPanel.add(groupField);
|
||||
formPanel.add(facultyLabel);
|
||||
formPanel.add(facultyField);
|
||||
formPanel.add(submitButton);
|
||||
|
||||
this.add(formPanel);
|
||||
@@ -36,9 +40,11 @@ public class DeleteStudentForm extends JFrame {
|
||||
String name = nameField.getText();
|
||||
String surname = surnameField.getText();
|
||||
String group = groupField.getText();
|
||||
if (!name.isEmpty() && !surname.isEmpty() && !group.isEmpty()) {
|
||||
studentManager.removeStudent(new NameSurnameGroup(name, surname, group));
|
||||
outputTextArea.setText("===== Students =====\n" + studentManager.getStudentsText());
|
||||
String faculty = facultyField.getText();
|
||||
FullStudentData data = new FullStudentData(name, surname, group, faculty);
|
||||
if (!name.isEmpty() && !surname.isEmpty() && !group.isEmpty() && !faculty.isEmpty()) {
|
||||
sv.getFm().getGm().getSm().deleteStudent(data);
|
||||
outputTextArea.setText("===== Students =====\n" + sv.getStudentsText());
|
||||
this.dispose();
|
||||
} else JOptionPane.showMessageDialog(this, "Please fill in all fields.");
|
||||
});
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.lumijiez.gui.forms;
|
||||
|
||||
import org.lumijiez.util.NameSurnameGroup;
|
||||
import org.lumijiez.util.FullStudentData;
|
||||
import org.lumijiez.managers.Supervisor;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class ShowGradesForm extends JFrame {
|
||||
public ShowGradesForm(int centerX, int centerY, Supervisor studentManager, JTextArea outputTextArea) {
|
||||
public ShowGradesForm(int centerX, int centerY, Supervisor sv, JTextArea outputTextArea) {
|
||||
this.setTitle("Show Grades Student");
|
||||
this.setSize(400, 300);
|
||||
this.setLocation(centerX, centerY);
|
||||
@@ -20,6 +20,8 @@ public class ShowGradesForm extends JFrame {
|
||||
JTextField surnameField = new JTextField();
|
||||
JLabel groupLabel = new JLabel("Group:");
|
||||
JTextField groupField = new JTextField();
|
||||
JLabel facultyLabel = new JLabel("Faculty:");
|
||||
JTextField facultyField = new JTextField();
|
||||
JButton submitButton = new JButton("Submit");
|
||||
|
||||
formPanel.add(nameLabel);
|
||||
@@ -28,6 +30,8 @@ public class ShowGradesForm extends JFrame {
|
||||
formPanel.add(surnameField);
|
||||
formPanel.add(groupLabel);
|
||||
formPanel.add(groupField);
|
||||
formPanel.add(facultyLabel);
|
||||
formPanel.add(facultyField);
|
||||
formPanel.add(submitButton);
|
||||
|
||||
this.add(formPanel);
|
||||
@@ -36,9 +40,10 @@ public class ShowGradesForm extends JFrame {
|
||||
String name = nameField.getText();
|
||||
String surname = surnameField.getText();
|
||||
String group = groupField.getText();
|
||||
if (!name.isEmpty() && !surname.isEmpty() && !group.isEmpty()) {
|
||||
NameSurnameGroup nsg = new NameSurnameGroup(name, surname, group);
|
||||
outputTextArea.setText("===== Grades =====\n" + name + " " + surname + "\n" + studentManager.getGradesText(nsg));
|
||||
String faculty = facultyField.getText();
|
||||
FullStudentData data = new FullStudentData(name, surname, group, faculty);
|
||||
if (!name.isEmpty() && !surname.isEmpty() && !group.isEmpty() && !faculty.isEmpty()) {
|
||||
outputTextArea.setText("===== Grades =====\n" + name + " " + surname + "\n" + sv.getGradesText(data));
|
||||
this.dispose();
|
||||
} else JOptionPane.showMessageDialog(this, "Please fill in all fields.");
|
||||
});
|
||||
|
||||
@@ -8,20 +8,21 @@ import java.util.List;
|
||||
|
||||
public class FacultyManager implements Serializable {
|
||||
|
||||
public FacultyManager(GroupManager gm, StudentManager sm) {
|
||||
this.gm = new GroupManager(sm);
|
||||
this.sm = sm;
|
||||
}
|
||||
private final GroupManager gm;
|
||||
private final StudentManager sm;
|
||||
private final StudentManager sm = new StudentManager();
|
||||
private final GroupManager gm = new GroupManager(sm);
|
||||
|
||||
private final List<Faculty> faculties = new ArrayList<>();
|
||||
|
||||
public Faculty getFaculty(String facultyName, GroupManager gm) {
|
||||
public Faculty getFaculty(String facultyName) {
|
||||
for (Faculty fc : faculties)
|
||||
if (fc.getName().equals(facultyName)) return fc;
|
||||
return null;
|
||||
}
|
||||
|
||||
public GroupManager getGm() {
|
||||
return gm;
|
||||
}
|
||||
|
||||
public void addFaculty(Faculty faculty) {
|
||||
faculties.add(faculty);
|
||||
}
|
||||
@@ -33,13 +34,4 @@ public class FacultyManager implements Serializable {
|
||||
public List<Faculty> getFaculties() {
|
||||
return faculties;
|
||||
}
|
||||
|
||||
public String getFacultiesText() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (Faculty fc : faculties)
|
||||
builder.append(fc.getName()).append("\n");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -33,17 +33,7 @@ public class GroupManager implements Serializable {
|
||||
return groups;
|
||||
}
|
||||
|
||||
public String getGroupsText() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (Group gr : groups)
|
||||
builder.append(gr.getName()).append("\n");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
public Group findGroup(String name) {
|
||||
for (Group gr : groups) {
|
||||
if (gr.getName().equals(name)) return gr;
|
||||
}
|
||||
return null;
|
||||
public StudentManager getSm() {
|
||||
return sm;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package org.lumijiez.managers;
|
||||
|
||||
import org.lumijiez.base.Faculty;
|
||||
import org.lumijiez.base.Grade;
|
||||
import org.lumijiez.base.Group;
|
||||
import org.lumijiez.util.NameSurnameGroup;
|
||||
import org.lumijiez.util.FullStudentData;
|
||||
import org.lumijiez.base.Student;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -11,12 +12,12 @@ public class Supervisor implements Serializable {
|
||||
private final FacultyManager fm;
|
||||
|
||||
public Supervisor() {
|
||||
this.groupManager = new FacultyManager();
|
||||
this.fm = new FacultyManager();
|
||||
}
|
||||
|
||||
public String getStudentsText() {
|
||||
StringBuilder info = new StringBuilder();
|
||||
for (Group group : groupManager.getGroups()) {
|
||||
for (Group group : fm.getGm().getGroups()) {
|
||||
for (Student student : group.getStudents()) {
|
||||
info.append(student.getFullname()).append(" ").append(student.getGroup().getName()).append("\n");
|
||||
}
|
||||
@@ -24,27 +25,46 @@ public class Supervisor implements Serializable {
|
||||
return info.toString();
|
||||
}
|
||||
|
||||
public String getGradesText(NameSurnameGroup NSG) {
|
||||
public String getGradesText(FullStudentData data) {
|
||||
StringBuilder info = new StringBuilder();
|
||||
for (Grade grade : groupManager.getGroup(NSG.group()).getStudent(NSG.name(), NSG.surname()).getGrades()) {
|
||||
info.append(grade.getSubject()).append(" ").append(grade.getGrade());
|
||||
for (Grade gr : fm.getGm().getSm().getStudent(data).getGrades()) {
|
||||
info.append(gr.getSubject()).append(" ").append(gr.getGrade());
|
||||
}
|
||||
return info.toString();
|
||||
}
|
||||
|
||||
public void changeGroup(NameSurnameGroup NSG, String groupName) {
|
||||
Group gr = groupManager.findGroup(groupName);
|
||||
groupManager.getGroup(groupName).getStudent(NSG.name(), NSG.surname()).setGroup(gr);
|
||||
public String getGroupsText() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (Group gr : fm.getGm().getGroups())
|
||||
builder.append(gr.getName()).append("\n");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
public void addStudent(NameSurnameGroup NSG) {
|
||||
Group currentGroup = groupManager.getGroup(NSG.group());
|
||||
currentGroup.addStudent(new Student(NSG.name(), NSG.surname(), currentGroup));
|
||||
public String getFacultiesText() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (Faculty fc : fm.getFaculties())
|
||||
builder.append(fc.getName()).append("\n");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
public void addGrade(NameSurnameGroup NSG, Grade grade) {
|
||||
Student student = groupManager.getGroup(NSG.group()).getStudent(NSG.name(), NSG.surname());
|
||||
student.addGrade(grade);
|
||||
public FacultyManager getFm() {
|
||||
return fm;
|
||||
}
|
||||
|
||||
// public void changeGroup(NameSurnameGroup NSG, String groupName) {
|
||||
// Group gr = groupManager.findGroup(groupName);
|
||||
// groupManager.getGroup(groupName).getStudent(NSG.name(), NSG.surname()).setGroup(gr);
|
||||
// }
|
||||
|
||||
// public void addStudent(NameSurnameGroup NSG) {
|
||||
// Group currentGroup = groupManager.getGroup(NSG.group());
|
||||
// currentGroup.addStudent(new Student(NSG.name(), NSG.surname(), currentGroup));
|
||||
// }
|
||||
|
||||
// public void addGrade(NameSurnameGroup NSG, Grade grade) {
|
||||
// Student student = groupManager.getGroup(NSG.group()).getStudent(NSG.name(), NSG.surname());
|
||||
// student.addGrade(grade);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.lumijiez.util;
|
||||
|
||||
|
||||
import org.lumijiez.base.Faculty;package org.lumijiez.util;
|
||||
import org.lumijiez.base.Faculty;
|
||||
|
||||
// Helper class for easier management of names, surnames, and groups
|
||||
public class FullStudentData {
|
||||
@@ -33,4 +33,11 @@ public class FullStudentData {
|
||||
public String faculty() {
|
||||
return facultyName;
|
||||
}
|
||||
|
||||
public boolean equals(FullStudentData data) {
|
||||
return this.name.equals(data.name())
|
||||
&& this.surname.equals(data.surname())
|
||||
&& this.groupName.equals(data.group())
|
||||
&& this.facultyName.equals(data.faculty());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package org.lumijiez.util;
|
||||
|
||||
// Helper class for easier management of names, surnames, and groups
|
||||
public class NameSurnameGroup {
|
||||
private final String name;
|
||||
private final String surname;
|
||||
private final String groupName;
|
||||
|
||||
public NameSurnameGroup(String name, String surname, String groupName) {
|
||||
this.name = name;
|
||||
this.surname = surname;
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String surname() {
|
||||
return surname;
|
||||
}
|
||||
|
||||
public String group() {
|
||||
return groupName;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user