Difference between revisions of "AP Computer Science"

From WLCS
Line 4: Line 4:
 
* [https://docs.oracle.com/javase/tutorial/java/concepts/interface.html 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
+
** '''interface''' and '''implements''' keywordS
 
*# Interfaces do not have instance variables (you can have static final variables)
 
*# Interfaces do not have instance variables (you can have static final variables)
 
*# Interfaces only contain method signatures (no method bodies or implementations)
 
*# Interfaces only contain method signatures (no method bodies or implementations)

Revision as of 09:16, 19 March 2019

Tuesday (3/19/20)

Agenda:

  • Grade 2018 FRQ #2
  • Interfaces
    • Real-world interface examples (mouse, keyboard, num pad, calculator, head phones, etc)
    • interface and implements keywordS
    1. Interfaces do not have instance variables (you can have static final variables)
    2. Interfaces only contain method signatures (no method bodies or implementations)
    3. Classes can implement multiple interfaces
    4. Implementing an interface requires "implementing" the methods of the interface
  • Interface example walk-through

Homework:

Friday (3/15/19)

Agenda:

  • Free-response question rubric & grading
  • Abstract classes review
  • Complete Activity 24: Transactions

Homework:

Wednesday (3/13/19)

Warmup:

  • Hand-written free-response question (22 minutes)
    1. Read through all their given code and summary
    2. Every variable and method...
      1. What is the purpose of that variable or method?
      2. What are the input parameters of the method?
      3. What is returned by the method?
    3. WHEN READING...DO NOT FIXATE ON WRITING CODE

Agenda:

  • Free-response question rubric & grading

Monday (3/11/19)

  • English 11 Writing SOL - no class

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:

Archives