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

  Show how this priority queue is affected by adding string

To tell if one element in ZooGraph has relation X to another element, you look for a path between them. Show whether the following statements are true, using the picture or adjacency matrix.

  Object-oriented programming-event-driven programming

Use the Internet or Strayer databases to research the advantages, features, and common examples of OOP and EDP. Note: You may use the Association for Computing Machinery (ACM) Digital Library to support research on the above topics. Instructions d..

  Lu decomposition with gauss elimination

The LU decomposition with Gauss elimination and what is the physical interpretation of the elements of ? Write C++ programs for steps 2, 3, and 4.

  Write specifications for a method

Write specifications for a method that advances any given date by one day. Include a statement of purpose, pre- and post-conditions, and a description of the parameters.

  Generate a random number

Generate a random number between 1 – 5 and 3 – 8 for express and normal lanes, respectively. This represents the arrival time of the first customer into each lane. Set the variable for total time elapsed to 0.

  Complete the leadership in action case study

Complete the Leadership in Action case study for Lehman Brothers on page 276-277 in your textbook.

  Build a definition for a class that stores data

Using C++ language, build a definition for a class that stores data about a two dimensional vector. The class has to have mutators and accessors to get and set the x and y values. Make x and y integers. Then overload the operator * so that it retu..

  Build a randomly generated simple substitution cipher

Design, implement and test classes in C++ Apply and implement ? overloaded? operators and functions Design and implement classes using inheritance

  C string and two int reference parameters

Write a complete function, not an entire program, that has a C string and two int reference parameters (call them a and b), returning nothing.

  Create a boolean function that computes

Create a Boolean function that computes the value of a factorial for values up to including 10. Include comments about how to use the function and describing how it works.

  Where is the error in this code sequence?

Where is the error in this code sequence?Explain what the problems are and how to fix them.

  Write a header for the pow function

Write a header for the pow function that returns a double and takes two parameters a double named base and an integer named exp.

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