I need some help---anyone, please!! ____________________________________________
ID: 3551906 • Letter: I
Question
I need some help---anyone, please!!
____________________________________________________
Write a program that accomplishes each of the following:
a ) Create a a user-defined class point that contains the private interger data members xcoordinate and ycoordinate and declares stream insertion and stream extraction overloaded operator functions as friends of the class.
b) Deine the stream insertion and stream extraction operator functions. The straem extraction operator function should determine whether the data entered is valid, and, if not, it should set the failbit to indicate improper input. The stream insertion operator should not be able to display the point after an input error occured.
c ) Write a main function that tests input and output of user-defined class point, using the overloaded stream extraction and stream insertion operators
Explanation / Answer
File : Point.h
----------------------
-------------------------------------------------------------------------------------------------------
File name: Point.cpp
----------------------------------
-------------------------------------------------------------------------------------------------------
File name : Test.cpp (Test File)
--------------------------------------------------
-------------------------------------------------------------------------------------------------------
Output :
--------------
Enter a point in the form (x, y) : (7,8)
Point entered was : (7,8)