Why is it good programming style to place the class declaration in a header file (*.h) and the associated code in a source code file (*.cpp).

What will be an ideal response?

This gives use a nice way to organize the code. The *.h file will be included in files that needs to use that class’ object. Also, if we create libraries of our source code, we’d want to have our *.cpp compiled into a library and the *.h would be available as documentation of the class.

Computer Science & Information Technology

You might also like to view...

Access control lists enable or deny traffic and can be configured to help secure a router

Indicate whether the statement is true or false

Computer Science & Information Technology

What is the term that is used to describe a computer system that could store literary documents, link them according to logical relationships, and allow readers to comment and annotate what they read?

A. WWW B. Internet C. Cascading style sheets (CSS) D. Hypertext

Computer Science & Information Technology