/* * %W% %E% Dymik739 * Email: dymik739@109.86.70.81 * * Copyright (C) 2023 FIOT Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * represents a student with generic terms and phrases to let programmers * write more readable code. * * @author Dymik739 * @version 0.1 * @since 0.1 */ public class Student { /** * name of the student */ private String name; /** * overall ranking the student gets after finishing all courses */ private double results; /** * a reasonable variable showing student motivation. The higher this * number is, the better this student studies. */ private double motivationPercent; /** * general ability to learn which directly affects learning speed. */ private double learningAbilities; /** * shows the amount of subjects this student is studying. */ private int chosenCoursesAmount; /** * This constructor lets you create the Student class right away * * @param name the name of this student * @param results starting point for the overall ranking score of this * student * @param motivationPercent this student motivation level. Higher values * allow for more jobs taken consecutively. * @param learningAbilities directly affect learning speed of this student * @param chosenCoursesAmount amount of courses chosen by this student. * Roughly shows the load being put on them * @since 0.1 */ public Student(String name, double results, double motivationPercent, double learningAbilities, int chosenCoursesAmount) { this.name = name; this.results = results; this.motivationPercent = motivationPercent; this.learningAbilities = learningAbilities; this.chosenCoursesAmount = chosenCoursesAmount; } /** * This method allows you to print out the student object in a nice way. * * @since 0.1 */ @Override public String toString() { return "Student(name = '" + this.name + "', results = " + this.results + ", motivationPercent = " + this.motivationPercent + ", learningAbilities = " + this.learningAbilities + ", chosenCoursesAmount = " + this.chosenCoursesAmount + ")"; } /** * Getter for the private name field of this class * * @return String containing this student's name * @since 0.1 */ public String getName() { return this.name; } /** * Getter for the private results field of this class * * @return double representing final score of the student * @since 0.1 */ public double getResults() { return this.results; } /** * Getter for the private motivationPercent field of this class. * * @return double representing strenght of this student's motivation to * learn * @since 0.1 */ public double getMotivationPercent() { return this.motivationPercent; } /** * Getter for the private motivationPercent field of this class. * * @return double representing how quickly this student can learn * @since 0.1 */ public double getLearningAbilitiesPercent() { return this.learningAbilities; } }