commit d001b5ac26cb773c40d2ff719f23b83b11d4efab Author: OOP Project Team Date: Thu Feb 14 01:11:37 2019 +0100 OOP Project Template diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..69a5d6b --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# Maven ignores +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties + +# Exclude maven wrapper +!/.mvn/wrapper/maven-wrapper.jar diff --git a/CSE1105.checkstyle.xml b/CSE1105.checkstyle.xml new file mode 100644 index 0000000..d0fe4b0 --- /dev/null +++ b/CSE1105.checkstyle.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..f9b26d9 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# CSE1105 Template Repository + +This a template repository to help you get started on making the best project possible! + +You can download the latest version [here](https://github.com/SERG-Delft/TI1216/releases) + +http://stackoverflow.com/a/6466993 + +## How to import into your IDE + +Eclipse: +[http://javapapers.com/java/import-maven-project-into-eclipse/](http://javapapers.com/java/import-maven-project-into-eclipse/) + +Intellij: +[https://www.jetbrains.com/help/idea/2016.2/importing-project-from-maven-model.html](https://www.jetbrains.com/help/idea/2016.2/importing-project-from-maven-model.html) + +## Getting your weekly reports + +**Jacoco**: +Run `maven install` ([Intellij](https://www.jetbrains.com/help/idea/2016.3/getting-started-with-maven.html#execute_maven_goal)/[Eclipse](http://imgur.com/a/6q7pV)) + +**Checkstyle**: +Run `maven site` \ No newline at end of file diff --git a/doc/meetings/README.md b/doc/meetings/README.md new file mode 100644 index 0000000..3fb4ef4 --- /dev/null +++ b/doc/meetings/README.md @@ -0,0 +1,15 @@ +# Meetings folder + +**Agenda** + +Before your weekly meeting you need to commit an agenda to this folder. + +Make sure that the filename follows the naming convention. +For instance, for February 13th you would use `20190213_agenda.xyz`. +`xyz` would be the type of the file, please use either MarkDown (recommended, `.md` files) or PDFs (`.pdf`). + +**Meeting notes** + +After your weekly meeting you need to commit your notes in this folder. +Please use the following naming convention: `20190213_notes.xyz` (where you change the date to the date of the meeting). +Please hand in either a MarkDown or PDF file. \ No newline at end of file diff --git a/doc/reports/checkstyle/README.md b/doc/reports/checkstyle/README.md new file mode 100644 index 0000000..817bd34 --- /dev/null +++ b/doc/reports/checkstyle/README.md @@ -0,0 +1,5 @@ +# Checkstyle folder + +At the end of the week, please commit a readable screenshot that shows the Checkstyle results. +Make sure that the file follows the naming convention; `20190213_checkstyle.xyz` for February 13th. +`.xyz` can be either `.jpg` or `.png`. \ No newline at end of file diff --git a/doc/reports/final-report/README.md b/doc/reports/final-report/README.md new file mode 100644 index 0000000..1aba773 --- /dev/null +++ b/doc/reports/final-report/README.md @@ -0,0 +1,9 @@ +# Final report folder + +This is where you commit a **PDF** version of the draft and the final version of your report. + +Checklist when handing in; + +- [ ] All your names and student numbers are visible on the report. +- [ ] The filename is following the pattern `20190213_final_report.pdf` / `20190213_draft_final_report.pdf` (where the date is updated corresponding to the actual date). +- [ ] Your final report is also uploaded to Brightspace. \ No newline at end of file diff --git a/doc/reports/sprint-reviews/README.md b/doc/reports/sprint-reviews/README.md new file mode 100644 index 0000000..fec70c1 --- /dev/null +++ b/doc/reports/sprint-reviews/README.md @@ -0,0 +1,5 @@ +# Sprint review folder + +At the end of the week, please commit a PDF or MarkDown file containing your sprint review. +Please use the following naming convention: `20190213_sprint_review.xyz` (update the date according to your current sprint). +`.xyz` can be either `.pdf` or `.md`. \ No newline at end of file diff --git a/doc/reports/sprint-reviews/review-template.md b/doc/reports/sprint-reviews/review-template.md new file mode 100644 index 0000000..2204efd --- /dev/null +++ b/doc/reports/sprint-reviews/review-template.md @@ -0,0 +1,18 @@ + + +# Sprint Review + +## Main problems Encountered + +### Problem 1: Multiple members were too late +During the lab, multiple people arrived too late. This interfered with the meeting that was scheduled at that moment and it had to be postponed. + +To mitigate this, a cake rule was added to push members to be on time + +## Adjustments from previous sprints + - Increase testing effort + - This was not achieved. New agreements have been made. + +## Adjustments for next sprint + - Increase testing effort + - Add cake rule diff --git a/doc/sprint1/agenda.md b/doc/sprint1/agenda.md new file mode 100644 index 0000000..03953f1 --- /dev/null +++ b/doc/sprint1/agenda.md @@ -0,0 +1,56 @@ +# Meeting 1 +> Quoted text will give you extra pointers to how an agenda should look like + +## Opening +> Here you check if everyone is present + +## Approval of the agenda +> Make sure everything that needs to be discussed is in the agenda or add it if something is missing. + +## Points of action +> The items below are things you should look into after the meeting. During the meeting you can divide (some of) the work between the team members, so that everybody has something to do afterwards. + +> Your TA will you for the meeting. Note down all other questions that you have so that you can ask them then. + + - Create a planning and convert it to GitLab issues + - Discuss a cake rule: If you are late or not there at all, you have to bring cake (or something similar) + - Create a readme with your names, a picture and your personal development plan + - It is your job that you and your team contribute (equally) + - If there is a problem it is your responsibility to notify the TA + - Things to research: + - Scrum (See Brightspace) + - Why should you use it? + - What is a scrum master? + - How are you going to use scrum in the team? + - How will you document the sprints? (tip: templates) + - Schedule for taking notes and chairing + - Git (See Brightspace) + - How does it work? + - What is branching? + - Maven (See Brightspace) + - What does it do? + - How do you add a library to the pom file? + - Have you set the team id? + - Code structure + - How will you use packages? + - Database options + - Json + - Gson + - Jackson + - SQL + - Plain text + - GUI + - JavaFX + - IDE + - Eclipse + - IntelliJ + + +## Any other business +> If anybody has something that should be discussed but came up with that after the agenda was finalized (in point 2), he/she should bring that up now so that it can be discussed after all. + +## Question round +> If there are any questions, now is the time to ask them. + +## Closing +> Now you can start working on the project. Good luck! \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..bda3567 --- /dev/null +++ b/pom.xml @@ -0,0 +1,104 @@ + + + 4.0.0 + + group-template + OOP-Project + 0.1-SNAPSHOT + jar + Starter OOPProject-Template + + + 1.8 + 1.8 + + 7.2 + 2.17 + + 0.7.8 + + + + + junit + junit + RELEASE + test + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${checkstyle.plugin.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + default-prepare-agent + + prepare-agent + + + + default-report + prepare-package + + report + + + + default-check + + check + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${checkstyle.plugin.version} + + + CSE1105.checkstyle.xml + + + + + + \ No newline at end of file diff --git a/src/main/java/grade/ProjectGrade.java b/src/main/java/grade/ProjectGrade.java new file mode 100644 index 0000000..ebedd94 --- /dev/null +++ b/src/main/java/grade/ProjectGrade.java @@ -0,0 +1,36 @@ +package grade; + +import java.util.stream.IntStream; + +public class ProjectGrade { + + /** + * Returns a grade depending on if you used git and the project compiles. + * @param usedGit true if git was used + * @param compiles true if the project compiled + * @param grade grade calculated from the rubric + * @return grade + */ + public static double calculateGrade(boolean usedGit, boolean compiles, double grade) { + if (!usedGit || !compiles) { + return 1.0; + } + + return grade; + } + + public static boolean usesLambda() { + return IntStream.of(0, 2, 4, 6, 8, 10).map(i -> i * i) + .allMatch(i -> (i + 1) % 2 == 1); + } + + /** + * Tells you when the ta is happy. + * @param bringCake true if you brought cake + * @return happyness of the TA + */ + public static boolean taIsHappy(boolean bringCake) { + return bringCake; + } + +} diff --git a/src/test/java/grade/ProjectGradeTest.java b/src/test/java/grade/ProjectGradeTest.java new file mode 100644 index 0000000..a83e24f --- /dev/null +++ b/src/test/java/grade/ProjectGradeTest.java @@ -0,0 +1,48 @@ +package grade; + +import org.junit.Assert; +import org.junit.Test; + +public class ProjectGradeTest { + + private static final double DELTA = 0.001; + + @Test + public void getGoodGradeIfCorrect() { + + double grade = ProjectGrade.calculateGrade(true, true, 7.5); + + Assert.assertEquals(7.5, grade, DELTA); + } + + @Test + public void getBadGradeIfNotCompiles() { + + double grade = ProjectGrade.calculateGrade(true, false, 7.5); + + Assert.assertEquals(1, grade, DELTA); + } + + @Test + public void getBadGradeIfNotUsedGit() { + + double grade = ProjectGrade.calculateGrade(false, true, 7.5); + + Assert.assertEquals(1, grade, DELTA); + } + + @Test + public void testTaIsNotHappy() { + Assert.assertFalse(ProjectGrade.taIsHappy(false)); + } + + @Test + public void testTaIsHappy() { + Assert.assertTrue(ProjectGrade.taIsHappy(true)); + } + + @Test + public void testIsUsingLambda() { + Assert.assertTrue(ProjectGrade.usesLambda()); + } +} \ No newline at end of file