subject

As part of a program that will be doing computations on various geometric objects, a programmer has submitted the following class declaration for approval. struct Line { // Provide access to the endpoints Point p1; Point p2; // Create a line segment Line() {}// Create a line segment with the given endpoints Line (Point endPoint1, Point endPoint2); // For a given x value, what is the corresponding value of // y along this line segment? (Returns std::DBL_MAX if no// such x exists or if x is not unique.)double x(double y) const;// Returns true if these line segments intersect at a point that lies// at or between the endpoint of each segment. bool crossesSegment (const Line& segment) const;// Returns true if p lies along this line segment (and at or// between the endpoints). bool contains (Point p) const;};ostream& operator<< (ostream& out, Line& line);Based upon this information, which of the C++ checklist items appear to be in violation?Redundant or generalizable functionsMeaningful namesUndocumented pre-conditionsAll data members privateEvery constructor initializes every data memberAppropriate treatment of default constructorAppropriate treatment of the Big 3Appropriate relational operatorsAppropriate output functionConst correctnessRedundant or generalizable functions

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, robert7248
You have a large, late-model pick-up truck with a rear seat. the pick-up truck weighs 6,500 pounds. the florida seat belt law
Answers: 1
image
Computers and Technology, 22.06.2019 10:30, ilovepickles930
What can tanya do now to start preparing for the college and scholarship application process? think about her grades, activities in which she can get involved, possible part-time jobs at which she can work, and standardized tests she can take. (10 points) apex
Answers: 2
image
Computers and Technology, 22.06.2019 14:00, GGerardi7552
What are procedures that keep a data base current
Answers: 1
image
Computers and Technology, 23.06.2019 16:30, vitothebest1
You have read about the beginnings of the internet and how it was created. what was the internet originally created to do? (select all that apply) share research. play games. communicate. share documents. sell toys
Answers: 1
You know the right answer?
As part of a program that will be doing computations on various geometric objects, a programmer has...

Questions in other subjects: