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, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. peter has launched a website that features baby products. however, clients often find they are unable to access the website because the server is down. which feature of cybersecurity should peter focus on for his website? a. data authenticity b. data privacy c. data availability d. data integrity e. data encryption
Answers: 3
question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
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
Mathematics, 08.06.2021 01:00
question
Mathematics, 08.06.2021 01:00
question
Mathematics, 08.06.2021 01:00
question
English, 08.06.2021 01:00
Questions on the website: 13722363