Storyboard StudyRightWithAssignmentsStoryboard

1. (start situation/pre-condition) Karli enters the Study-Right University in the math room. Karli has no credits yet and still a motivation of 214.


      // =============================================================
      storyboard.add("1. (start situation/pre-condition) Karli enters the Study-Right University \n"
            + "in the math room. Karli has no credits yet and still a motivation of 214. ");

      storyboard.markCodeStart();
      University university = new University()
            .withName("StudyRight");

      Student karli = university.createStudents()
            .withId("4242")
            .withName("Karli");

      Assignment matrixMult = new Assignment()
            .withContent("Matrix Multiplication")
            .withPoints(5);

      Assignment series = new Assignment()
            .withContent("Series")
            .withPoints(6);

      Assignment a3 = new Assignment()
            .withContent("Integrals")
            .withPoints(8);

      Room mathRoom = university.createRooms()
            .withName("senate")
            .withTopic("math")
            .withCredits(17)
            .withStudents(karli)
            .withAssignments(matrixMult, series, a3);

      Room artsRoom = university.createRooms()
            .withName("7522")
            .withTopic("arts")
            .withCredits(16)
            .withDoors(mathRoom);

      Room sportsRoom = university.createRooms()
            .withName("gymnasium")
            .withTopic("sports")
            .withCredits(25)
            .withDoors(mathRoom, artsRoom);

      Room examRoom = university.createRooms()
            .withName("The End")
            .withTopic("exam")
            .withCredits(0)
            .withDoors(sportsRoom, artsRoom);

StudyRightWithAssignmentsStoryboardStep2.png

2. Karli does assignment a1 on Matrix Multiplication and earns 5 points
(general rule: the student earns always full points for doing an assignment).
Karli's motivation is reduced by 5 points to now 209.


      storyboard.add("2. Karli does assignment a1 on Matrix Multiplication and earns 5 points <br>\n"
            + "(general rule: the student earns always full points for doing an assignment). <br>\n"
StudyRightWithAssignmentsStoryboardStep5.png

3. Karli does assignment a2 on Series and earns another 6 points.
Thus Karli has 11 points now. Motivation is reduced to 203.


      // ===============================================================================================
      storyboard.add("3. Karli does assignment a2 on Series and earns another 6 points. <br>\n"
StudyRightWithAssignmentsStoryboardStep8.png

4. Karli does the third assignment on Integrals, earns
another 8 points and thus Karli has now 19 points and a motivation of 195.


      // ===============================================================================================
      storyboard.add("4. Karli does the third assignment on Integrals, earns <br>\n"
StudyRightWithAssignmentsStoryboardStep11.png

5. Since 19 points are more than the 17 points required for the 17 math credits, Karli hands the points in and earns the credits and has his assignmnet points reset to 0.
(General rule: if the points earned by the assignments are higher or equal than the credit points, the credit points will be awarded to the student.)


            + "and has his assignmnet points reset to 0. <br>\n"
            + "(General rule: if the points earned by the assignments are higher or equal than \n"
            + "the credit points, the credit points will be awarded to the student.)");

      storyboard.markCodeStart();
StudyRightWithAssignmentsStoryboardStep14.png

6. (end situation/post-condition) Karli has completed the math topic and moves to sports.

Check: Karli's credits: 17 actual 17

Check: Karli's assignment points: 0 actual 0

Check: Number of students: 1 actual 1