Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
Enigma
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlfaTrainingKurse
Java
Enigma
Wiki
Klasse_Walzen
Changes
Page history
New page
Templates
Clone repository
Update Klasse_Walzen
authored
5 years ago
by
Dennis Eisold
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Klasse_Walzen.md
+23
-0
23 additions, 0 deletions
Klasse_Walzen.md
with
23 additions
and
0 deletions
Klasse_Walzen.md
View page @
539157d6
### Beispiel
```
java
Walze
w1
=
new
Walze
(
3
);
w1
.
setzeNotch
(
13
);
Walze
w2
=
new
Walze
(
5
);
w2
.
setzeNotch
(
1
);
Walze
w3
=
new
Walze
(
1
);
w3
.
setzeNotch
(
20
);
String
codierterBuchstabe
=
w1
.
codiere
(
'A'
);
if
(
w1
.
dreheWalze
())
{
if
(
w2
.
dreheWalze
())
{
w3
.
dreheWalze
();
}
}
```
#### Funktionen und Methoden
*
Konstruktor(int walzennummer) => Setze Walze auf Nummer
*
setzeNotch(char position) => Setze Startpunkt auf Char
*
dreheWalze() return boolean => Wenn Notch erreicht, gib true zurück, ansonsten false
*
walzenPosition() return char => Gibt die aktuelle Position zurück
*
codiere(char buchstabe) return char => Gibt den verschlüsselten Buchstaben zurück
#### Originale Walzenbelegung
| Walze | A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
| ----- | ----- |
...
...
This diff is collapsed.
Click to expand it.