Write down fucntion defintion for the line class constructor

Assignment Help Computer Engineering
Reference no: EM1331950

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 fucntion 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: EM1331950

Questions Cloud

Explaining company overcome ethnocentricity : How does a company overcome ethnocentricity?
Carrying out emergency response : You are dispatched to an explosion at a predominately black church where the pastor has recently been in the news due to his support for a particular candidate for local office.
Salary negotiation : Salary Negotiation - Imagine that a job applicant has been offered a job as an HR officer at Z-firm. Both sides( the applicant and the hiring manager)need to negotiate the starting salary.
Diversity increase the market potential of firm : Can diversity increase the market potential of the firm? If so, how? Can diversity decrease market potential of the firm? If so, how?
Write down fucntion defintion for the line class constructor : write down fucntion defintion for the Line class constructor.
How does resource scarcity influences the market : How does resource scarcity influences the market for a health care good or service, such as blood or organ donation or nursing care facilities and describe choices stakeholders must make.
Chemical agents for terrorist attack : What makes chemical agents a poor choice for a terrorist attack?
Training and development process : The goal of your evaluation should be to improve the training and reporting back to executive management about its success.
Design the function definitions of pixel class constructor : Write the function definitions of the Pixel class constructor adn CurrentStatus member functions.

Reviews

Write a Review

Computer Engineering Questions & Answers

  How to calculate and display the total retail value

A mail order house sells five different products whose retail prices are: product 1 - $150, product 2 - $250, product 3 - $500, product 4 - $300, and product 5 - $350.

  Explaining the trust/security domain boundaries

Recognize and explain Trust/Security Domain boundaries which may be applicable to the personal computer (workstation) security in the business context.

  Programing the calculatepay

You are required to design a program known as “calculatePay” which will prompt a user for their hourly pay rate.

  Problems on relation and functional dependencies

Problems on  relation and functional dependencies

  Transmition of the packet

An Ethernet MAC sub layer receives the 1510 bytes of the data from LLC layer. Explain whether the data encapsulation can be within one frame?

  Developing the gui application

Write down a GUI application which prompts user for a number between 1 and 5. Be sure to involve error checking so that program continues to prompt the user for a number till the user's entry is between 1 and 5, inclusive.

  What is the best way for sending people out

What is the best way for sending people out if one wants the total competition to be over as early as possible? More precisely give an efficient algorithm that produces a schedule whose completion time is as small as possible.

  Provide examples where cannot use logical operators

Search for arithmetic operators used in programming, and give two examples where you cannot use logical operators but you can use arithmetic operators. Also, think of two examples where both kinds of operators are used.

  Why should asks the user to enter a number from 1 to 50

Print the statement "Programming is fun" the number of times entered by the user using the for loop.

  Boolean functions

Simplify the following Boolean functions, using 3-variable maps: F (x,y,z) = Σ(0,2,6,7)

  Prepare visual basic application

Prepare visual basic application.

  Modify program that reads three integer inputs into variable

Write down a program that reads three integer inputs into variables. Display the input values in both the ordered entered and in sorted order. This program should sort the numbers so that value1

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