You are on page 1of 2

ITPE2 – PROFESSIONAL ELECTIVE 2

ACTIVITY

Name of Student: Miranda, Denise May E. Activity Title: Activity 3.2


Year and Section: BSIT 2 – ST. ANTHONY Date Submitted: 10/26/23

QUESTIONS
Activity 3.2!
Answer the following.
a. Explain what is breakpoint. (150 words)
b. Explain what is methods. (150 words)
c. Explain what is property/ies. (150 words)
ANSWERS

a. Explain what is breakpoint. (150 words)


- A breakpoint is a tool used in software development to pause the execution of a
program at a specific point or line of code. It allows developers to examine the
program's state, variables, and behavior at that particular moment.

- By setting a breakpoint, developers can temporarily halt the program's


execution and analyze its internal workings. This helps in identifying and
resolving issues or bugs within the code. When the program reaches the
breakpoint, it stops running and enters a debugging mode, enabling developers to
inspect variables, check conditions, and step through the code line by line.

- Breakpoints are commonly used to gain insights into the program's flow, verify
the values of variables, and understand how different parts of the code interact.
They provide a way to pinpoint and troubleshoot problems, making the
debugging process more efficient and effective. Overall, breakpoints are a
valuable tool for developers, allowing them to pause the program's execution and
examine its state to facilitate debugging and problem-solving.

b. Explain what is methods. (150 words)


- In programming, a method is a named block of code that performs a specific
task or action. It is used to group related instructions together, making the code
more organized and easier to understand. Methods can be thought of as reusable
functions within a program.

- Methods have a name that is used to call or invoke them when needed. They
can take input parameters, which are values passed into the method for it to work
with. These parameters allow methods to be flexible and process different data.
- When a method is called, the program jumps to the method's code, executes the
instructions inside, and then returns to the point where it was called from.
Methods can also return a value as a result of their execution, which can be used
by other parts of the program.

- By using methods, developers can break down complex problems into smaller,
more manageable pieces. This promotes code reusability, as methods can be
called multiple times from different parts of the program, avoiding the need to
write the same code repetitively. In summary, methods are named blocks of code
that perform specific tasks, allowing for code organization, reusability, and
modularity in programming.

c. Explain what is property/ies. (150 words)


- In programming, a property is a special feature that allows access to the internal
state of an object. It provides a way to read or modify the values associated with
an object's attributes or variables. Properties act as a bridge between the external
code and the internal data of an object, allowing controlled access to its state.
They typically have a name and can be accessed using getter and setter methods.
The getter retrieves the current value of the property, while the setter sets a new
value.

- Properties are commonly used to enforce encapsulation and data abstraction.


They hide the details of how the data is stored and provide a consistent interface
for interacting with the object's state. By encapsulating data within properties,
developers can ensure data integrity, apply validation rules, and control access
permissions.

- Overall, properties enhance the usability and maintainability of code by


providing a controlled and intuitive way to access and modify an object's internal
data. They promote good programming practices and make code more reliable
and secure.

You might also like