... 14.10–Fig. 14.13.
 3   #ifndef CLIENTDATA_H
 4   #define CLIENTDATA_H
 5
 6   #include <string>
 7
 8   class ClientData {
 9   public:
10      // default ClientData constructor
11      ClientData(int = 0, const std::string& = "",
12         const std::string& = "", double = 0.0);
13
14      // accessor functions for accountNumber
15      void setAccountNumber(int);
16      int getAccountNumber() const;
17
18      // accessor functions for lastName
19      void setLastName(const std::string&);
20      std::string getLastName() const;
21
22      // accessor functions for firstName
23      void setFirstName(const std::string&);
24      std::string getFirstName() const;
25
26      // accessor functions for balance
27      void setBalance(double);
28      double getBalance() const;
29   private:
30      int accountNumber;
31      char lastName[15];
32      

Get C++ How to Program, 10/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.