Professional Documents
Culture Documents
Act3.2 Itpe2 Dmem
Act3.2 Itpe2 Dmem
ACTIVITY
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
- 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.
- 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.