Congratulations! You have finally made it to the last AP Computer Science blog! This is the last piece of information that you need to know to succeed on the AP Computer Science Exam! However, inheritance is also considered the hardest unit by beginning coders nationwide! But, it doesn't have to be this way; this blog will explain step by step how to ace this section! Without further ado, Let's get started!
Vocabulary
Abstract class - a class that has 1 or more abstract methods
Abstract Methods - methods that only have a method header and will be written in another file
Ancestor - any class above a parent class
Bottom-up development - a development strategy where independent classes are written first and then classes that only use other classes that are completed next
Child class/subclass - class doing the extending
Descendant - any class below a class's child
Dynamic Type - runtime type for an object
Extending - setting a class's parent class
Has-A relationship - an object has an attribute of a given type
Independent Class - a class that doesn't store, extend, or implement any other class, abstract class or interface in the project
Inheritance - gaining attributes, constructors, methods from a class's parent/constructor
instanceof - keyword used to determine if a variable's data is of a given type
is-a relation - an object is derived from another class, abstract class, or interface
Method overriding - overriding a parent's/ancestor's method by rewriting it
Parent class/Superclass - a class that's being extended from
Static type - compile-time type for a variable
Top-down development - a Development strategy where large broad classes are built to achieve the goals of the project and then the code is modified to accommodate the use of smaller more defined classes
UML Diagrams - diagrams that show how classes relate to each other
Notes:
COMING SOON!
Hopefully, that clears up any worries or concerns! With that said, that's it! Everything tested on the 2020 AP Exam for APCSA has already been covered. Look back on the past units if you wanted a refresher course for any of the other subjects. Honestly, the best thing to do now is to continue coding!
I hope it helps and happy coding/cramming! Until next time. :)
Comments