Write a fucntin defintion for the line class constructor

Assignment Help C/C++ Programming
Reference no: EM13937815

The following class uses composition to define a line object in terms of two point objects.

class line
{
public:
Point startingpoint();
point endingpoint();
float length();
line (int startX, int startY, int endX, int endY);

private:
point startPoint;
point endPoint:

};

1) write a fucntin defintion for the Line class constructor

2) for the line class implement the StartingPoint() and EndingPoint() member functions

3) for the line class implement the lenght() member function. the distance between two points (x1,y1) and (x2,y2) is sqrt ((x1,x2)2 + (x2,y2)2)

Reference no: EM13937815

Questions Cloud

Data presentation and analysis : Research topic Use of English. The end result should be a research report approximately 2,500- 3,000 words in length and structured like the report plan The distribution of maximum marks is as follows:
Produce a short technical report : This is a research assignment to produce a short technical report (apprpximately between 1000-2000 words plus diagrams and figures) with an appropriate referencing list and citations following APA styling.
Based on the limited information provided : Based on the limited information provided, give Cindy an estimate of the net effect of the coupon campaign on annual profit. (Ignore taxes.)
Electric air-furnace capable of temperatures : A material is required for the interior wall of electric air-furnace capable of temperatures up to 1275 K. Think out what attributes a material must have if it is to be made into windings and function properly in a furnace. List the function and t..
Write a fucntin defintion for the line class constructor : The following class uses composition to define a line object in terms of two point objects.
Determine the load from the floor beam : Determine the load from the floor beam, B, that is being supported at the middle of beam A. The floor that it supports has a weight of 0.4 kN/m2; an area 2.5 metres by 6 metres is being carried by the floor beam, half of which is being transferred..
Function definitions of the pixel class constructor : Write client code to print out the current X and coordiantes and the status of the first pixel
Describe the entity underlying business model : Select one of the following entities; Google, Yahoo, DropBox or Amazon. Briefly, describe the entity's underlying business model. Possible approaches for the analysis of the entity's underlying business model include Balanced Scorecard style appro..
Fundamental of structures : a) Find the tensions of the cable CG and FG. b) Find the reactions at A and B. c) By the method of joints to calculate the forces of member AC and CD. d) By the method of sections to calculate the force of member DB.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Find the sixth maclaurin polynomial for sin x

Find the sixth Maclaurin polynomial for sin x and use Chebyshev economization to obtain a lesser-degree polynomial approximation.

  Details of the stock of a shop

David needs to create a program to maintain the details of the stock of a shop. He needs to ensure that item category is Women, Men, Girls, Boys, and Babies. He needs to accept item category from the user.

  Define program testing & documentation

Devise a test plan carefully, making sure that the purpose of the particular test is clearly stated, the data for each test is specified (that is, any inputs expected from the user or the programmer), and a description of the expected result from ..

  Write a program to generate a table of conversions

Write a program to generate a table of conversions from Fahrenheit to Kelvin for values from 0 F to 200 F. Allow the user to enter the increment in degrees Fahrenheit between lines. Use a (do while loop) in your solution.

  Program that prompts the user to enter the year

Write a program that prompts the user to enter the year and the month and displays on the console the calendar table for the month.

  Allows the user to enter the coefficients for a system

Create a graphical (not text-based) Visual C++ program that allows the user to enter the coefficients for a system of four equations with four unknowns. Include a button that when clicked, will solve the system of equations and display the results in..

  The initial data structure with information about a service

Implement a program using function for a defined task. Initial data is read from a file and added from keyboard. Program has to output initial and resulting data.The initial data structure with information about a service:

  Use at least two programmer defined functions

C++ Using an input file similar to the one below, write a program to determine the highest concentration recorded and the number of days the photochemical oxidant concentration exceeded the standard; display number of days and percentage (based on th..

  How can virtual destructors plug a memory leak

What is a pure virtual member function? What is a memory leak? How can virtual destructors plug a memory leak?

  Detailed proposal of the hardware and types

Write a detailed proposal of the hardware and types of NICs you recommend they must purchase to make this project a success.

  Pre and post increament and decrement operators

We are going to overload the following operators in the fract class- pre and post increament (++) and decrement (--) operators

  Defiine an unsorted type adt

Postconditions: list1 contains all the items of list whose keys are less than or equal to item's key; list2 contains all the items of list whose keys are greater than item's key.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd