-
Notifications
You must be signed in to change notification settings - Fork 0
/
Date.h
40 lines (30 loc) · 751 Bytes
/
Date.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef DATE_H
#define DATE_H
#include <iostream>
class Date {
// Overload stream insertion and stream extraction operators
// Allow user to enter date in the following format:
// MM / DD / YYYY
// stream insertion overload
friend std::ostream& operator<<(std::ostream& , Date& );
//stream extraction overload
friend std::istream& operator>>(std::istream& , Date& );
friend std::istream& operator>>(std::istream& , Date& );
private:
int month;
int day;
int year;
std::string name;
std::string firstName;
std::string lastName;
std::string horoscope;
std::string monthName;
std::string zodiac;
public:
Date(); //default constructor
void setName();
void setMonthName();
void setHoroscope();
void setLunarYear();
};
#endif