C++ Programming Ch.11 Exercise 9 Solution

Problem: 다음은 Phone 클래스이다. 1 2 3 4 5 6 7 8 9 10 11 class Phone { // 전화 번호를 표현하는 클래스 string name; string telnum; string address; public: Phone(string name="", string telnum="", string address="") { this->name = name; this->telnum = telnum; this->address = address; } }; Phone 클래스의 객체를 입출력하는 아래 코드와 Execution Result를 참조하여 <<, >> 연산자를 작성하고 Phone 클래스를 수정하는 등 프로그램을 완성하라. 1 2 3 Phone girl, boy; cin >> girl >> boy; cout << girl << endl << boy << endl; Execution Result: ...

April 2, 2020 · 2 min · Sobamemil