Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

1

Author:

Diaz Madrigales Jessica.

MEC 5A

University Technological of Altamira.

Mechatronics Higher Technician.

Eng. Edgar Alberto González Morales.

Altamira, Tamaulipas.

TASK 3: OBJECT ORIENTED LANGUAGE


INVESTIGATION

22 February of 2023.
2

DEFINITION
Object Oriented Language
Programming
Object-oriented language (OOL) is a high-level computer programming language
that implements objects and their associated procedures within the programming
context to create software programs.

Object-oriented language uses an object-oriented programming technique that


binds related data and functions into an object and encourages reuse of these
objects within the same and other programs.

Object-oriented language was primarily designed to reduce complexity in typical


procedural languages through data binding and encapsulation techniques. In
object-oriented language, the objects created provide limited or no access to other
functions or methods within the program. This enables only authorized or inherited
methods/functions to access a particular object.

Object-oriented language typically supports the following features, at minimum:

• The ability to create classes and their associated objects.

• Encapsulation.

• Inheritance.
3

SYNTAX OR STRUCTURE
For create functions

C++ provides some pre-defined functions, such as main(), which is used to execute
code. But you can also create your own functions to perform certain actions.

To create (often referred to as declare) a function, specify the name of the function,
followed by parentheses ():

• myFunction() is the name of the function.


• void means that the function does not have a return value. You will learn more
about return values later in the next chapter.
• inside the function (the body), add code that defines what the function should do.
A C++ function consist of two parts:

Declaration: the return type, the name of the function, and parameters (if any)
Definition: the body of the function (code to be executed)
4

EXAMPLES IN C++
LANGUAGE
Example 1: Inside main, call myFunction():

Example 2: Function with Parameters.


5

Example 3:

You might also like