diff --git a/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Grade.java b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Grade.java new file mode 100644 index 0000000000000000000000000000000000000000..3557cea7740396303db6492c38946f0933e7f3a9 --- /dev/null +++ b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Grade.java @@ -0,0 +1,34 @@ +package uk.ac.rhul.cs2800.model; + +/** + * This class represents a grade with both a numeric score and a module it belongs to. + */ +public class Grade { + + private int score; + private Module module; + + /** + * Constructs a Grade with the score and module. + * score of the grade module associated with the grade + */ + + public Grade(int score, Module module) { + this.score = score; + this.module = module; + } + + public int getScore() { + return score; + } + + public Module getModule() { + return module; + } + + + public void setScore(int score) { + this.score = score; + } + +} diff --git a/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Module.java b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Module.java new file mode 100644 index 0000000000000000000000000000000000000000..beed78715240b78c550473a11f9c049ee50a2713 --- /dev/null +++ b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Module.java @@ -0,0 +1,32 @@ +package uk.ac.rhul.cs2800.model; + +/** + * Represents a module with its code, name, and mandatory status. + */ + +public class Module { + private String code; + private String name; + private boolean nmc; + + /** + * Defines a module, including its code, name, and whether it's a mandatory module. + */ + public Module(String code, String name, boolean nmc) { + this.code = code; + this.name = name; + this.nmc = nmc; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public boolean isNmc() { + return nmc; + } +} diff --git a/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Registration.java b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Registration.java new file mode 100644 index 0000000000000000000000000000000000000000..7fb54ff44fefd64a22b532ac8762f618c97716d7 --- /dev/null +++ b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Registration.java @@ -0,0 +1,27 @@ +package uk.ac.rhul.cs2800.model; + +/** + * Registers a student to a specified module. + */ + +public class Registration { + private Student student; + private Module module; + + /** + * Registers a student to a specified module. + */ + + public Registration(Student student, Module module) { + this.student = student; + this.module = module; + } + + public Student getStudent() { + return student; + } + + public Module getModule() { + return module; + } +} diff --git a/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Student.java b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Student.java new file mode 100644 index 0000000000000000000000000000000000000000..f50c16d080761ad4bbe7325341373fa3f492d5e5 --- /dev/null +++ b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/Student.java @@ -0,0 +1,89 @@ +package uk.ac.rhul.cs2800.model; + +import java.util.ArrayList; +import java.util.List; +import uk.ac.rhul.cs2800.model.exception.NoGradeAvailableException; + +/** + * Represents a student with personal and academic information. + */ +public class Student { + + private Long id; + private String grade; + private String firstName; + private String lastName; + private String username; + private String email; + private List<Grade> grades = new ArrayList<>(); + private List<Module> modules = new ArrayList<>(); + + /** + * Represents a student with basic identifying information. Each student has a unique ID, personal + * details, and contact information. + */ + + public Student(Long id, String firstName, String lastName, String username, String email) { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + this.username = username; + this.email = email; + } + + /** + * Adds a grade to the student's list of grades. + * + * @param g the grade to add + */ + + public void addGrade(Grade g) { + grades.add(g); + } + + /** + * Adds a grade to the student's list of grades. + * + * + */ + + public Grade getGrade(Module m) throws NoGradeAvailableException { + for (Grade grade : grades) { + if (grade.getModule().equals(m)) { + return grade; + } + } + throw new NoGradeAvailableException("No grade available for module: " + m.getName()); + } + + /** + * Adds a grade to the student's list of grades. + * + * @param m the grade to add + */ + public void registerModule(Module m) { + modules.add(m); + } + + /** + * 0 if grade is empty. + */ + + public float computeAverage() { + if (grades.isEmpty()) { + return 0; + } + int total = 0; + for (Grade grade : grades) { + total += grade.getScore(); + } + return (float) total / grades.size(); + } + + + + public List<Module> getModules() { + return modules; + } + +} diff --git a/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/exception/NoGradeAvailableException.java b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/exception/NoGradeAvailableException.java new file mode 100644 index 0000000000000000000000000000000000000000..0e819c12de730573483c8f8da96842272a94720a --- /dev/null +++ b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/exception/NoGradeAvailableException.java @@ -0,0 +1,21 @@ +package uk.ac.rhul.cs2800.model.exception; + +/** + * Custom exception used when a grade is unavailable or missing. Includes a message to explain the + * reason. + */ + +public class NoGradeAvailableException extends Exception { + private static final long serialVersionUID = 1L; + + /** + * Custom exception to handle cases when registration cannot be completed. The message provides + * further context. + */ + + public NoGradeAvailableException(String message) { + super(message); + } +} + + diff --git a/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/exception/NoRegistrationException.java b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/exception/NoRegistrationException.java new file mode 100644 index 0000000000000000000000000000000000000000..e5f9c873e34f1ba73bcbb170ba2a0909ce8e3710 --- /dev/null +++ b/CW1/StudentGradeManagment/src/main/java/uk/ac/rhul/cs2800/model/exception/NoRegistrationException.java @@ -0,0 +1,17 @@ +package uk.ac.rhul.cs2800.model.exception; + +/** + * Creates an association between a student and a module for registration purposes. + */ +public class NoRegistrationException extends Exception { + private static final long serialVersionUID = 1L; + + /** + * Registers a student to a specified module. + */ + + public NoRegistrationException(String message) { + super(message); + + } +} diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/GradeTest.java b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/GradeTest.java new file mode 100644 index 0000000000000000000000000000000000000000..3b16fcf7083caf46909115a21990e61a2d5cc7a0 --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/GradeTest.java @@ -0,0 +1,24 @@ +package uk.ac.rhul.cs2800.model; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +class GradeTest { + + @Test + void testGradeInitialization() { + Module module = new Module("CS2800", "CS4600", false); + Grade grade = new Grade(50, module); + + equals(50); + assertEquals(module, grade.getModule()); + } + + @Test + void testSetScore() { + Grade grade = new Grade(50, null); + grade.setScore(95); + assertEquals(95, grade.getScore()); + } +} diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/ModuleTest.java b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/ModuleTest.java new file mode 100644 index 0000000000000000000000000000000000000000..60cf663a94322d520cc81f5e192796a49d9ee033 --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/ModuleTest.java @@ -0,0 +1,18 @@ +package uk.ac.rhul.cs2800.model; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; + +import org.junit.jupiter.api.Test; + +class ModuleTest { + + @Test + void testModuleInitialization() { + Module module = new Module("CS2800", "ComputerScience", false); + + assertEquals("CS2800", module.getCode()); + assertEquals("ComputerScience", module.getName()); + assertFalse(module.isNmc()); + } +} diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/NoGradeAvailableExceptionTest.java b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/NoGradeAvailableExceptionTest.java new file mode 100644 index 0000000000000000000000000000000000000000..2dfb7579fb811c842711d460ee1dbc2985488f42 --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/NoGradeAvailableExceptionTest.java @@ -0,0 +1,14 @@ +package uk.ac.rhul.cs2800.model.exception; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +class NoGradeAvailableExceptionTest { + + @Test + void testExceptionMessage() { + NoGradeAvailableException exception = new NoGradeAvailableException("No grade found."); + assertEquals("No grade found.", exception.getMessage()); + } +} diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/NoRegistrationExceptionTest.java b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/NoRegistrationExceptionTest.java new file mode 100644 index 0000000000000000000000000000000000000000..b43c5cca19c7ad523ee1d7bb52ffe57606ebef32 --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/NoRegistrationExceptionTest.java @@ -0,0 +1,14 @@ +package uk.ac.rhul.cs2800.model.exception; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +class NoRegistrationExceptionTest { + + @Test + void testExceptionMessage() { + NoRegistrationException exception = new NoRegistrationException("No registration found."); + assertEquals("No registration found.", exception.getMessage()); + } +} diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/RegistrationTest.java b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/RegistrationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..f658d75d1a292501ae9d4c0264482279c5f0753b --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/RegistrationTest.java @@ -0,0 +1,18 @@ +package uk.ac.rhul.cs2800.model; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +class RegistrationTest { + + @Test + void testRegistrationInitialization() { + Student student = new Student(1L, "Anna", "Angelina", "Alina", "Izzy"); + Module module = new Module("CS2800", "ComputerScience", false); + Registration registration = new Registration(student, module); + + assertEquals(student, registration.getStudent()); + assertEquals(module, registration.getModule()); + } +} diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/StudentTest.java b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/StudentTest.java new file mode 100644 index 0000000000000000000000000000000000000000..1fbedc34987a2fcb5381dc19a616c7ff38509d82 --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/StudentTest.java @@ -0,0 +1,52 @@ +package uk.ac.rhul.cs2800.model; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import uk.ac.rhul.cs2800.model.exception.NoGradeAvailableException; + + +class StudentTest { + + private Student student; + private Module module; + private Grade grade; + + + @BeforeEach + void setUp() { + student = new Student(1L, "Anna", "Angelina", "Alina", "Izzy"); + module = new Module("CS2800", "ComputerScience", false); + grade = new Grade(85, module); + } + + @Test + void testAddGrade() throws NoGradeAvailableException { + student.addGrade(grade); + assertEquals(grade, student.getGrade(module)); + } + + @Test + void testComputeAverage() { + student.addGrade(new Grade(50, module)); + student.addGrade(new Grade(90, new Module("CS2800", "ComputerScience", false))); + assertEquals(70.0, student.computeAverage(), 0.01); + } + + @Test + void testGetGradeThrowsExceptionWhenNoGrade() { + Module newModule = new Module("CS2800", "ComputerScience", false); + assertThrows(NoGradeAvailableException.class, () -> student.getGrade(newModule)); + } + + @Test + void testRegisterModule() { + student.registerModule(module); + + assertTrue(student.getModules().contains(module)); + } +} diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.classpath b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..7a9a1057fc6d7c8f44b29dd0a3d30e81dcf16397 --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.classpath @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="target/classes" path="src/main/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + <attribute name="optional" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> + <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + <attribute name="test" value="true"/> + <attribute name="optional" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.gitignore b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b83d22266ac8aa2f8df2edef68082c789727841d --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.mvn/jvm.config b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.mvn/jvm.config new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.mvn/maven.config b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.mvn/maven.config new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.project b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.project new file mode 100644 index 0000000000000000000000000000000000000000..28cc2e267d8038ce113adfd42f100be9efd2abeb --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.project @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>StudentGradeManagement</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>net.sf.eclipsecs.core.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> + </natures> +</projectDescription> diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.settings/org.eclipse.core.resources.prefs b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..f9fe34593fcd3624a964478aeb438b0d44fe7237 --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/<project>=UTF-8 diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.settings/org.eclipse.jdt.core.prefs b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..eeac0e762f1a7efe323e571143f86a1b04f2b83b --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.settings/org.eclipse.m2e.core.prefs b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..f897a7f1cb2389f85fe6381425d29f0a9866fb65 --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/pom.xml b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..d7117198ccb74a6e2defad92497c962649bc474f --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/CW1/StudentGradeManagement/pom.xml @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>uk.ac.rhul.cs2800.model</groupId> + <artifactId>StudentGradeManagement</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>StudentGradeManagement</name> + <!-- FIXME change it to the project's website --> + <url>http://www.example.com</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.release>17</maven.compiler.release> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.junit</groupId> + <artifactId>junit-bom</artifactId> + <version>5.11.0</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <scope>test</scope> + </dependency> + <!-- Optionally: parameterized tests support --> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-params</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>3.4.0</version> + <configuration> + <configLocation>google_checks.xml</configLocation> + <consoleOutput>true</consoleOutput> + <failsOnError>true</failsOnError> + <violationSeverity>warning</violationSeverity> + </configuration> + </plugin> + <plugin> + <groupId>com.github.spotbugs</groupId> + <artifactId>spotbugs-maven-plugin</artifactId> + <version>4.8.6.0</version> + <configuration> + <threshold>High</threshold> + </configuration> + </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>0.8.12</version> + <executions> + <execution> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + <execution> + <id>report</id> + <phase>test</phase> + <goals> + <goal>report</goal> + </goals> + </execution> + <execution> + <id>jacoco-check</id> + <goals> + <goal>check</goal> + </goals> + <configuration> + <rules> + <rule> + <element>PACKAGE</element> + <limits> + <limit> + <counter>LINE</counter> + <value>COVEREDRATIO</value> + <minimum>0.9</minimum> + </limit> + </limits> + </rule> + </rules> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + + </build> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.20.0</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>3.6.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.1.0</version> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>3.5.0</version> + <configuration> + <configLocation>google_checks.xml</configLocation> + <failsOnError>true</failsOnError> + <violationSeverity>warning</violationSeverity> + </configuration> + <reportSets> + <reportSet> + <reports> + <report>checkstyle</report> + </reports> + </reportSet> + </reportSets> + </plugin> + <plugin> + <groupId>com.github.spotbugs</groupId> + <artifactId>spotbugs-maven-plugin</artifactId> + <version>4.8.6.0</version> + </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>0.8.12</version> + <reportSets> + <reportSet> + <reports> + <report>report</report> + </reports> + </reportSet> + </reportSets> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.10.0</version> + <configuration> + <doclint>all,-missing</doclint> + </configuration> + </plugin> + </plugins> + </reporting> +</project> diff --git a/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/README.md b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/README.md new file mode 100644 index 0000000000000000000000000000000000000000..61a684e395bfd1e2da06a05727cc7d4e0b4d0fe3 --- /dev/null +++ b/CW1/StudentGradeManagment/src/test/java/uk/ac/rhul/cs2800/model/cs2800-lab-2024/README.md @@ -0,0 +1,5 @@ +#CS2800 NEW PROJECT>>>> +HI my name is sulema + +software engineering +