The Old Advanced Level

As students move to the old Advanced level, they are introduced to mutable data for the first time. This change in perspective allows us to make several extensions to the language.

The introduction of mutable data goes hand in hand with the explicit use of the final keyword--students must now mark the data they do not want to be mutable as "final". Explicit visibility modifiers may now be used for fields and variables. For, while, and do loops, as well as switch statements are now allowed, though students cannot make assignments in the conditional expression of the loops and the switch expression of the switch statement. This should help students avoid a common error of using "=" instead of "==". Students can get around this restriction by nesting the assignment in parentheses--for instance ((i=5)) rather than (i=5). Break and continue statements are also allowed because they are useful with loops. We restrict switch statements further by not allowing fall through in any switch case, including the last one, and by enforcing that if there is a default case, it must be the last case in the block. A label in a switch statement can only be a character constant, integer constant, or a negative sign followed by an integer constant--not an arbitrary constant expression. Mutable data also means that arrays are now a useful data type, so we support the use of arrays at this level. And, mutable data means that void return methods make sense in some cases, so they are also allowed.

The language is more flexible in other areas at this level as well. We allow non-static fields to be assigned a value where they are declared, thus giving students more freedom in what arguments need to be passed to the constructor. In addition, we allow static methods as well as static fields at the Advanced level. Nested classes and interfaces, both static and dynamic, are also supported at the Advanced level.

No code augmentation is done at the Advanced Level.

The Strategy, State, Decorator, and Model-View-Controller design patterns can all be taught at this level.

Please note that this final level is still under development and may not be fully functional. It will be finished soon.