5.1.1 State TWO advantages of modular programming - NSC Information Technology - Question 5 - 2017 - Paper 2
Question 5
5.1.1 State TWO advantages of modular programming.
5.1.2 Distinguish between a private function and a public function.
Worked Solution & Example Answer:5.1.1 State TWO advantages of modular programming - NSC Information Technology - Question 5 - 2017 - Paper 2
Step 1
State TWO advantages of modular programming.
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Easier to debug/trace bugs: Modular programming allows developers to isolate sections of code, making it easier to identify and fix errors without affecting the entire program.
Reusability of code: Code segments can be reused across different programs or projects, reducing redundancy and saving time in development.
Step 2
Distinguish between a private function and a public function.
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
A private function is accessible only within the class or unit in which it is defined, preventing outside access. In contrast, a public function can be accessed from outside the class or project, allowing broader utilization of its functionality.