In this lesson, students will explore and learn the anatomy of classes. They will take a deeper dive into what the access specifier does, and how it can be used within programs to make data public or private. Students will learn about encapsulation and the responsibility programmers have to choose whether data should be accessible, modifiable, both or neither. This lesson corresponds with AP Computer Science A topic 5.1.
Students will be able to:
In this lesson, students will expand their knowledge of constructors. They will create constructors that take objects as a formal parameter. This lesson corresponds with AP Computer Science A topic 5.2.
Students will be able to:
In this lesson, students will learn how to document their programs using comments. Comments are important to programming because they allow others to easily interpret and use the program code correctly. They can also be used as a debugging tool. This lesson corresponds with AP Computer Science A topic 5.3.
Students will be able to:
In this lesson, students will examine accessor methods in more detail. This lesson corresponds with AP Computer Science A topic 5.4.
Students will be able to:
In this lesson, students will examine mutator methods in more detail. Mutator methods are often void methods used to change the value of instance and static variables. This lesson corresponds with AP Computer Science A topic 5.5.
Students will be able to:
In this lesson, students will examine writing classes in more detail. It is a good programming practice to avoid altering objects within methods unless the method specifically calls for alterations to the object. Accessor and getter methods make obvious changes to objects, but most methods should not attempt to make changes unless it’s explicitly necessary. This lesson corresponds with AP Computer Science A topic 5.6.
Students will be able to:
In this lesson, students will take a deeper look at static variables and methods. Static variables belong to the class, and all objects of a class share a single static variable. This lesson corresponds with AP Computer Science A topic 5.7.
Students will be able to:
This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…
EU Mod-2 Programmers use code to represent a physical object or nonphysical concept, real or imagined, by defining a class based on the attributes and/or behaviors of the object or concept. (LO’s 2.A, 2.B, 2.C, 2.D, 2.E, 2.F, 2.G)
EU Mod-3 When multiple classes contain common attributes and behaviors, programmers create a new class containing the shared attributes and behaviors forming a hierarchy. Modifications made at the highest level of the hierarchy apply to the subclasses. (LO’s 3.A)
In this lesson, students will learn about scope and access. The placement of a variable within a program affects the scope of the variable, meaning where it can be used and accessed in a program. Students will learn how to avoid scope and access errors by using method decomposition. This lesson corresponds with AP Computer Science A topic 5.8.
Students will be able to:
In this lesson, students will learn how the this
keyword can be used in programs. The keyword this
is a reference to the current object whose methods and constructors are being called. This lesson corresponds with AP Computer Science A topic 5.9.
Students will be able to:
this
In this lesson, students will explore several areas related to the ethical and societal implications of computing systems. This includes the professional computing code of ethics, system reliability, legal issues and intellectual property concerns, and bias in computing. This lesson corresponds with AP Computer Science A topic 5.10.
Students will be able to: