Question: I need help with these two programming problems given the starter code below. Language is C++, thanks! Part A Starter #include using namespace std; //

I need help with these two programming problems given the starter code below. Language is C++, thanks!

Part A Starter

#include

using namespace std;
// We have setup class framework for you.
// Please add cin/cout overload first and at the same time add the coordinates
//
// See github example as specified in the assignment handout for exaamples
//
class Point {
public:
friend istream& operator>>(istream &input, Point &p ) {
// Finish me second by adding proper input >> statement
return input;
}
friend ostream& operator
// Finish me thrid by adding proper output
return output;
}
// Please add constructors and other functions here.
private:
// Add me first
};
int main() {
Point P1;
cout
cin >> P1;
cout
cout
cout
return 0;

}

Part B starter

#include
using namespace std;
// We have setup class framework for you. Please copy the point
// class you created to this file.
class Line {
public:
private:
};
int main() {
Line L1;
// cout
// cin >> L1;
// cout
// cout
// cout

return 0;

}

I need help with these two programming problems given the starter code

Part A: Create Point Class (point class.cpp) - Milestone part A: Problem Statement: Create a an object to implement a "point" class which allows a programmer to store an x, y coordinate pair. It should have at least two constructors, a set function, gt functions for xe and y, and overloaded I/O (cin/cout) functions. Part B: (line_class.cpp) - Milestone Part B Problem Statement: Create an object to implement a "line" class which allows the programmer to store a line. This class must use the "point" class developed in Part A. The object should have two constructors, appropriate set/get functions, and overloaded I/O (cin/cout) functions. It should include functions the return the proper value for the following: Determine the slope of a line Determine the length of a line Determine the y-intercept of a line Determine if the line is horizontal Determine if the line is vertical Determine if a line is parallel to another line Determine if a line intersects another line

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!