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 16:00
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
question
Computers and Technology, 24.06.2019 16:00
Which type of cloud computing offers easily accessible software and applications on the machines
Answers: 1
question
Computers and Technology, 24.06.2019 21:40
Assume you need to test a function named inorder. the function inorder receives three int arguments and returns true if and only if the arguments are in non-decreasing order: that is, the second argument is not < the first and the third is not < the second. write the definition of driver function testinorder whose job it is to determine whether inorder is correct. so testinorder returns true if inorder is correct and returns false otherwise. for the purposes of this exercise, assume inorder is an expensive function call, so call it as few times as possible!
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
What are the 4 basic items that are traded throughout the world?
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
question
History, 16.12.2019 21:31
Questions on the website: 13722366