Sprint 6

Roadmap:

  • Team assignments: Section A; Section B
  • Start: Tu 11/28
  • End: Quiz Thu 12/7
  • Requirements Due: beginning of class, Thu 12/7

Rationale:

Java offers numerous pre-built classes that allow programmers to work with common, complex ideas by creating instances of those classes called objects (for example, the most common object we have used to far is String). These pre-built classes are great in many situations because they relieve the programmer of the responsibility of writing code to use the ideas. In Sprint 1, we read API documentation to learn about the available methods for creating and manipulating objects without having to know how exactly the constructors and other methods worked. But what if we want to work with an idea for which Java does not have a pre-built class? We could simply use the native data types but managing the data quickly becomes a headache. As the use of the idea grows throughout other code, the headache worsens. Fortunately, Java allows for programmers to define their own classes and create objects of those class types.

In this sprint, we learn about the fundamentals of implementing classes.

Responsibilities (What you need to know):

  • Review key Ch. 2 concepts from Sprint 1
    • (2.3) methods, arguments, return types, calls
    • (2.4) Constructing objects
    • (2.5) Accessor and mutator methods
    • (2.6) Reading the API documentation
    • (2.7) Implementing a test program
  • Concepts
    • (3.1.1) Understand the concept of an instance variable
    • (3.1.2) Understand the basics of implementing accessors and mutators
    • (3.1.3) Understand the concept of encapsulation
    • (3.2) Understand how to comment the public interface
    • (3.2) Be able to name a class
  • Instance variables
    • (3.1.1) Understand the concept of an instance variable
    • (3.3) Be able to declare an instance variable
  • Constructors
    • (3.2) Be able to specify a constructor (with or without arguments/parameters)
    • (3.3) Be able to implement a constructor (with or without arguments/parameters)
  • Methods
    • (3.2) Be able to specify a method (with or without arguments/parameters)
    • (3.3) Be able to implement a method (with or without arguments/parameters)
    • (3.5) Understand how to trace an object and simulate the operation of an object on paper
    • (3.6) Understand when and how to use local variables in methods
    • In particular, ensuring to avoid using variable names that match instance variable names

Requirements (What you need to do):

Individual Requirements:

  • Understand the concepts on the Responsibilities list.

Team Requirements:

  • Complete the code in this project. All instructions are contained in the project comments.

Resources:

Learning Resources:

References:

Practice:

More information may be posted later; use expert requests to ask for additional materials

Reality Check:

In a traditional classroom we might adopt this schedule:

  • Tuesday in class:
      • Lecture on implementing classes, implement Phoenix Card all together
  • Homework for Thursday:
      • Do online practice problems listed above
  • Thursday in class:
      • Start warm-ups and requirements in teams
  • Homework for Tuesday:
      • Finish warm-ups and requirements
  • Tuesday in class:
      • Get all work checked and fix errors.
      • Engage in quiz review game.
  • Homework for Thursday:
      • Practice and review for quiz
  • Thursday in class:
      • Take quiz