Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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;

}

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

a sin(2x) x Let f(x)=2x+1 In(be)

Answered: 1 week ago