1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Liono4ka [1.6K]
2 years ago
9

Write a class called point that represents a point in 2d plane.

Computers and Technology
1 answer:
USPshnik [31]2 years ago
7 0

In this way, writing the code in C++ we can say that it will be possible to make the coordinates on the planes.

<h3>Writing the code we have:</h3>

<em>#include <iostream></em>

<em>#include <cmath></em>

<em>#include <iomanip></em>

<em>using namespace std;</em>

<em>class Point{</em>

<em>private:</em>

<em>float x;</em>

<em>float y;</em>

<em>public:</em>

<em>Point(){ </em>

<em>x = y = 0;</em>

<em>}</em>

<em>Point(float x, float y){ </em>

<em>this->x = x;</em>

<em>this->y = y;</em>

<em>}</em>

<em>float getX(){ </em>

<em>return x;</em>

<em>}</em>

<em>float getY(){</em>

<em>return y;</em>

<em>}</em>

<em>float getDistance(){</em>

<em>return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2));</em>

<em>}</em>

<em>string toString(){ </em>

<em>return "("(x1, y)","(x2, y2)")";</em>

<em>}</em>

<em>};</em>

See more about C code at brainly.com/question/17544466

#SPJ1

You might be interested in
After selecting a cell in the data range, what are some ways to create a table? Check all that apply.
lana66690 [7]

Answer: the answer is B /E

3 0
3 years ago
Read 2 more answers
Each type of text has a purpose for the reader if you were looking to research penguins what type of text would u utilize
dlinn [17]
1. ughhhh not entirely sure but B, 2. again not entirely sure should be B as well and finally 3.is D remember these are not always the answer just most likely what one person thinks
3 0
3 years ago
Plz answer all the questions :)
AURORKA [14]

Answer:

is there multiple choice or do i have to answer from my own words??

7 0
3 years ago
How to program a concrete Damage-Plasticity material?
goldenfox [79]
A simple scanner. that you by at the stor
7 0
3 years ago
Answer the following questions based on your readings from Module 1. Describe a time when you or someone you observed showed a p
Mila [183]

Answer:

An example  of poor work ethic which I encountered recently was the observation of poor hygiene by an employee of a fast-food outlet of a renowned company.

Explanation:

Some patties suddenly slipped out of his hands and fell on the ground. He did not discard them and simply put them into burg adversely. ers. The fall must have soiled and contaminated them, which would affect the health of consumers. Such incidents can be avoided by the company by training the staff in such possibilities and suggesting corrective actions. Monitoring and taking action against offenders will also help. IT professionals should have good analytical and interpersonal skills besides cross-cultural sensitivity to do good in their roles.

You should apologize for his mistake for reaching the wrong place. The message should be through an electronic message ( sms ) or another instant messaging service, followed by a telephone call. The content of the message should comprise of an apology for not being able to reach in time, the reason for the misunderstanding, your current location and the approximate time it will take to reach the venue. It will be better if you share your location with the client through a GPS enabled application, so that it will be convenient to coordinate.

The tow more skills that are good for IT professionals the the skill off After sale services, and to establish a good relationship with clients.

4 0
3 years ago
Other questions:
  • What is an effective way to assess user requests for additional features and functions
    10·1 answer
  • Webster defines risk as "the possibility of loss or injury". Therefore, driving a motor vehicle is a risk.
    12·1 answer
  • How much health did a supply drop balloon originally have??
    7·2 answers
  • Which of the following is a programming language that permits Web site designers to run applications on the user's computer?
    15·1 answer
  • Please tell fast plzzzzzz​
    5·2 answers
  • HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP!!!
    12·1 answer
  • Fill in the Blank
    10·2 answers
  • Questic
    8·1 answer
  • ________ take advantage of vulnerabilities in software. Group of answer choices Blended threats Bots Trojan horses Direct-propag
    6·1 answer
  • The area that we can see just after windows is started is subject​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!