logotransparent.png

Legion of Learners

www.lol-101.com

  • Home

  • Classrooms

  • Courses

  • About Us

    • Executive Team
    • Board Members
  • Resources

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    sfolax6776
    Apr 12, 2019
      ·  Edited: Apr 12, 2019

    Test Prep 11 - Dynamic Binding, Interfaces and Abstract Classes

    in AP Computer Science A

    A. Dynamic Binding:

    1. When a super class type of object is declared, the reference(for instance, x) can point to either a _________ class object or a _________class object.

    2. If a method (say, do()) in super class is overridden in the subclass, in the above case, will x.do() call the super class version or sub class version?

    3. Down casting: if a super class reference points to a subclass object, and a "subclass only" method is called, a downcasting is needed to make the call otherwise compile time error will occur.

    B. Interfaces:

    1. The story of last digit.

    2. How many interfaces can a class implement? why?

    3. Can interface type be used to declare objects?

    C. Abstract Classes:

    1. What if a class implements only part of the interface?

    2. Can abstract classes become super classes?

    3. What if the abstract methods are not implemented in sub classes either?

    D. Comparable Interface:


    public interface Comparable{
    int compareTo(Object obj);
    }

    E. Challenge of the Week: All MC questions of Chapter 4.

    0 comments
    0
    0 comments

    Questions? Email us at legionoflearners@gmail.com or join our WeChat group!

    • lol-101dotcom

    ©2020 Legion of Learners