Re: Question about the package directive
Roedy Green <see_website@mindprod.com.invalid> writes:
It claims ?Statements end in a semicolon ;? and
?A while loop runs everything within its block?
in chapter 1 in ?Bullet Points? near ?Example of a while loop?.
Consider the audience. That is perfectly adequate for a
beginning book.
You can't explain everything all at once
Using correct assertions here isn't more difficult:
?Simple statements end in a semicolon.
The block is a compound statement.
A while loop might execute its statement several times.?
The while loop already is a more complex statement. If the
audience consists of absolute beginners in programming, it
might appear too early in the book.
In my classes, I take some time to introduce simple statements
(expression statements) and blocks and then do several
exercises related to them, so that everyone gets a firm grip
of these concepts. So there is no need to make false claims.
I even discuss the false belief that ?all statements end in
a semicolon? in an exercise, where the pupils are asked to
review this statement.
I often do not treat loops at all, or only when asked about
them. For the audience I encounter when I am giving adult
evening classes about Java, this book already is too fast and
thus too difficult.