1/44
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Object
An abstract entity that is made up of data/attributes and behaviours/methods.
Private
It restricts access to certain class members,
only accessible within the class in which it is defined
Public
The entire class is public and accessable to other classes. This includes methods, variables, etc.
Static
Whatever is defined as static means that it belongs to the class.
Protected
Allows class members within same class and by subclasses even if in different packages
Extends
transfers use of parent class operations and methods to subclass
Class
module consisting methods and/or variables and may define a custom data type
Instantiation
process of creating object from class
UML Diagram
visual representation of the design of a system before coding (relationship between attributes, methods and classes)
Relationships
3 types: is-a: one type is subtype of another, has-a: one type includes instance of another, uses: one portion of the program relies on another;
connections between classes in UML diagram
Dependencies
another term for ââusesâ relationship in UML
Constructing Objects
creating instances of classes, initializing attributes.
Data Types
2 types: Reference (String, Double, Integer, Boolean) and Primitive (int, double, char, boolean);
Parameter
value passed into a constructor
Encapsulation
restricting unauthorized access to objectâs data, only allowing controlled access through Accessor and Mutator methods
Inheritance
relationship that allows use of inheriting properties and methods from parent class, to reuse and organize code
Polymorphism
code written without knowledge of which specific data types it will operate on
Advantage of Encapsulation
modify implemented code, without breaking code of others who use our code: maintainability, flexibility, extensibility
Advantage of Inheritance
minimize amount of duplicate code in an application, by reusing code amongst several subclasses
Advantage of Polymorphism
Overriding: allows a class to specify methods that will be common to all of its derivatives, while allowing sub classes to define the specific implementation of some or all of those methods
Advantage of Libraries
Advantage of OOP
Disadvantage of OOP
Programming Teams
Advantage of Modularity
Modularity
Identifier
Primitive
Instance
Variable
Perimeter Variable
Local Variable
Method
Accessor
Mutator
Constructor
Signature
Return Value
Static Array
Potential Ethical Issues
Potential Social Issues
Recursion
Abstract Data Types
Styling Conventions
Methods for Stacks and Queues
Stacks: Pop, Push, isEmpty, hasNext
Queues: Enqueue, Dequeue, isEmpty, hasNext