Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 2: The equation of a line in standard form is ar + by =c, where a and b both cannot be zero, anda, b,

image text in transcribed
Exercise 2: The equation of a line in standard form is ar + by =c, where a and b both cannot be zero, anda, b, and c are real numbers. If b#0, then -a/b is the slope of the line.I and Ifa-0, then it is a horizontal line if b-0, then it is a vertical line. The slope of a vertical line is undefined. Two lines are parallel if they have the same slope or both are vertical lines. Two lines are perpendicular if one of the lines is horizontal and another is vertical, or if the product of their slopes is -1. Design the class LineType to store a line. To store a line, you need to store 2 Points. Your LineType class must contain the following operations: 1. Constructor that takes 2 parameters each of type Point 2. Constructor that takes 4 parameters each of type int that represent xl, yl, and x2, y2 for each point respectively Accessors and mutators for the class variables toString to represent the line in the form y- mx+c; where m is the slope and c is the Y- intercept. 3. 4

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

Students also viewed these Databases questions