Instructor Resources for the Conditionals Assignment with SpaceSmasher

Targeted Outcomes:

  • Single If Statements
  • If/Else Statements
  • Nested If Statements
  • If Statements with Logical AND
  • If Statements with Logical OR
  • Nested If Statements
  • Multi-Way If/Else Statements with Default Else
  • Multi-Way If/Else Statements with Tail Else If
  • Switch Statements

Platforms:

  • Windows
  • Macintosh
  • Ubuntu (currently under development)

Student Assignment Website with Solutions:

  • Conditionals Assignment (distribute this to the students)
  • Solutions are built directly into the SpaceSmasherFunctionalAPI superclass.
    • Each TODO subclasses and transparently overrides methods in this API.
    • Grep for "SOLN" to easily find them (and yet students rarely find them).

Requirements:

Summary:

This is a set of exercises used to explore "if statements" (Selection Control Structures) in a Java game, wrapped up into an assignment. All programs make decisions using these structures, and choose to follow one logic path versus another depending on the Boolean question paired with the Selection Control Structure. Such decision-making statements exist in all programming languages that are Turing complete and are called by many names, including: if statements, if-then statements, if/else structures, branches, switches, conditions or conditional execution.
In this assignment, we'll build our understanding of Conditional Statements (or "if" statements) by building simple structures at first, and then working on longer if/else statements as the TODOs progress. This assignment and corresponding lab can be done exclusively or in any order, and are designed to supplement or replace similar exercises with an exciting digital sandbox for students to explore, to play with, and to experience Computer Science.

Suggested Approach: Set up the assignment project files in front of the students and walk the students through TODO 0 together.

Additional Resources:

Future Engagement Practices to Consider: