# Building Classes

Not what you're looking for?

The point-slope equation of a line having slope m and pasing through pint P with coordinates (x1, y1) is y-y1=m(x-x1).

a. Write a class for a CartesianPoint, described by its x- and y- coordinates, with all appropriate operations on such objects.

b. Write a LineSegment class, described by two CartesianPoint endpoints. In addition to the usual operations, this class should provide operations to compute:

-the midpoint of the line segment joining two points and

-the equation of the perpendicular bisector of this line segment.

c. Write a class for Line, described by its slope and a point on the line, with opeations that find the point-slope equation of the line and find the slope-intercept of the line.

d. Write a program to read the point and slope information for two lines and to determine whether they intersect or are parallel. If they intersect, find the point of intersection and also determine whether they are perpendicular.

##### Purchase this Solution

##### Purchase this Solution

##### Free BrainMass Quizzes

##### Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

##### Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

##### Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

##### Javscript Basics

Quiz on basics of javascript programming language.

##### Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.