This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
in204:tds:sujets:td1:part4 [2019/09/23 15:05] bmonsuez [Question n° 2] |
in204:tds:sujets:td1:part4 [2022/11/18 10:49] (current) |
||
|---|---|---|---|
| Line 209: | Line 209: | ||
| void print() const | void print() const | ||
| { | { | ||
| - | std::cout << "Point: (" | + | std::cout << "(" << m_x << ", " << m_y << ")"; |
| - | << m_x << ", " << m_y << ")" << "." << std::endl"; | + | |
| } | } | ||
| }; | }; | ||
| Line 221: | Line 220: | ||
| void print() const | void print() const | ||
| { | { | ||
| - | std::cout << "Segment: [(" | + | std::cout << "["; |
| - | << m_start.getX() << ", " << m_start.getY() << ")" | + | m_start.print(); |
| - | << ")-(" | + | std::cout << "-"; |
| - | << m_end.getX() << ", " << m_end.getY() << ")]" | + | m_end.print(); |
| - | << std::endl"; | + | std::cout << "]"; |
| } | } | ||
| }; | }; | ||
| Line 236: | Line 235: | ||
| void print() const | void print() const | ||
| { | { | ||
| - | std::cout << "Droite passant par (" << m_point.getX() << ", " << m_point.getY() | + | std::cout << "<"; |
| - | << ") et d'inclinaison : " << m_angle << "." << std::endl; | + | m_point.print(); |
| + | std::cout << ", " m_angle << ">"; | ||
| } | } | ||
| }; | }; | ||