Aleana Cologne wrote:
•You're using parallel lists. Instead, encapsulate parallel elements in objects and maintain a single list.
•Use Java conventions for capitalization. Instance fields should be in camel-case, starting with a lower-case letter.
•Your variable names are unreadable. Don't use names like fz, untilC, p or pf. Use descriptive names. Characters don't cost anything.
•Put spaces after commas and semi-colons, not before, put spaces around operators, and put spaces before opening braces.
•Put 'then'-clauses on a separate line from the if-condition.
•If two 'else-if' statements have the same 'then'-clause, then just perform a union over their conditions with the || operator.
•Use consistent indentation: Block statements with the same scope should be indented with the same whitespace.
•Don't modify loop variables inside the loop. Instead of forcing i to the last index, use a break statement.
•Use early returns instead of result variables: Get rid of the ok variable.
•Don't declare variables before you use them.
. . . but there is a risk of introducing new errors in the translating process, so it is often better to use copy'n'paste and keep the German/French/Spanish/Japanese/Tamil variable names.
Aleana Cologne wrote:. . . Yes, I know all Code should be written in english . . .
There I was thinking, “That should read abholDatum and rueckGabeDatum,” but then I remembered that Deutsch allows almost infinite scope for concatenating words, so camelCase is alien to German grammar.
Stephan van Hulst wrote:. . . when you write code in German, use variable names like fahrzeug, abholdatum and rueckgabedatum . . .
I'm really happy that as a teacher, you are performing research before giving your pupils an assignment. For that, have a cow!