Skip to content

Commit

Permalink
Merge pull request #3 from homberghp/main
Browse files Browse the repository at this point in the history
Corrected typos, dates and versions in the index, setup and tips.
  • Loading branch information
ibrahimko authored Feb 20, 2024
2 parents 8d5d644 + a75d3d7 commit 91177d5
Show file tree
Hide file tree
Showing 49 changed files with 1,672 additions and 152 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ node_modules
**/target

**/.vscode

2 changes: 1 addition & 1 deletion content/_index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ draft: false
This site contains the up-to-date course material, exercises and announcements about PRC2
(Programming Concepts 2: the Test Driven Way), starting in February 2023.

Responsible Teachers for 2023 PRC2:
Responsible Teachers for 2024 PRC2:

- Martijn Bonajo
- Ibrahim Kouzak
Expand Down
3 changes: 2 additions & 1 deletion content/docs/week02.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ include::{topics}/parameterizedtests.adoc[]
[TIP]
====
Think test driven! So write tests FIRST, and then code. Testing is ensuring that the code is usable.
To make code testable is also a design exercise: you need to make decisions about the design of your program when you write your tests. If you cannot test it, you cannot use it.
To make code testable is also a design exercise: you need to make decisions about the design of your program when you write your tests. If you have no idea how to test it,
you are equally clueless about how to use the designed classes.
====

== Links
Expand Down
4 changes: 3 additions & 1 deletion content/docs/week04.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ include::{topics}/generics.adoc[]

== Reading

* Horstmann, Ed 11, chapter 8, Generic Programming section 8.1-8.8
* Horstmann, Ed 12, chapter 8, Generic Programming section 8.1-8.8


26 changes: 26 additions & 0 deletions content/docs/week99.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: "99 Left Over"
description: "Pattern matching for Records"
date: 2024-01-22T10:31:29+02:00
draft: true
images: []
slug: "j17-21"
menu:
docs:
parent: ""
weight: 110
toc: true
:stem: latexmath

---
// added images and show how to include source code and latex

include::{topics}/instanceof.adoc[]

include::{topics}/patternmatching.adoc[]

include::{topics}/switchexpressions.adoc[]

include::{topics}/sealedtypes.adoc[]


16 changes: 13 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"tailwindcss": "^3.0.17"
},
"dependencies": {
"font-awesome": "^4.7.0"
"font-awesome": "^4.7.0",
"mathjax": "^3.2.2"
}
}
247 changes: 247 additions & 0 deletions static/images/sealedshapes.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
232 changes: 232 additions & 0 deletions static/images/sealedshapes.uxf
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="15.1">
<zoom_level>10</zoom_level>
<element>
<id>UMLClass</id>
<coordinates>
<x>480</x>
<y>70</y>
<w>320</w>
<h>130</h>
</coordinates>
<panel_attributes>*&lt;&lt;sealed interface&gt;&gt;*
template=S
/BasicShape/
--
+ area(): double
+ compareTo( other: BasicShape): int
bg=#ccffcc</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>500</x>
<y>250</y>
<w>170</w>
<h>90</h>
</coordinates>
<panel_attributes>{record}
Circle
--
- center: BasicPoint
- radius: double
--</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>50</x>
<y>80</y>
<w>280</w>
<h>140</h>
</coordinates>
<panel_attributes>{record}
BasicPoint
--
- x: double
- y: double
--
+ distancle(other BasicPoint): double</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>510</x>
<y>360</y>
<w>250</w>
<h>70</h>
</coordinates>
<panel_attributes>{record}
Rectangle
--
- topLeft, bottomRight: BasicPoint</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>630</x>
<y>470</y>
<w>210</w>
<h>50</h>
</coordinates>
<panel_attributes>Triangle
--
- a,b,c: BasicPoint</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>510</x>
<y>190</y>
<w>30</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;.</panel_attributes>
<additional_attributes>10.0;10.0;10.0;60.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>320</x>
<y>110</y>
<w>180</w>
<h>40</h>
</coordinates>
<panel_attributes>lt=&lt;.
&lt;uses&gt;</panel_attributes>
<additional_attributes>10.0;20.0;160.0;20.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>320</x>
<y>150</y>
<w>200</w>
<h>150</h>
</coordinates>
<panel_attributes>lt=&lt;-
&lt;contains&gt;
m1=1
m2=1
</panel_attributes>
<additional_attributes>10.0;10.0;70.0;10.0;110.0;120.0;180.0;120.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>320</x>
<y>170</y>
<w>210</w>
<h>260</h>
</coordinates>
<panel_attributes>lt=&lt;-
&lt;contains&gt;
m1=2
m2=1
</panel_attributes>
<additional_attributes>10.0;10.0;60.0;10.0;110.0;230.0;190.0;230.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>320</x>
<y>200</y>
<w>330</w>
<h>320</h>
</coordinates>
<panel_attributes>lt=&lt;-
&lt;contains&gt;
m1=3
m2=1
</panel_attributes>
<additional_attributes>10.0;10.0;50.0;10.0;110.0;290.0;310.0;290.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>620</x>
<y>190</y>
<w>100</w>
<h>190</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;.</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0;80.0;50.0;80.0;170.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>710</x>
<y>190</y>
<w>110</w>
<h>300</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;.</panel_attributes>
<additional_attributes>10.0;10.0;10.0;40.0;90.0;40.0;90.0;280.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>770</x>
<y>130</y>
<w>220</w>
<h>380</h>
</coordinates>
<panel_attributes>lt=-&gt;&gt;&gt;
permits v
fg=#008800
lw=2
</panel_attributes>
<additional_attributes>10.0;10.0;130.0;10.0;130.0;360.0;70.0;360.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>660</x>
<y>130</y>
<w>190</w>
<h>160</h>
</coordinates>
<panel_attributes>lt=-&gt;&gt;&gt;
fg=#008800
lw=2

</panel_attributes>
<additional_attributes>120.0;10.0;170.0;10.0;170.0;130.0;10.0;130.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>750</x>
<y>130</y>
<w>140</w>
<h>270</h>
</coordinates>
<panel_attributes>lt=-&gt;&gt;&gt;
fg=#008800
lw=2
</panel_attributes>
<additional_attributes>30.0;10.0;120.0;10.0;120.0;250.0;10.0;250.0</additional_attributes>
</element>
<element>
<id>UMLNote</id>
<coordinates>
<x>30</x>
<y>270</y>
<w>340</w>
<h>120</h>
</coordinates>
<panel_attributes>The interface BasicShape permits
implementations Circle, Rectangle,
and Triangle.

Note that 'permits' has no
icon in UML. We used a closed triangle here.
</panel_attributes>
<additional_attributes/>
</element>
</diagram>
Loading

0 comments on commit 91177d5

Please sign in to comment.