0% found this document useful (0 votes)
9 views

COMPROG2REBYUWIR

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

COMPROG2REBYUWIR

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer Programming Reviewer

Lesson 1: Object-Oriented Programming Fundamentals

- Procedural Programming: the state of the program is maintained in variables and tables.
- Object – Oriented Programming is a computer programming model that organizes software
designs around data, or objects, rather than functions and logic.
- Object: defined as a data field that has unique attributes and behavior. Objects are instances of a
class created with specifically defined data.
- Classes: are user-defined data types that act as the blueprint for individual objects, attributes and
methods.
- Methods: are functions that are defined inside a class that describe the behaviors of an object.
- Attributes/Fields: are defined in the class template and represent the state of an object.

Lesson 2: OOP Fundamentals

1. Abstraction
a. Aims to hide complexity from users and only show them relevant information.
b. Abstract keyword, interface keyword, implement

2. Encapsulation
a. Helps with data security. It safeguards the internal contents of a class like a capsule.
b. Data hiding restricting unauthorized access outside from the class.
c. Getter/setter methods: accessor and mutator methods, private keyword
3. Inheritance
a. Makes it possible to create a child class(subclass) that inherits the fields and methods
of the parent class (superclass)
b. Extend keyword, super keyword
c. Is-a relationship
d. Types of Inheritance:
i. Single Inheritance
ii. Multilevel Inheritance
iii. Hierarchical Inheritance
iv. Multiple Inheritance
v. Hybrid Inheritance
4. Polymorphism
a. Refers to the ability to perform a certain action in different ways.
b. “Poly” means many.
c. Polymorphic variable: refers to a variable with different values under different
conditions.
d. Method Overriding and Method Overloading.
e. Method overloading happens when various methods with the same name are present
in a class.
f. Method overriding occurs when a child class overrides a method of its parent
g. Static polymorphism in Java is implemented by method overloading.
h. Dynamic polymorphism in Java is implemented by method overriding.
5. Association
a. Act of establishing a relationship between two unrelated classes.
b. One to one, one to many, many to one, or many to many relationship.
6. Aggregation
a. Is a narrower kind of association. It occurs when there’s a one-way (HAS-A relationship)
between the two classes.
7. Composition
a. Is a stricter form of aggregation. It occurs when the two classes you associate are
mutually dependent and can’t exist without each other.
b. Represents a PART-OF relationship between two classes.
c. Both classes are dependent on each other.

- Constructor: a special method that is used to initialize objects. The constructor is called when an
object of a class is created.
- Accessor Method: is a method that is used to return the value of an instance (or static) variable to
the user.
- Mutator Method: resets the value of a private variable. This gives other classes the ability to
modify the value stored in that variable without having direct access to the variable itself.
Mutator methods take one parameter whose type matches the type of variable its modifying.
- Static keyword: indicates that a particular member is not an instance, but rather part of a type.
The static member will be shared among all instances of the class, so we will only create one
instance of it.

Lesson 3: Unified Modeling Language

- UML: is a general-purpose visual modelling language that is intended to provide a standard way to
visualize the design of a system.

1. Structural Diagram: depicts a static view or structure of a system. It presents an outline for the
system
a. Class Diagram: are one of the most widely used diagrams. It is the backbone of all the
object-oriented software systems
b. Composite Structure Diagram: It displays the relationship between the parts and their
configuration.
c. Object Diagram: It describes the static structure of a system at a particular point in
time.
d. Component Diagram: It portrays the organization of the physical components within
the system.
e. Deployment Diagram: It presents the system’s software and its hardware by telling
what the existing physical components are and what software components are running
on them.
2. Behavioral Diagram: portray a dynamic view of a system or the behavior of a system, which
describes the functioning of the system.
a. State Machine Diagram: It portrays the system’s behavior utilizing finite state
transitions.
b. Activity Diagram: It models the flow of control from one activity to the other.
c. Use Case Diagram: It represents the functionality of a system by utilizing actions and
use cases.
3. Interaction Diagram: are a subclass of behavioral diagrams that give emphasis to object
interactions and also depicts the flow between various use case elements of a system.
a. Sequence Diagram
b. Communication Diagram
c. Timing Diagram
d. Interaction Overview Diagram

- UML Notations: Structural Things


1. Classes Notation
2. Object Notation
3. Interface Notation
4. Collaboration Notation
5. Use Case Notation
6. Actor Notation
7. Initial State Notation
8. Final State Notation
9. Active Class Notation
10. Component Notation
11. Node Notation

You might also like