aboutsummaryrefslogtreecommitdiff
path: root/Info
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-03-20 19:16:16 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2024-03-20 19:16:16 +0100
commit2554147d0cc6c9bd76d6d7a415c3e5829e1ca7bb (patch)
treeafa541e1027c606f02120bf8f356cd2cc9388c20 /Info
parent573fface5bcd0cba9620816e774ff923e3f2e70c (diff)
downloadunterricht-2554147d0cc6c9bd76d6d7a415c3e5829e1ca7bb.tar.gz
unterricht-2554147d0cc6c9bd76d6d7a415c3e5829e1ca7bb.zip
improve my handout for reference arrays
Diffstat (limited to 'Info')
-rw-r--r--Info/23_24/02/20/10B/handout.tex12
1 files changed, 6 insertions, 6 deletions
diff --git a/Info/23_24/02/20/10B/handout.tex b/Info/23_24/02/20/10B/handout.tex
index a535a4c6..51fc07d9 100644
--- a/Info/23_24/02/20/10B/handout.tex
+++ b/Info/23_24/02/20/10B/handout.tex
@@ -10,9 +10,9 @@
\begin{tabular}{p{0.4\textwidth} p{0.1\textwidth} p{0.49\textwidth}}
\begin{defbox}{Syntax}
\begin{itemize}
- \item \textbf{Datentyp}:
- \item \textbf{Deklaration}:
- \item \textbf{Initialisierung}:
+ \item \textbf{Datentyp}: \solution{KLASSENNAME[]}
+ \item \textbf{Deklaration}: \solution{KLASSENNAME{} feldname;}
+ \item \textbf{Initialisierung}: \solution{feldname = new KLASSENNAME[laenge];}
\end{itemize}
\end{defbox} & &
@@ -23,10 +23,10 @@ class SPIELAUTOMAT {
$\solution{SPIELWALZEN[] walzen;}$
// SPIELAUTOMAT Konstruktor
- SPIELAUTOMAT($\solution{int n~~~~~~~~~}$) {
+ SPIELAUTOMAT($\solution{int n }$) {
// Initialisierung Spielwalzen Feld
$walzen = \solution{new SPIELWALZEN[n];}$
- for (int i = 0; i < $\solution{walzen.length~~~~~~~}$; i++) {
+ for (int i = 0; i < $\solution{walzen.length }$; i++) {
// Initialisierung der einzelnen Spielwalzen
$\solution{walzen[i] = new SPIELWALZE(i*100, 0);}$
$\solution{}$
@@ -89,7 +89,7 @@ font=\small}]
class SPIELAUTOMAT {
$\solution{SPIELWALZEN[] walzen;}$
- SPIELAUTOMAT($\solution{int n~~~~~~~~}$) {
+ SPIELAUTOMAT($\solution{int n }$) {
walzen = SPIELWALZE$\solution{[n];}$
}
...