some methods for teaching functions first using java
Many CS1 curricula introduce Java topics without giving a strong rationale of why they are needed at that exact point. For example, most all Java texts introduce the keywords public and private long before the students write or see any program involving more than a single class; those keywords can have no demonstrable effect on their program. Such an approach subtly but firmly sends the message "programming is not about problem-solving, but rather about putting certain keywords in the right place." We present a nonstandard arrangement of CS1 topics, guided by the following strategies: (a) simplify the mental model initially needed to understand Java syntax, (b) leverage parallels between programming and high school algebra and (c) demonstrate any new language construct via a program which could not be (easily) written without it. The resulting ordering helps students appreciate why they are learning language constructs, which in turn helps them distinguish syntax from programming principles.
functions first java cs1 high school algebra syllabus fundamentals first objects early objects late