Checkout
checkout
view
Your Cart Your Cart: item(s)
Subjects -> Computer Science -> Other -> Posting #47777
Add to Shopping Cart
$2.19 Instant Download
Computer Science, Other
Year 3

Building Classes


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.

**NOTE: Request to have the problem resolved in C++

By OTA:  Nitu Singal, MBA

OTA Rating:  4.8/5

Your Price:  $2.19  (original value ~$7.98)

What's included:

  • Plain text response
  • Attachment(s):
    • 777.CPP
    • 47777.CPP
$2.19 Download Add to Cart

Add to Shopping Cart
$2.19 Instant Download
Arrays, vectors, and STL - The Rinky Dooflingy Company manufactures different kinds of doofingies, each identified b a product number. Write a program that reads product number and prices and stores these values in two arrays, number and price;number[0] and price[0] are the product number and unit price for the first item, number[1] and price[1] aare the product number and unit price for the s...
Arrays, vectors, and STL - If x denotes the mean of a sequence of numbers x1, x2,.....xn, the variance is the average of the squares of the deviations of the numbers from the mean, and the standard deviation is the square root of the variance. Write functions to calculate the mean, variance, and standard deviation of the values stored in an array and a driver program to test your functions.
Classes and Enumerators - Use the type Date (consisting of a month name, day number, and a year number) to develop a class Event to model events scheduled for specified dates. use this class in a program that reads several events and stores these in a vector of Events. After all the events have been entered, the program should display a schedule of events in chronological order.
Files and Streams - People from three different income levels, A, B, and C, rated each of two different products with a number 0 through 10. Construct a file in which each line contains the income level and product rankings for one respondent. Then write a program tht reads this information and calculates the following: a. for each income bracket, the average rating for product 1; b. the numbe...
Files and Streams - Information about computer terminals in a computer network is maintained in a file. The terminals are numbered 1 through 100, and information about the nth terminal is stored in the nth line of the file. This information consists of a terminal type (string), the building in which it is located (string), the transmission rate (integer), and access code (character), and the dat...

Page generated in 0.1086 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples