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
Ohm's law states that the current (I) in amps equals the voltage (E) in volts decided by the resistance (R) in ohm's. If you con
Hitman42 [59]

Answer:

1.14 * 10^-3  amperes

Explanation:

According to ohms law

V = IR   ---- ( 1 )

V = voltage  = 2.4 * 10^3 v

I = current  = ?

R = resistance =  2.1 * 10^6 Ω

from equation 1

I = V / R

 = ( 2.4 * 10^3 ) / (2.1 * 10^6 )

 = 1.14 * 10^-3  amperes

7 0
3 years ago
Explain in detail the difference between the microstructures of a cold worked sample and Recrystallized sample ?
MrRa [10]

Answer:

A recrystallization process differs mainly from a restoration process (microestructures of a cold worked sample) in that  the first, the microstructure of the final product consists mainly of  high angle borders.

Explanation:

The microstructure of a cold worked material has a high energy stored in dislocations and subgrains. During a heat treatment, this microstructure evolves in order to achieve a more stable state by reducing its energy. The complex microscopic mechanisms that take place during this process have been traditionally encompassed in three categories: restoration, recrystallization and grain growth, which will be discussed later.

These processes generally lead to the total or partial recovery of the original properties of the material (ductility, resistance). They can take place under dynamic conditions, that is, during thermomechanical processing or when the material is subsequently deformed at high temperature, and under static conditions, that is, during a heat treatment after thermomechanical processing.

The term <em>restoration</em> encompasses the following succession of micromechanism: formation of dislocation cells,  annihilation of dislocations within them, formation of subgrains and their growth.

<em>A recrystallization process differs mainly from a restoration process in that in the first one the microstructure of the final product is mainly formed by high-angle borders.</em>

7 0
3 years ago
how to calculate the torque when a force is applied on a cog? explain the step-by-step and provide an illustration/diagram. Can
yawa3891 [41]

Explanation:

Torque is the cross product of the radius vector and force vector:

τ = r × F

In other words, it is equal to the radius times the perpendicular component of the force.

τ = r · Ftangential

If we call θ the angle between the radius and the force, then:

τ = r · F sin θ

3 0
3 years ago
Suppose you are asked to design an office building. Explain what type of drawing you would use and why.
ohaa [14]

Answer:

birds-eye view perspective

Explanation:

If someone asked me to design an office building, I would draw it from a birds-eye view perspective. I would draw it this way so I could map out where everything in the office would go and make sure I have enough space for everything. I would also draw it this way in order to clearly see where everything would go in the office. For instance, cubicles/desks could go in the bottom left corner, while the boss's office could go in the top right. It would be easier to organize and it would be easier for me to look back on when I need to actually design the office later.

(i'm not sure if this is what your question is asking for so i just made my best guess)

7 0
3 years ago
Read 2 more answers
Select the properties and typical applications for the high carbon steels.
yanalaym [24]

Answer:

<u>Option-(A)</u>

Explanation:

<u>Typical applications for the high carbon steels includes the following;</u>

It is heat treatable, relatively large combinations of mechanical characteristics. Typical applications: railway wheels and tracks, gears, crankshafts, and machine parts.

3 0
3 years ago
Other questions:
  • The head difference between the inlet and outlet of a 1km long pipe discharging 0.1 m^3/s of water is 0.53 m. If the diameter is
    11·1 answer
  • A heat pump and a refrigerator are operating between the same two thermal reservoirs. Which one has a higher COP?
    10·1 answer
  • In casting experiments performed using a certain alloy and type of sand mold, it took 155 sec for a cube-shaped casting to solid
    9·1 answer
  • Shear modulus is analogous to what material property that is determined in tensile testing? (a)- Percent reduction of area (b) Y
    11·1 answer
  • Which of the following sentences uses the word malleable correctly?
    7·2 answers
  • How long will it take a Honda Civic to travel 118 miles if it is travelling at an average speed of 72 mph?
    6·1 answer
  • Please what is dif<br>ference between building technology and building engineering.​
    14·2 answers
  • Porque el invento de la bombilla es importante?
    6·1 answer
  • Technician A says a 50/50 mix of antifreeze and
    8·1 answer
  • Outline how effective brainstorming should be set up so that it does not go off-track or alienate anyone.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!