wheelsmanx

CPS 271 FIRSTDAYCLASSEX_NOTES

Jan 12th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. student.h
  2.  
  3. private: datamembers
  4. puiblic : member functions
  5.  
  6. student.cpp
  7. functions on code
  8.  
  9.  
  10. testing.cpp
  11. main(){
  12.  
  13.  
  14. }
  15.  
  16.  
  17. To write to the class
  18.  
  19. Student
  20. classP{
  21. private:
  22. //for ever datamember you need a getx and a setx
  23. x
  24.  
  25. public:
  26. constructor:
  27. getx
  28. setx
  29. destructor:
  30.  
  31. },
  32.  
  33.  
  34.  
  35.  
  36. // we have moved to talk about the the class tring
  37.  
  38. //first we include string
  39. //so here we are finding the length of the string class using the function of the class string
  40.  
  41. #include <string>
  42.  
  43. string address ("122 michigan Ave");
  44.  
  45. address.length(); // this is a function of the class string - length is a function of the class string
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. here we have moved to to talking about cards
  53.  
  54. we are going to create a class for card types
  55.  
  56. class name : card
  57. char face
  58. char suit
Advertisement
Add Comment
Please, Sign In to add comment