A
attique63
how could I write a program that will declare a class point. The class
point has two private data members x and y of type float. The class
point has a parameterized constructor to initialize both the data
members i.e. x and y. The class point has a member function display()
that display the value of x and y. Create two objects p1 and p2 with
your desired data and display the values of x and y of p1 and p2. Now
create a third object p3 by using the expression p3=p1+p2 and display
the values of x and y of p3
point has two private data members x and y of type float. The class
point has a parameterized constructor to initialize both the data
members i.e. x and y. The class point has a member function display()
that display the value of x and y. Create two objects p1 and p2 with
your desired data and display the values of x and y of p1 and p2. Now
create a third object p3 by using the expression p3=p1+p2 and display
the values of x and y of p3