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
vladimir1956 [14]
3 years ago
13

A point in the x-y plane is represented by its x-coordinate and y-coordinate. Design the class Point that can store and process

a point in the x-y plane. You should then perform operations on a point, such as showing the point, setting the coordinates of the point, printing the coordinates of the point, returning the x-coordinate, and returning the y-coordinate. Also, write a test program to test various operations on a point.
Engineering
1 answer:
Black_prince [1.1K]3 years ago
5 0

Answer:

#include <iostream>

#include <iomanip>

using namespace std;

class pointType

{

public:

pointType()

{

x=0;

y=0;

}

pointType::pointType(double x,double y)

{

this->x = x;

this->y = y;

}          

void pointType::setPoint(double x,double y)

{

this->x=x;

this->y=y;

}

void pointType::print()

{

cout<<"("<<x<<","<<y<<")\n";

}

double pointType::getX()

{return x;

}

double pointType::getY()

{return y;

}

private:

   double x,y;

};

int main()

{

pointType p2;

double x,y;

cout<<"Enter an x Coordinate for point ";

cin>>x;

cout<<"Enter an y Coordinate for point ";

cin>>y;

p2.setPoint(x,y);

p2.print();

system("pause");    

return 0;

}

You might be interested in
Implement the following Matlab code:
vagabundo [1.1K]
28384 *x soít cos estematema
3 0
3 years ago
Discuss the organizational system that you believe would be the most effective for the safety officer in a medium-sized (100-200
marin [14]

Answer:

A safety manager is a person who designs and maintains the safety elements at workplace. A balance should be required for production and the job in providing work environment. As a safety officer in a medium sized manufacturing facility the following organizational system can be designed and maintained:

  • Maintaining a workplace as per the guidelines by Occupational safety and health association. The rules and regulation should be such that maintains the manufacturing facilities.  
  • For warning to workers proper labelling, floor mapping, signs, posters should be used.  
  • Procurement and usage of safe tools.  
  • A guideline that describes safety standard and precautionary measures should be available to the workers. They should be aware about all the steps that needs to be taken in crisis.  
  • Ensuring that the workers have enough training safety and health or accident prevention.  
  • Identify and eliminate the hazardous elements from the workplace.  
  • A strict action should be taken against the worker in case of violation of rules and not adhering with guidelines.

3 0
3 years ago
Select the correct answer.
MAVERICK [17]

Answer:crane and engine I guess

Explanation:

8 0
3 years ago
Spring-loaded rack guide yokes are made of ______ and have a spring that pushes on the back side of the rack to help reduce the
Kobotan [32]

Answer:

metal

Explanation:

A yoke assembly are use in an assembly of a rack and pinion steering gear for a vehicle. The spring loaded yokes guided with a rack are made up of metals. It consists of a spring made of steel which pushes the back side of the rack to reduce the play that occurs between the pinion and the rack and still allow the relative motion.

6 0
3 years ago
1. Assume that EAX contains ff ff ff 51 and the doubleword referenced by value contains ff ff ff f1.
IRINA_888 [86]

Answer:

1. True

2. False

Explanation:

given data

EAX contains =  ff ff ff 51

doubleword referenced = ff ff ff f1

conditional jump add = eax

solution

1st statement is true

but 2nd statement is false

as here

  • js or jne instruction is the conditional jump that is follow a test
  • It jump to the specified location when  previous instructions are set the SF (Sign Flag) .
6 0
3 years ago
Other questions:
  • When the outside temperature is 5.2 ⁰C, a steel beam of cross-sectional area 52 cm2 is installed in a building with the ends of
    8·1 answer
  • Are engineers needed in today’s society ? Why or why not ? I need a short three paragraph essay !!! Please help me !!!
    13·1 answer
  • Water at 20 °C is flowing with velocity of 0.5 m/s between two parallel flat plates placed 1 cm apart. Determine the distances f
    5·1 answer
  • Three single-phase, 10 kVA, 2400/280 V, 60-Hz transformers are connected to form a three-phase, 2400/480 V transformer The equiv
    15·1 answer
  • A 36 ft simply supported beam is loaded with concentrated loads 16 ft inwards from each support. On the left side, the dead load
    7·1 answer
  • Which type of load generates a magnetic field?
    12·1 answer
  • Determine the magnitude and the location of the hydrostatic force on the 2m by 4 m vertical rectangular gate shown in Figure P3.
    12·1 answer
  • If my current directory is ‘AR’ write the path for my current directory
    5·1 answer
  • Suppose to build RSA crypto system you picked primes "p" and "q" as 3 and 7 and "e" as 5 what are the public and private keys? W
    11·1 answer
  • 7. If you can't ignore a distraction, what should you do?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!