Object-oriented programming Flashcards
What is encapsulation?
A key aspect of OOP - bundling together data and methods that operate on the data into a single unit called a class.
What is abstraction?
Refers to hiding the internal implementation details of an object. This is achieved in object-oriented programming by providing access to a set of methods and attributes. The “user” of the class doesn’t need to know how the functionality is achieved, they can just call the appropriate method.
What is inheritance?
The ability to derive one class from another to inherit its attributes and methods. Additional attributes can be defined in the parent class.
What is generalisation?
The technique of representing the essential characteristics of an entity (these include attributes and methods) into a base class. Specialisation is achieved by creating subclasses with additional attributes and new/overridden methods.
What is polymorphism?
he ability for methods of the same name to perform different operations. This is achieved using inheritance and overriding methods in the base class, or writing different implementations of the same method for each subclass.
What is a class?
A blueprint for creating objects, providing a means of storing information in objects (attributes) and defining functionality (methods).
What are objects?
Instances of a class.
What is an attribute?
Variables stored in an object. These are generally initialised when the object is created, but can be modified by class methods or from outside the class.
What is a method?
Subroutines defined within a class, that typically operate on the attributes of the object, but may also be passed parameters.
What does the term member refer to?
The collective name for attributes and methods of a class/object.
What is a Level 0 Data Flow Diagram?
A Level 0 data flow diagram (also called a context diagram) provides a way to visualise the inputs into the system, the outputs from the system and any entities (people/organisations) involved.
How do higher level data flow diagrams differ from Level 0 data flow diagrams?
While a Level 0 Data Flow Diagrams show the entire system, higher level data flow diagrams represent the system as a number of separate processes and relevant data stores.
The external entities are the same for both diagrams.
What are the symbols used in a Level 0 Data Flow Diagram?
Note: Level 0 Data Flow Diagrams
What are the top-down and bottom-up approaches to software development?
- In the top-down approach, the high level definition of the problem is decomposed into smaller and smaller parts.
- In the bottom-up approach, individual data and/or operations are considered first and then composed into larger constructs.
What is the facade pattern?
The façade pattern uses a façade object to simplify the process of using a module that consists of a number of submodules or classes, by creating an “interface” between the different submodules/classes of the module.