i Encapsulation} ra te compilation is to achieve encapsulation. How to separate files? Give two An important objective advantages of doing so o. Solution Separate Files in C++: 1. Place prototypes and definitions in a module.h file 2. Place the actual code in module.cpp 3. #include \"module.h\" in the program(separate file) that uses the module 4. Make all files part of a project 5. Include the module Convention: .h file contains class header .cpp file contains member function definitions Separate Compilation Example 1 1. factorial.h: – Contains the line int factorial( int num ); 2. factorial.cpp: – Contains the function definition: int factorial( int num ) { … } 3. someapplication.cpp: – Contains the line #include \"factorial.h\" – Contains the main() function that invokes the factorial function Advantage: 1. A minor change requires recompilation of the entire program. 2. Reusing part of the program, a class for example, in another program requires a risky copy and paste operation. The class declaration, all member function implementations, and all other dependencies must be located, copied (don\'t press the cut button!), and pasted into another file. 3. Several programmers can\'t work on the program simultaneously. .