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
What do you own that might not be manufactured?
horrorfan [7]

Answer:

A pet

Explanation:

Latin time I checked animals aren't made by people? I honestly don't know if this helps but I'm technically not wrong.

8 0
3 years ago
The heat required to raise the temperature of m (kg) of a liquid from T1 to T2 at constant pressure is Z T2CpT dT (1) In high sc
a_sh-v [17]

Answer:

(a)

<em>d</em>Q = m<em>d</em>q

<em>d</em>q = C_p<em>d</em>T

q = \int\limits^{T_2}_{T_1} {C_p} \, dT   = C_p (T₂ - T₁)

From the above equations, the underlying assumption is that  C_p remains constant with change in temperature.

(b)

Given;

V = 2L

T₁ = 300 K

Q₁ = 16.73 KJ    ,   Q₂ = 6.14 KJ

ΔT = 3.10 K       ,   ΔT₂ = 3.10 K  for calorimeter

Let C_{cal} be heat constant of calorimeter

Q₂ = C_{cal} ΔT

Heat absorbed by n-C₆H₁₄ = Q₁ - Q₂

Q₁ - Q₂ = m C_p ΔT

number of moles of n-C₆H₁₄, n = m/M

ρ = 650 kg/m³  at 300 K

M = 86.178 g/mol

m = ρv = 650 (2x10⁻³) = 1.3 kg

n = m/M => 1.3 / 0.086178 = 15.085 moles

Q₁ - Q₂ = m C_p' ΔT

C_p = (16.73 - 6.14) / (15.085 x 3.10)

C_p = 0.22646 KJ mol⁻¹ k⁻¹

6 0
3 years ago
Which of the following headlines about the French Revolution is not true?
Sever21 [200]

Answer:

d) "Napoleon Declares Himself Holy Roman Emperor"

Explanation:

The French Revolution is defined as a period of the major social upheaval which began in the year 1787 and lasted till year 1799. This revolution completely redefined the the very nature of the political power in France. and also the relationship between the rulers of France and the people they governed.

The 1789 Estates-General was the 1st meeting since year 1614 of the French Estates-General. It is a general assembly which represents the French estates of  realm.

During the French revolution was at peak, the National Assembly issued the Declaration of the rights of the man to the public.

Maximilien Robespierre was considered to be one of the most influential figure and most important statesman during the French Revolution.

Thus all the options (a),(b) and (c) are headlines about the French Revolution, except option (d).

3 0
3 years ago
A 0.2-m^3 rigid tank equipped with a pressure regulator contains steam at 2MPa and 320C. The steam in the tank is now heated. Th
prohojiy [21]

Answer:

Q=486.49 KJ/kg

Explanation:

Given that

V= 0.2 m³

At initial condition

P= 2 MPa

T=320 °C

Final condition

P= 2 MPa

T=540°C

From steam table

At P= 2 MPa and T=320 °C

h₁=3070.15 KJ/kg

At P= 2 MPa and T=540°C

h₂=3556.64  KJ/kg

So the heat transfer ,Q=h₂ - h₁

Q= 3556.64 - 3070.15  KJ/kg

Q=486.49 KJ/kg

7 0
3 years ago
Obtain a relation for the logarithmic mean temperature difference for use in the LMTD method?
kolezko [41]

Answer:

The log mean temperature difference is:

ΔT,lm=(ΔT1-ΔT2)/㏑(ΔT1/ΔT2)

Explanation:

To evaluate the equivalent average temperature difference between two fluids we consider a parallel-flow double-pipe heat exchanger (see attached diagram). The temperature of the hot and cold fluids is large at the inlet of the heat exchanger and decreases exponentially toward the outlet.  

We can assume that the outer surface of the heat exchanger is well insulated and that heat transfer only occurs between the two fluids. We can also assume negligible kinetic and potential. The energy balance on each fluid can be written as the rate of heat loss from the hot fluid is equal to the rate of heat gained by the cold fluid in any section of the heat exchanger:

Q = -m,h×c,ph×dT,h   (1)

where Q=rate of heat loss, m=mass flow rate, c,ph=heat capacity of the hot fluid, dT,h= differential temperature of the hot fluid

Q = m,c×c,pc×T.c  (2)

where Q=rate of heat loss, m=mass flow rate, c,ph=heat capacity of the cold fluid, dT,h= differential temperature of the cold fluid

The temperature of the hot fluid change is negative and is added to make Q positive. Solving equations 1 and 2 in terms of dT:

dT.h = - Q/(m,h×c,ph)

dT.c =  Q/(m,c×c,pc)

and taking the difference:

dT,h-dT,c= d(T,h - T,c) = -Q(1/(m,h×c,ph) + 1/(m,c×c,pc)) (3)

The heat transfer rate in the differential section of the heat exchanger can be expressed as:

Q = U(T,h-T,c)×dA,s  (4)

where U=overall heat transfer coefficients, dA,s = differential sectional area. Substitute equation 4 into 3:

d(T,h - T,c)/(T,h - T,c) = -U×dA,s×(1/(m,h×c,ph) + 1/(m,c×c,pc))  (5)

Integrating equation 5:

㏑((T,h out - T,c out)/(T,h in - T,c in)) = -U×A,s×(1/(m,h×c,ph) + 1/(m,c×c,pc))  (6)

The first law of thermodynamics requires the rate of heat transfer from hot and cold fluid to be equal.

Q= m×c, pc×(T, c out-T, c in)  (7)

Q= m×c, ph×(T,h out-T, h in)   (8)

Solve equations 7 and 8 for m,c×c, pc and m,h×c, ph and substituting into equation 6:

Q = U×A,s×ΔT,lm

Where the log mean temperature difference is:

ΔT,lm=(ΔT1-ΔT2)/㏑(ΔT1/ΔT2)

Download pdf
8 0
3 years ago
Other questions:
  • Please help <br> please i need to turn this in
    13·1 answer
  • Example – a 100 kW, 60 Hz, 1175 rpm motor is coupled to a flywheel through a gearbox • the kinetic energy of the revolving compo
    12·1 answer
  • Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's
    11·2 answers
  • What is (10 to the power of three) times (3 to the power of 10)? will give brainliest
    13·1 answer
  • Products. of sheet metal​
    8·1 answer
  • FREE 50 points &amp; maybe one brain liest
    5·2 answers
  • Plzzzz helppp design process in order
    12·1 answer
  • The ruler game, HELPPPP PLS
    11·2 answers
  • 9. A piece of Cherry wood is 5/4 x 4" X 4'<br> What is the length in inches?
    10·1 answer
  • Explain how smart materials can be used by manufacturers to improve health and safety for children's products and goods.​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!