Skip to content

Commit

Permalink
update sample exams (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
appenmaier authored Nov 10, 2023
1 parent 868a805 commit e81a7aa
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 47 deletions.
52 changes: 26 additions & 26 deletions docs/additional-material/daniel-java1/sample-exam.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ classDiagram
Class o-- CourseOfStudies
class Class {
-description: String
-courseOfStudies: CourseOfStudies
-lectures: List~Lecture~
-students: List~Student~
-description: String &#123final&#125
-courseOfStudies: CourseOfStudies &#123final&#125
-lectures: List~Lecture~ &#123final&#125
-students: List~Student~ &#123final&#125
+Class(description: String, courseOfStudies: CourseOfStudies)
+description() String
+courseOfStudies() CourseOfStudies
Expand All @@ -136,17 +136,17 @@ classDiagram
}
class Student {
-matriculationNumber: String
-name: String
-matriculationNumber: String &#123final&#125
-name: String &#123final&#125
+Student(matriculationNumber: String, name: String)
+matriculationNumber() String
+name() String
+toString() String
}
class Lecture {
-description: String
-creditPoints: int
-description: String &#123final&#125
-creditPoints: int &#123final&#125
+Lecture(description: String, creditPoints: int)
+description() String
+creditPoints() int
Expand All @@ -158,7 +158,7 @@ classDiagram
WI = Wirtschaftsinformatik
INF = Informatik
BWL = Betriebswirtschaftslehre
-description: String
-description: String &#123final&#125
}
class ExamTask02 {
Expand All @@ -185,10 +185,10 @@ classDiagram
```java title="Class.java" showLineNumbers
public class Class { // 0,5

private String description; // 0,25
private CourseOfStudies courseOfStudies; // 0,25
private List<Lecture> lectures; // 0,25
private List<Student> students; // 0,25
private final String description; // 0,25
private final CourseOfStudies courseOfStudies; // 0,25
private final List<Lecture> lectures; // 0,25
private final List<Student> students; // 0,25

public Class(String description, CourseOfStudies courseOfStudies) { // 0,5
this.description = description; // 0,25
Expand Down Expand Up @@ -381,9 +381,9 @@ classDiagram
}
class Player {
-name: String
-name: String &#123final&#125
-healthPoints: int
-dice: Dice
-dice: Dice &#123final&#125
+Player(name: String)
+name() String
+getHealthPoints() int
Expand Down Expand Up @@ -433,9 +433,9 @@ Hans gewinnt
```java title="Player.java" showLineNumbers
public class Player { // 0,5

private String name; // 0,25
private final String name; // 0,25
private int healthPoints; // 0,25
private Dice dice; // 0,25
private final Dice dice; // 0,25

public Player(String name) { // 0,5
this.name = name; // 0,25
Expand Down Expand Up @@ -528,34 +528,34 @@ classDiagram
Recipe o-- Ingredient
class CookieJar {
-cookies: List~Cookie~
-cookies: List~Cookie~ &#123final&#125
+CookieJar()
+addCookie(cookie: Cookie) void
+getStuffedCookie() StuffedCookie
}
class Cookie {
-name: String
-dough: Recipe
-name: String &#123final&#125
-dough: Recipe &#123final&#125
+Cookie(name: String, dough: Recipe)
+getIngredients() List~Ingredient~
}
class StuffedCookie {
-jam: Recipe
-jam: Recipe &#123final&#125
+StuffedCookie(name: String, dough: Recipe, jam: Recipe)
+getIngredients() List~Ingredient~
}
class Recipe {
-name: String
-ingredients: List~Ingredient~
-name: String &#123final&#125
-ingredients: List~Ingredient~ &#123final&#125
+Recipe(name: String)
+addIngredient(ingredient: Ingredient) void
}
class Ingredient {
-name: String
-name: String &#123final&#125
+Ingredient(name: String)
}
Expand Down Expand Up @@ -597,7 +597,7 @@ Zucker
```java title="StuffedCookie.java" showLineNumbers
public class StuffedCookie extends Cookie { // 1

private Recipe jam; // 0,25
private final Recipe jam; // 0,25

public StuffedCookie(String name, Recipe dough, Recipe jam) { // 0,5
super(name, dough); // 1
Expand All @@ -622,7 +622,7 @@ public class StuffedCookie extends Cookie { // 1
```java title="CookieJar.java" showLineNumbers
public class CookieJar { // 0,5

private List<Cookie> cookies; // 0,25
private final List<Cookie> cookies; // 0,25

public CookieJar() { // 0,5
cookies = new ArrayList<>(); // 0,25
Expand Down
42 changes: 21 additions & 21 deletions docs/additional-material/daniel-java2/sample-exam.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ classDiagram
class SuperHuman {
<<abstract>>
-name: String
-universe: Universe
-power: int
-name: String &#123final&#125
-universe: Universe &#123final&#125
-power: int &#123final&#125
+SuperHuman(name: String, universe: Universe, power: int)
+name() String
+universe() Universe
Expand All @@ -65,9 +65,9 @@ classDiagram
class SuperLeague~T extends SuperHuman~ {
<<record>>
-name: String
-universe: Universe
-members: Map~T, Boolean~
name: String
universe: Universe
members: Map~T, Boolean~
+addSuperHuman(t: T) void
+getMostPowerfulSuperHuman() Optional~T~
+getAllAvailableSuperHumans() List~T~
Expand Down Expand Up @@ -169,9 +169,9 @@ classDiagram
class SuperHuman {
<<abstract>>
-name: String
-universe: Universe
-power: int
-name: String &#123final&#125
-universe: Universe &#123final&#125
-power: int &#123final&#125
+SuperHuman(name: String, universe: Universe, power: int)
+name() String
+universe() Universe
Expand All @@ -194,9 +194,9 @@ classDiagram
class SuperLeague~T extends SuperHuman~ {
<<record>>
-name: String
-universe: Universe
-members: Map~T, Boolean~
name: String
universe: Universe
members: Map~T, Boolean~
+addSuperHuman(t: T) void
+getMostPowerfulSuperHuman() Optional~T~
+getAllAvailableSuperHumans() List~T~
Expand Down Expand Up @@ -277,18 +277,18 @@ classDiagram
class Single {
<<record>>
-name: String
-artist: Artist
-salesInMillions: int
-publishingYear: String
name: String
artist: Artist
salesInMillions: int
publishingYear: String
}
class Artist {
<<record>>
-name: String
-country: Country
-birthdate: LocalDate
-isAlive: boolean
name: String
country: Country
birthdate: LocalDate
isAlive: boolean
}
class Country {
Expand All @@ -304,7 +304,7 @@ classDiagram
class SingleQueries {
<<record>>
-singles: List~Single~
singles: List~Single~
+printAllSinglesWithMoreThan25MillionSalesPerCountry() void
+printAverageBirthYearOfAllDeceasedArtists() void
+isAnySingleFromChinaWithMoreThan10MillionSales() boolean
Expand Down

0 comments on commit e81a7aa

Please sign in to comment.