Question: Data Structure Programming (hand in C++ code only) Given the declaration of a class Point class Point public: Point (double-0.0, double#0.0); Point &setValue (double, double)a

Data Structure  Data Structure Programming (hand in C++ code only) Given the declaration
of a class Point class Point public: Point (double-0.0, double#0.0); Point &setValue

Programming (hand in C++ code only) Given the declaration of a class Point class Point public: Point (double-0.0, double#0.0); Point &setValue (double, double)a void print() const; private: double x, yi Write appropriate definition for the constructors and the function setValue and print. You should use the this pointer as the return value in the function setValue so that you can use the statement myObject.setValue(4,5) printo. The output of the function print is (4, 5). In you main function, create an object and call setValue(... .print0. Write a class named Date which has three private data: day, month, year, and two friend functions: operator and operator>In operator>> prompt user to input a date with format dd/mm/yyyy and then use strtok to separate the numbers and assign them to the data members. In operator> In + operator, the sum of a/b and c/d is (a"d+b c)bd. Inoperator, if the user enter 0 for the denominator, output error message and prompt user to type again (use while loop). In >and assign data for them. Then sum the two numbers and display the results. Sample output Enter two integers: 3 0 Error: the denominator cannot be 0. Try again Enter two integers: 23 Enter two integers: 3-4 a n (2 bonus marks) Add a private member function with function prototype void normalize() to normalize the values stored so that, after normalization, the denominator is positive and the numerator and 2/3 +-3/4 -1/12 4/-8 would be represented the same as -1/2. You must email me your code for this part. denominator are as small as possible. For example, after normalization

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!