Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. #include <iostream>
  2. #include "meeting.h"
  3. #include <conio.h>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8.  
  9. int choice, dayOfMonth;
  10. double duration, startTime;
  11. string description, person, name;
  12.  
  13.  
  14.  
  15. class meeting
  16. {
  17.  
  18. private:
  19.  
  20. int dayOfMonth;
  21. double startTime, duration;
  22. string description, person;
  23.  
  24.  
  25. public:
  26.  
  27.  
  28. meeting()
  29. {
  30.  
  31. dayOfMonth=0;
  32. description=" ";
  33. duration=0;
  34. person=" ";
  35. startTime=0;
  36.  
  37. }
  38.  
  39. void printBrief()
  40. {
  41. cout << description << endl;
  42.  
  43. }
  44.  
  45.  
  46. void printFull()
  47. {
  48. cout <<description << endl;
  49. cout << "The meeting will last for " << duration << " hours " << endl;
  50. cout << "The meeting will begin at " << startTime << " o'clock" << endl;
  51. cout << "the meeting will be with " << person << endl;
  52.  
  53.  
  54. }
  55.  
  56. void printBoth(meeting meetingArray[100])
  57. {
  58. int i=0;
  59.  
  60.  
  61.  
  62.  
  63.  
  64. }
  65.  
  66.  
  67.  
  68. void setFields(int dayOfMonth, double duration, double startTime, string description, string person)
  69. {
  70. dayOfMonth = dayOfMonth;
  71. duration = duration;
  72. startTime = startTime;
  73. description = description;
  74. person = person;
  75.  
  76.  
  77. }
  78.  
  79. int getFields()
  80. {
  81. return dayOfMonth;
  82. return duration;
  83. return startTime;
  84.  
  85. }
  86.  
  87. void getDetails()
  88. {
  89. cout << "Please enter a day for your meeting" << endl;
  90. cin >> dayOfMonth;
  91. cout << "Please enter the number of hours your meeting will last for " << endl;
  92. cin >> duration;
  93. cout << "Please enter a start time for your meeting " << endl;
  94. cin >> startTime;
  95. cout << "Please enter the name of the person you are meeting with" << endl;
  96. cin >> person;
  97. cout << "Please enter a description for your meeting" << endl;
  98. cin >> description;
  99.  
  100.  
  101.  
  102. }
  103.  
  104.  
  105. };
  106.  
  107. int main()
  108. {
  109.  
  110. meeting meetingArray[100];
  111.  
  112. meeting meeting1;
  113. meeting1.getDetails();
  114. meeting1.getFields();
  115. meeting1.setFields(dayOfMonth, duration, startTime, description, person);
  116. meeting1.printFull();
  117. meeting1 =meetingArray[1];
  118.  
  119. meeting meeting2;
  120. meeting2.getDetails();
  121. meeting2.getFields();
  122. meeting2.setFields(dayOfMonth, duration, startTime, description, person);
  123. meeting2.printFull();
  124. meeting2 = meetingArray[2];
  125.  
  126. cout << "Welcome to the meeting program" << endl;
  127. cout << " Please enter your name " << endl;
  128. cin >> name;
  129.  
  130. cout << "Please select an option from the menu" << name << endl;
  131. cout << "1. Create a new meeting" << endl;
  132. cout << "2. List all meetings" << endl;
  133. cout << "3. List all meetings for a chosen day" << endl;
  134. cout << "4. Sort the list by date " << endl;
  135. cin >> choice;
  136.  
  137. switch(choice)
  138. {
  139. case 1:
  140.  
  141. break;
  142. case 2:
  143.  
  144. break;
  145. case 3:
  146.  
  147. break;
  148.  
  149. case 4:
  150. break;
  151.  
  152. }
  153.  
  154. _getch();
  155.  
  156. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement