Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design in C + + the class named Line to implement a line in general form A x + B y = C where A

Design in C++ the class named Line to implement a line in general form Ax+By=C
where A,B, and C are floating-point datatypes, and use exception to validate that A
and B are not both 0
a. Overloads the stream insertion operator, , for easy output. Show the equation
y=-ABx+CB
b. Overloads the stream extraction operator, >, for easy input. Ask the user A,B,
and C floating-point datatype.
c. Overloads the memberwise operator to equal to lines.
d. Overloads the relational operator | for vertical line, if B=0 then x=CA
e. Overloads the relational operator |= for horizontal line, y=b where b- intercept.
f. Overloads the relational operator || if two lines are parallels. Two nonvertical lines
are parallel if and only if their slopes are equal and they have different y-intercepts.
g. Overloads the relational operator == if two lines are perpendicular. Two
nonvertical lines are perpendicular if and only if the product of their slopes is -1.
h. Write a program with an options menu that shows each basic operation of Line
Class.
Must include:
Source code.
Separate class specifications from implementation.
Program output.
Descriptive Tables.
UML diagrams.Design in C++ the class named Line to implement a line in general form
where A, B, and C are floating-point datatypes, and use exception to validate that A and B are not both 0
a. Overloads the stream insertion operator, , for easy output. Show the equation
b. Overloads the stream extraction operator, >>, for easy input. Ask the user A, B, and C floating-point datatype.
c. Overloads the memberwise operator to equal to lines.
d. Overloads the relational operator | for vertical line, if then
e. Overloads the relational operator |= for horizontal line, where - intercept.
f. Overloads the relational operator || if two lines are parallels. Two nonvertical lines are parallel if and only if their slopes are equal and they have different y-intercepts.
g. Overloads the relational operator == if two lines are perpendicular. Two nonvertical lines are perpendicular if and only if the product of their slopes is -1.
h. Write a program with an options menu that shows each basic operation of Line Class.
Must include:
Source code.
Separate class specifications from implementation.
Program output.
Descriptive Tables.
UML diagrams.
image text in transcribed

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions