Skip to content

Commit f8b1065

Browse files
Web 0.14.19: Fünf Übungen öffnen Struktogramm und Code zusammen (#248)
Claude-Session: https://claude.ai/code/session_01Ugz28WsFncnVqF96ZZJzbu Co-authored-by: Claude <noreply@anthropic.com>
1 parent d492d9e commit f8b1065

22 files changed

Lines changed: 55 additions & 20 deletions

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The format is loosely inspired by Keep a Changelog.
1919

2020
### Added
2121

22+
- **Web 0.14.19, more exercises for both areas:** „Steckbrief in Java“ (L4), „Kinokarten in Java“ (L5), „Ticketpreis“ (L20), „Gerade Zahlen“ and „Wählen ab 16“ (L21) now use `bereich: beide`, so „Im Editor öffnen“ shows Struktogramm and Code together. Exercises without `code: java` keep the chosen language in Code (Python or JavaScript in L21) instead of switching to Java (de/en/pt).
2223
- **Web 0.14.14, rename a variable (refactoring):** right-click a variable name in the Code area (or press F2) and choose „Variable umbenennen …“; in the structure chart right-click an element, press F2 or use the new button in the object inspector. A small window shows the name, how often it is used and the new name. Every place with exactly the same spelling changes in the code and in the structure chart in one undo step (`zahl` and `Zahl` stay separate, matching the case-sensitivity exercises); text in "…", characters, comments and fields after a dot (`feld.length`) stay. Invalid names and Java keywords are refused; if the new name already exists, a warning says both would become one variable (all 21 languages).
2324
- **Web 0.14.13, no robot emoji in the world chooser:** the button „🤖 VisuBot“ in the gear menu and the start dialog is now just „VisuBot“, like the other worlds (Holger's wish).
2425
- **Web 0.14.12, the „Einrücken“ button also formats:** in the Code area the button no longer only fixes the spaces at the start of a line. It now puts every block brace `}` on its own line (`} else {`, `} catch`, `} while` of do-while stay together), one statement per line, and spaces around operators like `>=`, `=`, `&&`, `? :`, after commas and in `if (`/`) {`. It changes only whitespace between tokens, never joins lines, and is careful with array initialisers, generics, signs like `-1` and `(int) -x`, `import java.util.*`, pseudocode like `if (Alter über 18?)`, strings and comments. One undo step; breakpoints move with their line; with a selection only those lines. Nothing is reformatted while typing. New `web/src/core/javaFormat.ts` with tests (#244).

‎web/lessons/de/04-variablen-und-datentypen.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ Java tippst du im Bereich [Code](#zeige-codelive). Das Struktogramm entsteht dab
226226

227227
::: übung l04-java-steckbrief
228228
titel: Steckbrief in Java
229+
bereich: beide
229230
code: java
230231
auftrag: Schreibe einen Steckbrief für Ludwig den Geißbock. Lege drei Variablen an: den Namen **Ludwig**, das Alter **7** und die Größe **1.2**. Gib dann diese zwei Zeilen aus:
231232
**Ludwig ist 7 Jahre alt.** und **Größe: 1.2 m**

‎web/lessons/de/05-sequenz.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Java tippst du im Bereich [Code](#zeige-codelive) rechts neben dem Struktogramm.
104104

105105
::: übung l05-java-kino
106106
titel: Kinokarten in Java
107+
bereich: beide
107108
code: java
108109
auftrag: Eine Kinokarte kostet 9 Euro. Schreibe ein Java-Programm, das den Preis für 3 Karten ausrechnet und **Gesamt: 27** ausgibt.
109110
„Im Editor öffnen“ öffnet rechts auch den Bereich Code. Tippe dort deinen Code, das Struktogramm entsteht dabei von selbst. Klicke dann auf Prüfen.

‎web/lessons/de/20-java.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ Im Struktogramm gibt es kein `else if`. Dort steckt eine zweite Verzweigung im N
305305

306306
::: übung l17-ticket
307307
titel: Ticketpreis
308+
bereich: beide
308309
auftrag: Frage nach dem Alter als ganze Zahl und baue den Java-Code oben als Struktogramm nach.
309310
test: 5 -> Eintritt frei
310311
test: 6 -> Kinderticket: 4 Euro

‎web/lessons/de/21-python-und-javascript.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ for i in range(0, grenze + 1, 2):
112112

113113
::: übung l18-python
114114
titel: Gerade Zahlen
115+
bereich: beide
115116
auftrag: Baue das Python-Programm oben als Struktogramm mit einer For-Schleife nach. Bei der Grenze 7 gibt es 0, 2, 4 und 6 aus.
116117
test: 7 -> 0 | 2 | 4 | 6
117118
test: 4 -> 0 | 2 | 4
@@ -136,6 +137,7 @@ if (alter >= 16) {
136137

137138
::: übung l18-js
138139
titel: Wählen ab 16
140+
bereich: beide
139141
auftrag: Baue den JavaScript-Code oben als Struktogramm nach. Teste danach in der Code-Ansicht mit **JavaScript** und **Im Browser testen**, ob dein Code dasselbe ausgibt wie die Simulation.
140142
test: 12 -> Noch 4 Jahre warten.
141143
test: 16 -> Du darfst wählen.

‎web/lessons/en/04-variablen-und-datentypen.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ You type Java in the [Code](#zeige-codelive) area. The structure chart builds it
226226

227227
::: übung l04-java-steckbrief
228228
titel: Profile in Java
229+
bereich: beide
229230
code: java
230231
auftrag: Write a profile of Ludwig the billy goat. Create three variables: the name **Ludwig**, the age **7** and the height **1.2**. Then output these two lines:
231232
**Ludwig is 7 years old.** and **Height: 1.2 m**

‎web/lessons/en/05-sequenz.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ You type Java in the [Code](#zeige-codelive) area to the right of the structure
104104

105105
::: übung l05-java-kino
106106
titel: Cinema tickets in Java
107+
bereich: beide
107108
code: java
108109
auftrag: A cinema ticket costs 9 euros. Write a Java program that calculates the price of 3 tickets and outputs **Total: 27**.
109110
“Open in editor” also opens the Code area on the right. Type your code there; the structure chart builds itself. Then click Check.

‎web/lessons/en/20-java.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ There is no `else if` in a structure chart. There, a second branch sits in the f
305305

306306
::: übung l17-ticket
307307
titel: Ticket price
308+
bereich: beide
308309
auftrag: Ask for the age as a whole number and rebuild the Java code above as a structure chart.
309310
test: 5 -> Free entry
310311
test: 6 -> Child ticket: 4 euros

‎web/lessons/en/21-python-und-javascript.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ for i in range(0, limit + 1, 2):
112112

113113
::: übung l18-python
114114
titel: Even numbers
115+
bereich: beide
115116
auftrag: Rebuild the Python program above as a structure chart with a for loop. With the limit 7 it outputs 0, 2, 4 and 6.
116117
test: 7 -> 0 | 2 | 4 | 6
117118
test: 4 -> 0 | 2 | 4
@@ -136,6 +137,7 @@ if (age >= 16) {
136137

137138
::: übung l18-js
138139
titel: Voting from 16
140+
bereich: beide
139141
auftrag: Rebuild the JavaScript code above as a structure chart. Then test in the code view with **JavaScript** and **Test in browser** whether your code outputs the same as the simulation.
140142
test: 12 -> Wait 4 more years.
141143
test: 16 -> You may vote.

‎web/lessons/pt/04-variablen-und-datentypen.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ Escreves Java na área [Código](#zeige-codelive). O estrutograma constrói-se s
226226

227227
::: übung l04-java-steckbrief
228228
titel: Ficha em Java
229+
bereich: beide
229230
code: java
230231
auftrag: Escreve a ficha do Ludwig, o bode. Cria três variáveis: o nome **Ludwig**, a idade **7** e a altura **1.2**. Depois mostra estas duas linhas:
231232
**Ludwig tem 7 anos.** e **Altura: 1.2 m**

0 commit comments

Comments
 (0)