Knec Oop
Knec Oop
THEORY
6. Describe two circumstances that would necessitate the usage of enumerated data type in C+
+ programs
Defining a Set of Related Constants: Enums provide a clear and organized way to
define and use related constants, such as days of the week or directions.
Representing State Machines or Status Codes: Enums help manage different states or
status codes in a readable and maintainable manner, useful in applications like traffic light
control or error handling.
7. Outline three reasons for implementing data encapsulation in OOP
8. Explain two ways of coping emerging trends in OOP
9. Differentiate between unstructured and modular programming paradigms
10. Outline 4 data modifiers that could be used in C++ Programming
11. Differentiate between wild pointer and dangling pointer as used in C++ Programming
12. Outline 4 circumstances under which a complier would reject an inline request in C++
Programming
13. Outline 4 conditions that should be considered when using a static class member in OOP
14. Differentiate between associative containers and container adapters as used in class libraries
15. Outline the function of the header files;
i) Ofstream
ii) Fstream
iii) Ios
16.