Difference between revisions of "AP Computer Science"
From WLCS
Line 7: | Line 7: | ||
* Abstract classes review | * Abstract classes review | ||
* Complete Activity 24: Transactions | * Complete Activity 24: Transactions | ||
− | * Interfaces | + | * [https://docs.oracle.com/javase/tutorial/java/concepts/interface.html Interfaces] |
** Real-world interface examples (mouse, keyboard, num pad, calculator, head phones, etc) | ** Real-world interface examples (mouse, keyboard, num pad, calculator, head phones, etc) | ||
− | ** implements keyword | + | ** '''implements''' keyword |
+ | *# Interfaces do not have instance variables (you can have static final variables) | ||
+ | *# Interfaces only contain method signatures (no method bodies or implementations) | ||
+ | *# Classes can '''implement''' multiple interfaces | ||
+ | *# Implementing an interface requires "implementing" the methods of the interface | ||
== Thursday (3/7/19) == | == Thursday (3/7/19) == |
Revision as of 21:54, 12 March 2019
Monday (3/11/19)
Warmup:
- Hand-written free-response question (22 minutes)
Agenda:
- Free-response question rubric & grading
- Abstract classes review
- Complete Activity 24: Transactions
- Interfaces
- Real-world interface examples (mouse, keyboard, num pad, calculator, head phones, etc)
- implements keyword
- Interfaces do not have instance variables (you can have static final variables)
- Interfaces only contain method signatures (no method bodies or implementations)
- Classes can implement multiple interfaces
- Implementing an interface requires "implementing" the methods of the interface
Thursday (3/7/19)
Agenda:
- Confirm that you have completed the Albert.io Inheritance & Polymorphism assignment
- Questions?
- Method overriding review & example
- Complete eIMACS: Lab 4: Inventory Tracking
- static keyword (for methods or for variables)
- binds the method or variable to the class NAME as opposed to the object instance
- static method example
- static variable example
- final keyword
- makes the variable unchangeable
- final variable example
- abstract keyword
- Abstract classes walk-through (Animal->Mammal, Fish, Bird)
- Object instances of abstract classes are *not* allowed
- Derived sub-classes of abstract classes must implement abstract methods (unless the sub-class is also abstract)
Tuesday (3/5/19)
Agenda:
- Confirm that you have completed Activity 19
- Complete the Albert.io Inheritance & Polymorphism assignment
- Complete eIMACS: Lab 4: Inventory Tracking