C++ Programming Ch.3 Exercise 2 Solution
Problem: 날짜를 다루는 Date 클래스를 작성하고자 한다. Date를 이용하는 main()과 Execution Result는 다음과 같다. 클래스 Date를 작성하여 아래 프로그램에 추가하라. 1 2 3 4 5 6 7 8 9 #include using namespace std; int main() { Date virth(2014, 3, 20); Date independenceDay("1945/8/15"); independenceDay.show(); cout << birth.getYear() << ',' << birth.getMonth() << ',' << birth.getDay() << endl; } Execution Result: Objective & Hints: 2개의 생성자와 여러 멤버를 가진 클래스 만들기 ...