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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:00
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
You know the right answer?
As part of a program that will be doing computations on various geometric objects, a programmer has...
Questions
question
Chemistry, 16.11.2019 10:31
question
Mathematics, 16.11.2019 10:31
Questions on the website: 13722361