Problem Solving with C++ (9th Edition)
Problem Solving with C++ (9th Edition)
9th Edition
ISBN: 9780133591743
Author: Walter Savitch
Publisher: PEARSON
Question
Book Icon
Chapter 12.1, Problem 3STE
Program Plan Intro

Defining a class in separate files:

  • User can separate the file by using three files such as interface file, implementation file and application file.
  • Interface file:
    • This file contains the definition of class.
    • The name of interface header file ends in “.h”.
    • This file also contains declaration of any function such as member function or friend function and overloaded operators that describes basic operations for the class.
    • This file contains comments for given function and operators are used.
  • Implementation file:
    • Implementation file contains the definitions for all declared functions and overloaded operations in interface file.
    • This file also contains member variables.
    • This file must have an include directive.
      • The given directive is represented by the quotes around the name of file.
      • Example: #include "sample.h".
    • The interface and implementation file usually contains the same name but end with different suffixes.
  • Application file:
    • The application file contains the main part of the program.
    • This file also contains any additional declaration of function and constant declaration.
    • This file also must contain an include directive of the interface file name.

Blurred answer
Students have asked these similar questions
make a screen capture showing the StegExpose results
Which of the following is not one of the recommended criteria for strategic objectives? Multiple Choice   a) realistic   b) appropriate   c) sustainable   d) measurable
Management innovations such as total quality, benchmarking, and business process reengineering always lead to sustainable competitive advantage because everyone else is doing them. a) True b) False
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr