Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.10 KB | None | 0 0
  1. //Customer - Contact Header File
  2. //It isn't magically going to compile due to being a different header file without issue, if you're not on Windows.
  3.  
  4. #pragma once
  5.  
  6. class Contact {
  7.      
  8.       private:
  9.       string phone;       // Again, you don't do math with phone numbers. Leave this open to accommodate non-US numbers, as well.
  10.       string fax;         // About the same thing. Except leave this more open to be able to say no number exists!
  11.       string email;       // I don't even see how this could be anything BUT a string.
  12.      
  13.       public:
  14.       Contact();
  15.       Contact(string phone, string fax, string email);
  16.      
  17.       //Accessors
  18.       string getphone() { return phone; }  // Accessors are one of the few things I'm confident about.
  19.       string getfax() { return fax; }
  20.       string getemail() { return email; }
  21.      
  22.       //Mutators
  23.       void setphone() { phone = newphone; } // As are mutators,
  24.       void setfax() { fax = newfax; }
  25.       void setemail() { email = newemail; }
  26.  
  27.       //Others
  28.       void store(string phone, string fax, string email);
  29.       void print(void);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement