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
I will definitely rate 5 stars/brainliest!!! HELP PLEASE!!! State University must purchase 1,100 computers from three vendors. V
romanna [79]
Why 1+12+ Y3 < 1100
Says the state of university Need to purchase 1100 computers in total, we have the following answer on the way top
3 0
3 years ago
The U.S. Coast Guard requires certain equipment be carried onboard a vessel based on the vessel's length. How must an operator m
nevsk [136]

Answer:

The answer is option B(:

Explanation:

3 0
3 years ago
An asphalt concrete mixture includes 94% aggregate by weight. The specific gravities of aggregate and asphalt are 2.65 and 1.0,
garik1379 [7]

Answer:

2.0%

Explanation:

Percentage of aggregate = 94%

Specific gravity = 2.65

Specific gravity of asphalt = 1.9

Density of mix = 147pcf = 147lb/ft³

Total weight of mix: (volume = 1ft³)

= (147lb/ft³)(1ft³)

= 147lb

Percentage weight of asphalt in<u> mix:</u>

100% - 94%

= 6%

Weight of asphalt binders

= 6% x 147lb

= 8.82lb

Weight of aggregate in mix:

= 94% x 147

= 138.18lb

Specific weight of asphalt binder:

(Gab)(Yw)

Yw = specific Weight of water

= 62.4lb

Gab = specific gravity of asphalt binder

= 1.0

(62.4lb)(1.0)

= 62.4 lb/ft³

Volume of asphalt in binder:

8.82/62.4

= 0.14ft³

Specific weight of binder in mix:

2.65 x 62.4lb/ft³

= 165.36 lb/ft³

Volume of aggregate:

= 138.18/165.36

= 0.84ft³

Volume of void in the mix:

1ft³ - 0.84ft³ - 0.14ft³

= 0.02ft³

<u>The percentage of void in total mix:</u>

VTM = (0.02ft³/1ft³)100

= 2.0%

8 0
3 years ago
A hair dryer is basically a duct in which a few layers of electric resistors are placed. A small fan pulls the air in and forces
nika2105 [10]

Answer:

a) volume flow rate of air at the inlet is 0.0471 m³/s

b) the velocity of the air at the exit is  8.517 m/s

Explanation:

Given that;

The electrical power Input W_elec = -1400 W = -1.4 kW

Inlet temperature of air T_in = 22°C

Inlet pressure of air p_in = 100 kPa

Exit temperature T_out = 47°C

Exit area of the dyer is A_out = 60 cm²= 0.006 m²

cp = 1.007 kJ/kg·K

R = 0.287 kPa·m3/kg·K

Using mass balance

m_in = m_out = m_air

W _elec = m_air ( h_in - h_out)

we know that h = CpT

so

W _elec = m_air.Cp ( T_in - T_out)

we substitute

-1.4 = m_air.1.007 ( 22 - 47 )

-1.4 =  - m_air.25.175

m_air = -1.4 / - 25.175

m_ air = 0.0556 kg/s

a) volume flow rate of air at the inlet

we know that

m_air = P_in × V_in

now from the ideal gas equation

P_in = p_in / RT_in

we substitute our values

= (100×10³) / ((0.287×10³)(22+273))

= 100000 / 84665

P_in = 1.18 kg/m³

therefore inlet volume flowrate will be;

V_in = m_air / P_in

= 0.0556 / 1.18

= 0.0471 m³/s

the volume flow rate of air at the inlet is 0.0471 m³/s

b) velocity of the air at the exit

the mass flow rate remains unchanged across the duct

m_ air = P_in.A_in.V_in = P_out.A_out.V_out

still from the ideal gas equation

P_out = p_out/ RT_out   ( assume p_in = p_out)

P_out = (100×10³) / ((0.287×10³)(47+273))

P_out  = 1.088 kg/m³

so the exit velocity will be;

V_out = m_air / P_out.A_out

we substitute our values

V_out = 0.0556 / ( 1.088 × 0.006)

= 0.0556 / 0.006528

= 8.517 m/s

 Therefore the velocity of the air at the exit is  8.517 m/s

6 0
2 years ago
Which of the following power tools has a revolving vertical shaft and a cutter? *
Morgarella [4.7K]
Saber saw I’m pretty sure
4 0
3 years ago
Read 2 more answers
Other questions:
  • An n- channel enhancement- mode MOSFET with 50 nm thick HfO2 high- k gate dielectric (Pr = 25) has a flat band voltage of 0.5 V,
    5·1 answer
  • If a barrel of oil weighs 1.5 kN, calculate the specific weight, density, and specific gravity of the oil. The barrel weighs 110
    7·1 answer
  • WHO EVER COMMENTS FIRST GETS BRAINLIEST LOL
    15·2 answers
  • Lately, you have noticed some repetitive stress in your wrist. Which sign is most likely the cause of that stress and pain?
    7·1 answer
  • Write a function named "total_population" that takes a string then a list as parameters where the string represents the name of
    5·1 answer
  • A steady state filtration process is used to separate silicon dioxide (sand) from water. The stream to be treated has a flow rat
    5·1 answer
  • In some companies, workers who increase the quantity or quality of their work receive a. benefits. c. performance bonuses. b. pe
    10·1 answer
  • The build up of electrons will cause electrical called ?
    14·1 answer
  • What type of car engine is best for cold weather.
    15·1 answer
  • the tire restraining device or barrier shall be removed immediately from service for any of these defects except
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!