M/F 2:30-3:20 |
CS 1130: Transition to OO Programming Spring 2016 |
Main
About: Overview Announcements Staff Consultants Calendar Materials: Texts DrJava Terminology Lectures: In-Class Web-Based VideoNote Assessment: Grading Assignments Labs Resources: CMS Piazza (link) Piazza (about) Java API Style Guide Academic Integrity |
Module 2, Part 2More on OO ProgrammingIn this part, we discuss a bunch of object-oriented concepts in Java. Contents1. Static ComponentsWeb Lecture
Reading:
Lecture Notes
(Lecture Slides) Comments: Only one copy of a static variable or method exists, and it resides in the class file drawer. 2. The Bottom-Up Rule
Reading:
Lecture Notes
Comments:
The bottom-up rule (also called the method-overriding rule) 3. The Inside-Out RuleWeb Lecture
Reading:
Lecture Notes
(Lecture Slides) Comments: >Within a construct one can reference variables and methods declared in that construct and in surrounding constructs. 4. The Class InvariantWeb Lecture
Reading:
Lecture Notes
(Lecture Slides) Comments: The set of constraints given in the documentation of the fields of a class constitute the class invariant. We show why you should be careful in writing and using it. 5. Calling Constructors from ConstructorsWeb Lecture
Reading:
Lecture Notes
(Lecture Slides) Comments: Within a constructor, one can call a constructor in the same class or in the superclass. Such a call must be the first statement of the constructor body. 6. The Default ConstructorWeb Lecture
Reading:
Lecture Notes
Comments:
If you do not declare a constructor in a class 7. Casting About
Reading:
Gries/Gries, Sec. 4.2, pp. 148–153
Comments:
We extend the notion of narrower and wider types to class types and show the consequences thereof.
We also introduce operator 8. Apparent and Real ClassesWeb Lecture
Reading:
Lecture Notes
(Lecture Slides) Comments: The apparent class of a variable is a syntactic property; its real class is a semantic property. We show how each is used. 9. Function
Web Lecture
|