Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "meeting.h"
- #include <conio.h>
- #include <string>
- using namespace std;
- int choice, dayOfMonth;
- double duration, startTime;
- string description, person, name;
- class meeting
- {
- private:
- int dayOfMonth;
- double startTime, duration;
- string description, person;
- public:
- meeting()
- {
- dayOfMonth=0;
- description=" ";
- duration=0;
- person=" ";
- startTime=0;
- }
- void printBrief()
- {
- cout << description << endl;
- }
- void printFull()
- {
- cout <<description << endl;
- cout << "The meeting will last for " << duration << " hours " << endl;
- cout << "The meeting will begin at " << startTime << " o'clock" << endl;
- cout << "the meeting will be with " << person << endl;
- }
- void printBoth(meeting meetingArray[100])
- {
- int i=0;
- }
- void setFields(int dayOfMonth, double duration, double startTime, string description, string person)
- {
- dayOfMonth = dayOfMonth;
- duration = duration;
- startTime = startTime;
- description = description;
- person = person;
- }
- int getFields()
- {
- return dayOfMonth;
- return duration;
- return startTime;
- }
- void getDetails()
- {
- cout << "Please enter a day for your meeting" << endl;
- cin >> dayOfMonth;
- cout << "Please enter the number of hours your meeting will last for " << endl;
- cin >> duration;
- cout << "Please enter a start time for your meeting " << endl;
- cin >> startTime;
- cout << "Please enter the name of the person you are meeting with" << endl;
- cin >> person;
- cout << "Please enter a description for your meeting" << endl;
- cin >> description;
- }
- };
- int main()
- {
- meeting meetingArray[100];
- meeting meeting1;
- meeting1.getDetails();
- meeting1.getFields();
- meeting1.setFields(dayOfMonth, duration, startTime, description, person);
- meeting1.printFull();
- meeting1 =meetingArray[1];
- meeting meeting2;
- meeting2.getDetails();
- meeting2.getFields();
- meeting2.setFields(dayOfMonth, duration, startTime, description, person);
- meeting2.printFull();
- meeting2 = meetingArray[2];
- cout << "Welcome to the meeting program" << endl;
- cout << " Please enter your name " << endl;
- cin >> name;
- cout << "Please select an option from the menu" << name << endl;
- cout << "1. Create a new meeting" << endl;
- cout << "2. List all meetings" << endl;
- cout << "3. List all meetings for a chosen day" << endl;
- cout << "4. Sort the list by date " << endl;
- cin >> choice;
- switch(choice)
- {
- case 1:
- break;
- case 2:
- break;
- case 3:
- break;
- case 4:
- break;
- }
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement