Using Java..
Implement the Speaker interface:
public interface Speaker {
public void speak();
public void announce(String str);
}
Then, create three classes that implement Speaker in various ways:
SpeakerOfTheHouse: speak method prints "I am Speaker of the House.", and
the announce method takes the name of a bill in the form of a string
and prints it in the sentence "The [bill] has passed!"
SportsAnnouncer: speak method prints "Goal!", and the announce method
takes the name of a team in the form of a string and prints the sentence
"The [team] have scored a goal!"
Actor: speak method prints "I've been nominated for three Academy
Awards.", and the announce method takes the name of a movie in the form
of a string and prints the sentence, "I'm currently staring in [movie]."
Create a driver class , and in the main method , prompt the user to enter three
Strings -- the name of a bill, the name of a sports team, and the name of a movie.
Then, create an object from each of the classes described above and call the speak
and announce methods of each object , using the strings provided by the user.

Answers

Answer 1

Answer:

The source code files for this question have been attached to this response.

Please download it and go through each of the class files.

The codes contain explanatory comments explaining important segments of the codes, kindly go through these comments.


Related Questions

An urn contains r red, w white, and b black balls. Which has higher entropy, drawing k ~2 balls from the urn with replacement or without replacement? Set it up and show why. (There is both a hard way and a relatively simple way to do this.)

Answers

Answer:

The case with replacement has higher entropy

Explanation:

The complete question is given:

'Drawing with and without replacement. An urn contains r red,  w white  and b black balls. Which has higher entropy, drawing k ≥ 2 balls from the urn with  replacement or without replacement?'

Solution:

- n drawing is the same irrespective of whether there is replacement or not.

-  X to denotes drawing from an urn with r red balls,  w white balls and b black balls. So, n = b + r +  w.

We have:

                                      p_X(cr) = r / n

                                      p_X(cw) = w / n

                                      p_X(cb) = b / n

- Now, if  Xi is the ith drawing with replacement then Xi are independent and p_Xi (x) = pX(x) for x e ( cr , cb , cw ).

- Now, let  Yi be the ith drawing with replacement where Yi are not independent p_Yi (x) = pX(x) for x ∈ X.

- To see this, note  Y1 =  X and assume it is true for  Yi and consider  Yi+1:

    p_Y(i+1) (cr) = p(Y(i+1),Yi).(cr, cr) + p(Y(i+1),Yi).(cr, cw) + p(Y(i+1),Yi).(cr, cb)

= pY(i+1)|Yi  (cr|cr)*pYi  (cr) +pY(i+1)|Yi  (cr|cw)*pYi (cw) + pY(i+1)|Yi  (cr|cb)*pYi (cb)

= r*( r - 1 )/n*(n-1) + w*r/n*(n-1) + b*r/n*(n-1) = r / n =  p_X(cr)

- This means, using the chain rule and the conditioning theore m:

H(Y1, Y2, . . . , Yn) =  H(Y1) +  H(Y2|Y1) +  H(Y3|Y2, Y1) + ... H(Yn|Yn−1, . . . , Y1)

=< SUM H(Yi) = n*H(X) =  H(X1, X2, . . . , Xn)

- with equality if and only if the  Yi were independent:

                          H(Y1, Y2, . . . , Yn) < H(X1, X2, . . . , Xn)

Answer: The case with replacement has higher entropy

   

Suppose you are implementing a relational employee database, where the database is a list of tuples formed by the names, the phone numbers and the salaries of the employees. For example, a sample database may consist of the following list of tuples:

[("John", "x3456", 50.1) ; ("Jane", "x1234", 107.3) ; ("Joan", "unlisted", 12.7)]
Note that I have written parentheses around the tuples to make them more readable, but the precedences of different operators in OCaml make this unnecessary.

Define a function

find_salary : ((string * string * float) list) -> string -> float
that takes as input a list representing the database and the name of an employee and returns his/her corresponding salary. Think also of some graceful way to deal with the situation where the database does not contain an entry for that particular name, explain it, and implement this in your code.

Define a function

find_phno : ((string * string * float) list) -> string -> string
that is like find_salary, except that it returns the phone number instead.

What I have so far:

let rec find_salary li nm =
let rec helper name s =
match li with
| [] -> 0.0
| (n, p, s) :: t -> if (name = n) then s
else
helper t name

Answers

Answer:

Explanation:

val db = ("John", "x3456", 50.1) :: ("Jane", "x1234", 107.3) ::

        ("Joan", "unlisted", 12.7) :: Nil

 

type listOfTuples = List[(String, String, Double)]

def find_salary(name: String) = {

 def search(t: listOfTuples): Double = t match {

   case (name_, _, salary) :: t if name == name_ => salary

   case _ :: t => search(t)

   case Nil    =>

     throw new Exception("Invalid Argument in find_salary")

 }

 search(db)

}

def select(pred: (String, String, Double) => Boolean) = {

 def search(found: listOfTuples): listOfTuples = found match {

   case (p1, p2, p3) :: t if pred(p1, p2, p3)  => (p1, p2, p3) :: search(t)

   case (p1, p2, p3) :: t if !pred(p1, p2, p3) => search(t)

   case Nil => Nil

   case _ => throw new Exception("Invalid Argument in select function")

 }

 search(db)

}

 

println("Searching the salary of 'Joan' at db: " + find_salary("Joan"))

println("")

 

val predicate = (_:String, _:String, salary:Double) => (salary < 100.0)

println("All employees that match with predicate 'salary < 100.0': ")

println("\t" + select(predicate) + "\n")

An AM radio transmitter radiates 550 kW at a frequency of 740 kHz. How many photons per second does the emitter emit?

Answers

Answer:

1121.7 × 10³⁰ photons per second

Explanation:

Data provided in the question:

Power transmitted by the AM radio,P = 550 kW = 550 × 10³ W

Frequency of AM radio, f = 740 kHz = 740 × 10³ Hz

Now,

P = [tex]\frac{NE}{t}[/tex]

here,

N is the number of photons

t is the time

E = energy = hf

h = plank's constant = 6.626 × 10⁻³⁴ m² kg / s

Thus,

P = [tex]\frac{NE}{t}[/tex] = [tex]\frac{N\times(6.626\times10^{-34}\times740\times10^{3})}{1}[/tex]          [t = 1 s for per second]

or

550 × 10³ = [tex]\frac{N\times(6.626\times10^{-34}\times740\times10^{3})}{1}[/tex]

or

550 = N × 4903.24 × 10⁻³⁴

or

N = 0.11217 × 10³⁴ = 1121.7 × 10³⁰ photons per second

The number of photons that are emitted by this AM radio transmitter is equal to [tex]1.12 \times 10^{33}\;photons.[/tex]

Given the following data:

Power = 550 kW.Frequency = 740 kHz.

Scientific data:

Planck constant = [tex]6.626 \times 10^{-34}\;J.s[/tex]

How to calculate the number of photons.

In order to determine the number of photons that are being emitted by this AM radio transmitter, we would solve for the quantity of energy it consumes by using Planck-Einstein's equation.

Mathematically, the Planck-Einstein relation is given by the formula:

[tex]E = hf[/tex]

Where:

h is Planck constant.f is photon frequency.

Substituting the given parameters into the formula, we have;

[tex]E = 6.626 \times 10^{-34}\times 740 \times 10^3\\\\E = 4.903 \times 10^{-28}\;Joules.[/tex]

For the number of photons:

[tex]n=\frac{Power}{Energy} \\\\n=\frac{550 \times 10^3}{4.903 \times 10^{-28}} \\\\n=1.12 \times 10^{33}\;photons.[/tex]

Read more on photon frequency here: https://brainly.com/question/9655595

A horizontal curve on a two-lane highway (10-ft lanes) is designed for 50 mi/h with a 6% superelevation. The central angle of the curve is 35 degrees and the PI is at station 482 + 72. What is the station of the PTand how many feet have to be cleared from the lane's shoulder edge to provide adequate stopping sight distance?

Answers

Answer:

The PT station is at 485+20.02 and 21.92 ft are to be cleared from the lane's shoulder to provide adequate stopping sight distance.

Explanation:

From table 3.5 of Traffic Engineering by Mannering

R_v=835

R=835+(10ft/2)= 840 ft.

Now T is given as

T=R tan(Δ/2)

Here Δ is the central angle of curve given as 35°

So

T=R tan(Δ/2)

T=840 x tan(35/2)

T=840 x tan(17.5)

T=264.85

Now

STA PC=482+72-(2+64.85)=480+07.15

Also L is given as

L=(π/180)RΔ

Here R is the radius calculated as 840 ft, Δ is the angle given as 35°.

L=(π/180)RΔ

L=(π/180)x840 x35

L=512.87 ft

STA PT=480+07.15+5+12.87=485+20.02

Now Ms is the minimum distance which is given as

[tex]M_s=R_v(1-cos(\frac{90 \times SSD}{\pi Rv}))\\[/tex]

Here R_v is given as 835

SSD for 50 mi/hr is given as 425 ft from table 3.1 of Traffic Engineering by Mannering

So Ms is

[tex]M_s=R_v(1-cos(\frac{90 \times SSD}{\pi Rv}))\\M_s=835(1-cos(\frac{90 \times 425}{\pi 835}))\\M_s=26.92 ft[/tex]

Now for the clearance from the inside lane

Ms=Ms-lane length

Ms=26.92-5= 21.92 ft.

So the PT station is at 485+20.02 and 21.92 ft are to be cleared from the lane's shoulder to provide adequate stopping sight distance.

When a thin glass tube is put into water, the water rises 1.4 cm. When the same tube is put into hexane, the hexane rises only 0.4 cm. Complete the sentences to best explain the difference.

Answers

Answer:

Due to differences in the nature of the adhesive force and cohesive forces in the molecules of the individual substances and the glass tube.

Explanation:

To understand why this is so, a deep understanding of adhesive and cohesive force is required.

First, what is adhesive force?

Note: Adhesive and cohesive forces are best discussed under macroscopic level.

Adhesive force is the Intermolecular forces that exist between atoms of different molecules e g the forces explain when unlike charges stick together.

Cohesive force on the other hand is the Intermolecular force that exist between atoms of the same molecules e.g the force between hydrogen bonding.

Hence to explain the case scenario above, the adhesive force between the water molecules and the glass molecules is higher than the cohesive force between the water molecules. Hence the high rise.

For the case of the Hexane, the cohesive forces between the molecules hexane is far greater then the adhesive force between the glass molecules and the hexane molecules.

5 kg of steam contained within a piston-cylinder assembly undergoes an expansion from state 1, where the specific internal energy is u1 = 2709.9 kJ/kg, to state 2, where u2 = 2659.6 kJ/kg.
During the process, there is heat transfer to the steam with a magnitude of 80 kJ. Also, a paddle wheel transfers energy to the steam by work in the amount of 18.5 kJ.
There is no significant change in the kinetic or potential energy of the steam.
Determine the energy transfer by work from the steam to the piston during the process, in kJ.

Answers

Answer:

Energy Transfer  =  350 kJ

Explanation:

The net work can be determined from an energy balance. That is, with assumption

∆KE + ∆PE + ∆U = Q − W

Where

∆KE = ∆PE = 0 (Since There is no significant change in the kinetic or potential energy of the steam)

The net work is the sum of the work associated with the paddlewheel Wpw

and the work done on the piston Wpiston:

W = Wpw + Wpiston

From the given information, Wpw= −18.5 kJ,

Collecting results:

Wpw + Wpiston = Q − ∆U

Wpiston = Q − ∆U − Wpw= Q − m (u2− u1) − Wpw

Where Q=80kJ, m=5kg, u2 = 2659.6 kJ/kg,  u1 = 2709.9 kJ/kg

= 80 kJ − 5 kg (2659.6 − 2709.9)kJ/kg − ( −18. 5 kJ)

= 350 kJ

The energy transfer by work from steam to piston is ; [tex]W_{p}[/tex] =  350 kJ

Given that ;

ΔU = ( 2659.6 - 2709.9 ) = - 50.3 kJ/Kg

Q ( heat magnitude ) = 80 kJ

m ( mass of steam ) = 5 kg

Energy transferred by paddle wheel ( [tex]W_{pp}[/tex] ) = - 18.5 kJ

Energy transferred to piston ( [tex]W_{p}[/tex] ) = ?

Total work done given that there is no change on K.E. and P.E.

Total work done = m ( ∆U ) = Q - W  ----- ( 1 )

where W = [tex]W_{pp} + W_{p}[/tex]

Equation ( 1 ) becomes

ΔU = Q - [tex]( W_{PP} + W_{P} )[/tex] ------ ( 2 )

Therefore the energy transferred to piston by work from steam ( [tex]W_{p}[/tex] )

[tex]W_{p}[/tex] = Q - m( ΔU )  - [tex]W_{pp}[/tex]

     = 80 - 5(- 50.3 ) - ( -18.5 )

     = 350 kJ

Hence the The energy transfer by work from steam to piston is ; [tex]W_{p}[/tex] =  350 kJ

Learn more : https://brainly.com/question/2931410

A firm has 62 employees. During the year, there are seven first-aid cases, three medicaltreatment injuries, an accident in which an injured employee was required to work 1 week in restricted work activity, a work-related illness in which the employee lost 1 week of work, a work-related illness in which the employee lost 6 weeks of work, and a fatality resulting from an electrocution. Calculate the total incidence rate, the number-of-lostworkdays rate, and the LWDI.

Answers

Answer:

The answers to the question are

11.2967.746.45

Explanation:

The number of employees in the firm = 62

Number of first-aid cases = 7

Number of medical treatment injuries = 3

Injury resulting restricted work activity = 1

Illness resulting in one week loss work day = 1

Illness resulting in loss of 6 weeks of work =1

Incident resulting in fatality = 1

Total incidence rate

Total hours worked = 40×62×50  = 124000 Hrs

Where 200,000 is the number of hours worked by Full time employees numbering 100 that  work for 40 Hours a week for 50 weeks in a year

Number of recordable incident =  Those incident that results in lost work days, death, restricted ability to work, or transfer to another task or more severe injury treatment beyond first aid

Therefore number recordabe incident = 7

Recordable Incident Rate is calculated by

IR = (Number of recordable incident Cases X 200,000)÷(Number of Employee labor hours worked)

= (7×200000)/124000= 11.29

The number-of-lostworkdays rate

The Lost Workday Rate is given by

Lost Workday Rate = (Total number of days lost to injury or illness)÷( Cumulative number of hours employees worked) × 200000

Total number of days lost to injury or illness = 42 days

Lost Workday Rate = (42/124000) × 200000 = 67.74

LWDI. Lost Work Day Injury

LWDI = (Number of incident resulting in lost workdays and restricted activity) ×200000 /(Total number of hours worked by all employees in one year)

LWDI = LWD×200000/ EH = 4×200000/124000 = 6.45

LWDI  = 6.45

A motor keep a Ferris wheel (with moment of inertia 6.8 × 107 kg · m 2 ) rotating at 12 rev/hr. When the motor is turned off, the wheel slows down (because of friction) to 9.6 rev/hr in 17 s. What was the power of the motor that kept the wheel rotating at 12 rev/hr despite friction? Answer in units of W.

Answers

Answer:

Power of the motor that kept the wheel rotating at 12 rev/hr despite friction is 342.79W.

Explanation:

Pls refer to the attached file. The explanation is long to pen down here.

The air contained in a room loses heat to the surroundings at a rate of 50 kJ/min while work is supplied to the room by computer, TV, and lights at a rate of 1.2 kW. What is the net amount of energy change of the air in the room during a 30-min period?

Answers

Answer:

net amount of energy change of the air in the room during a 30-min period = 660KJ

Explanation:

The detailed calculation is as shown in the attached file.

Answer:

660KJ

Explanation:

Given

Let Q = Heat Loss from room = 50kj/min

Let W = Work Supplied to room = 1.2KW

1 kilowatt = 1 kilojoules per second

So, W = 1.2KJ/s

In heat and work (Sign Convention)

We know that

1. Heat takes positive sign when it is added to the system

2. Heat takes negative sign when it is removed from the system.

3. Work done is considered positive when work is done by the system

4. Work done is considered negative when work is done on the system.

From the above illustration, heat loss (Q) = -50KJ/Min

In 30 minutes time, Q = -50Kj/Min * 30 Min

Work done in 30 minutes = -1500 KJ

Also, work supplied = -1.2Kj/s

Work supplied to the system in 30 minutes = -1.2Kj/s * 30 minutes

W = -1.2 KJ/s * 30 * 60 seconds

W = -2160KJ

In thermodynamics (First Law)

Q = W + ΔU

-1500 = -2160 + ΔU

∆U = 2160 - 1500

∆U = 660KJ

An air-standard Otto cycle has a compression ratio of 6 and the temperature and pressure at the beginning of the compression process are 520 deg R and 14.2 lbf/in^2, respectively. The heat addition per unit mass of air is 600 Btu/lb. Determine (a) the maximum temperature, in deg R.

Answers

Answer:

The maximum temperature of the cycle is 1065⁰R

Explanation:

The maximum temperature in degree Rankin can be obtained using the formula below;

[tex]\frac{T_2}{T_1} =[\frac{V_1}{V_2}]^{1.4-1}[/tex]

Where;

T₂ is the  maximum temperature of the cycle

T₁ is the initial temperature of the cycle = 520 deg R = 520 ⁰R

V₁/V₂ is the compression ratio = 6

[tex]T_2 = T_1(\frac{V_1}{V_2})^{0.4}[/tex]

[tex]T_2=T_1(6)^{0.4}[/tex]

[tex]T_2=520^0R(6)^{0.4}[/tex]

T₂ = 1064.96 ⁰R

Therefore, the maximum temperature of the cycle is 1065⁰R

The winch on the truck is used to hoist the garbage bin onto the bed of the truck. If the loaded bin has a weight of 8500 lb and center of gravity at G, determine the force in the cable needed to begin the lift. The coefficients of static friction at A and B are ,MuA = 0.2 And MuB = 0.3 respectively. Neglect the height of the Support at A.

Answers

Answer:

T = 3600 lb

Explanation:

Given:

- coefficient of static friction @a u_a = 0.2

- coefficient of static friction @b u_b = 0.3

- Weight of the loaded bin W = 8500 lb

Find:

- Find the force in the cable needed to begin the lift.

Solution:

- Draw the forces on the diagram. see attachment.

- Take sum of moments about point B as zero:

                     (M)_b =   W*12 - N_a * 22 = 0

                      N_a = W*12 / 22 = 8500*12 / 22

                      N_a = 4636.364 lb

- Compute friction force F_a @ point A:

                      F_a = u_a*N_a = 4636.364*0.2

                      F_a = 927.2727 lb

- Take sum of moments about point A as zero:

                     -W*10 - F_b*sin(30)*22+ 22*N_b*cos(30) + 22*T*sin(30) = 0

Where,           F_b = u_b*N_b = N_b*0.3            

Hence,           -85000 - 3.3*N_b + 11sqrt(3)*N_b + 11 T = 0

                      15.753*N_b + 11*T = 85000    ...... 1    

- Take sum of forces in x-direction equal to zero:

                      T*cos(30) - N_b*sin(30) - u_b*N_b*cos(30) - F_a = 0

                      T*cos(30) - 0.75981*N_b = 927.2727   ..... 2

- Solve two equation simultaneously:

                      T = 3600 lb , N_b = 2882 lb

                   

Light from a helium-neon laser (λ = 633 nm) illuminates two slits spaced 0.50 mm apart. A viewing screen is 2.5 m behind the slits. What is the spacing between two adjacent bright fringes?

Answers

Final answer:

The spacing between two adjacent bright fringes, when a helium-neon laser with a wavelength of 633 nm illuminates two slits 0.50 mm apart and a screen is placed 2.5 m behind the slits, is 3.16 mm.

Explanation:

To answer the question on the spacing between two adjacent bright fringes for a helium-neon laser with a wavelength (λ) of 633 nm illuminating two slits spaced 0.50 mm apart, with a viewing screen 2.5 m behind the slits, we use the formula for the fringe spacing in a double-slit interference pattern, Δy = (λL) / d, where Δy is the fringe spacing, λ is the wavelength of the light, L is the distance from the slits to the screen, and d is the distance between the slits.

Given λ = 633 nm = 633 × 10-9 m, L = 2.5 m, and d = 0.50 mm = 0.50 × 10-3 m, plugging these values into the formula gives:

Δy = (633 × 10-9 m × 2.5 m) / (0.50 × 10-3 m) = 3.16 × 10-3 m = 3.16 mm

Therefore, the spacing between two adjacent bright fringes is 3.16 mm.

What are the purposes of the various types of drawings used for the design and erection of steel framed buildings?

Answers

Answer:

The main purpose the various types of drawing used for the design and erection of steel framed buildings is to successfully construct a solid and strong building

Explanation:

The main purpose the various types of drawing used for the design and erection of steel framed buildings is to successfully construct a solid and strong buildings.

Steel forms the skeleton of a building, essentially the part of the building that holds everything up and together. Steel has so many advantages when compared to other structural building material such as concrete, plastic, timber and composite materials.

You are designing a three-story office building (Occupancy B) with 20,000 square feet per floor. What types of construction will you be permitted to use under the IBC if you do not install sprinklers?

Answers

Answer:

not provide the sprinklers, then the type of construction will be Type II B under IBC

Explanation:

given data

3 story office building = 20,000 square feet per floor

solution

we know when sprinkler is provide in high rise building to resist fire

and it provide in building as floor area exceed allowable permissible area of  building as IBC

so IBC for Type II B allowable area =  19000 square feet per floor

and type III B allowable area =  23000 square feet per floor

so when we design the building by type III B construction, the sprinklers require to provide

but not provide the sprinklers, then the type of construction will be Type II B under IBC

A constant torque of 5 Nm is applied to an unloaded motor at rest at time t ¼ 0. The motor reaches a speed of 1800 rpm in 3 s. Assuming the damping to be negligible, calculate the motor inertia.

Answers

Answer:

The motor inertia is 7.958 X 10⁻² kg.m²

Explanation:

To determine the motor inertia, the following formula applies.

Neglecting the damping effect,

[tex]T = \frac{J}{9.55}.\frac{\delta n}{\delta T}[/tex]

Where;

T is the constant torque applied to the motor = 5Nm

J is the motor inertia = ?

δn is the change in angular speed of the motor = 1800 r/min

δT is change in time of the unloaded motor from rest = 3 sec

[tex]J = \frac{9.55* \delta T* T}{\delta n}[/tex]

[tex]J = \frac{9.55* 3* 5}{1800}[/tex] = 0.07958 kg.m² = 7.958 X 10⁻² kg.m²

Therefore, the motor inertia is 7.958 X 10⁻² kg.m²

An engine has a hot-reservoir temperature of 970 K and a cold-reservoir temperature of 480 K. The engine operates at three-fifths maximum efficiency. What is the efficiency of the engine?

Answers

Answer:

[tex]\eta=0.303[/tex]

Explanation:

Given that

Temperature of the hot reservoir ,T₁ = 970 K

Temperature of the cold reservoir ,T₂ = 480 K

We know that only Carnot engine is the ideal engine which gives us the maximum power.The efficiency of Carnot engine is given as

[tex]\eta_{max}=1-\dfrac{T_2}{T_1}[/tex]

[tex]\eta_{max}=1-\dfrac{480}{970}[/tex]

[tex]\eta_{max}=0.505[/tex]

Therefore the efficiency of the given engine will be

[tex]\eta=\dfrac{3}{5}\eta_{max}[/tex]

[tex]\eta=\dfrac{3}{5}\times 0.505[/tex]

[tex]\eta=0.303[/tex]

Decide how the sketches below would be listed, if they were listed in order of decreasing force between the charges. That is, select "1" beside the sketch with the strongest force between the charges, select "2" beside the sketch with the next strongest force between the charges, and so on.

Answers

Answer:

box 2=highest

box3= 2

box 1=3

box 4=lowest

Explanation:

Decide how the sketches below would be listed, if they were listed in order of decreasing force between the charges. That is, select "1" beside the sketch with the strongest force between the charges, select "2" beside the sketch with the next strongest force between the charges, and so on.

take note that like charges repel while unlike charges attract

from the law of electric attraction, we know that

f=kQq/r^2

force is directly proportional to the charges,

-3-1= has the highest force of repulsion

the first bos, the balls are -2-1=-3 they are repulsive

second box=-3-1=-4

third box=-3-1=-4

fourth=-1-1=-2

box 2=highest

box3= 2

box 1=3

box 4=lowest

Compute the number of kilo- grams of hydrogen that pass per hour through a 6-mm-thick sheet of palladium having an area of 0.25 m^2 at 600°C. Assume a diffusion coefficient of 1.7 x 10^8 m^2/s, that the concentrations at the high- and low-pressure sides of the plate are 2.0 and 0.4 kg of hydrogen per cubic meter of palladium, and that steady-state conditions have been attained.

Answers

Answer:

The number of kilo- grams of hydrogen that pass per hour through this sheet of palladium is [tex]4.1 * 10^{-3} \frac{kg}{h}[/tex]

Explanation:

Given

x1 = 0 mm

x2 = 6 mm = 6 * [tex]10^{-3}[/tex] m

c1 = 2 kg/[tex]m^{3}[/tex]

c2 = 0.4 kg/[tex]m^{3}[/tex]

T = 600 °C

Area = 0.25 [tex]m^{2}[/tex]

D = 1.7 * [tex]10^{8} m^{2}/s[/tex]

First equation

J = - D [tex]\frac{c1 - c2}{x1 - x2}[/tex]

Second equation

J = [tex]\frac{M}{A*t}[/tex]

To find the J (flux) use the First equation

J = - 1.7 * [tex]10^{8} m^{2}/s[/tex] * [tex]\frac{2 kg/m^{3} - 0.4 kg/m^{3}}{0 - 6 * 10^{-3} } = 4.53 * 10^{-6} \frac{kg}{m^{2}s }[/tex]

To find M use the Second equation

[tex]4.53 * 10^{-6} \frac{kg}{m^{2}s}[/tex] = [tex]\frac{M}{0.25 m^{2} * 3600s/h}[/tex]

M = [tex]4.1 * 10^{-3} \frac{kg}{h}[/tex]

Consider the following incomplete code segment, which is intended to print the sum of the digits in num. For example, when num is 12345, the code segment should print 15, which represents the sum 1 + 2 + 3 + 4 + 5.

int num = 12345;

int sum = 0;

/* missing loop header */

{

sum += num % 10;

num /= 10;

}

System.out.println(sum);

Which of the following should replace /* missing loop header */ so that the code segment will work as intended?

while (num > 0)

A

while (num >= 0)

B

while (num > 1)

C

while (num > 2)

D

while (num > sum)

E

Answers

Answer:

A) while (num >= 0)

Explanation:

To understand why we need to focus on the module and division operation inside the loop. num % 10 divide the number by ten and take its remainder to then add this remainder to sum, the important here is that we are adding up the number in reverse order and wee need to repeat this process until we get the first number (1%10 = 1), therefore, num need to be one to compute the last operation.

A) this is the correct option because num = 1 > 0 and the last operation will be performed, and after the last operation, num = 1 will be divided by 10 resulting in 0 and 0 is not greater than 0, therefore, the cycle end and the result will be printed.

B) This can not be the option because this way the program will never ends -> 0%10 = 0 and num = 0/10 = 0

C) This can not be the option because num = 1 > 1 will produce an early end of the loop printing an incomplete result

D) The same problem than C

E) There is a point, before the operations finish, where sum > num, this will produce an early end of the loop, printing an incomplete result

Loops are program statements that are used to carry out repetitive and iterative operations

The missing loop header is (a) while (num > 0)

To calculate the sum of the digits of variable num, the following must be set to be true

The loop header must be set to keep repeating the loop operations as long as the value of variable num is more than 0

To achieve this, we make use of while loop,

And the loop condition (as described above) would be num > 0

Hence, the true option is (a) while (num > 0)

Read more about loops at:

https://brainly.com/question/19344465

Which of the following can be used as a case label in a switch-case statement? Please select all that apply.
Assume that FIVE is a constant int and five is an int.
#define FIVE 5
int five = 5;

a. five
b.FIVE
c.5
d.five++
e. FIVE + 1

Answers

Answer:

b, c, and e

Explanation:

The values that are used for case labels must be a constant expression.

Let's examine the options;

a. five -> declared as just int

b. FIVE -> declared as constant expression

c. 5 -> It is a constant expression

d. five++ -> incremented version of option a

e. FIVE+1 -> incremented version of option b

What happens to the current supplied by the battery when you add an identical bulb in parallel to the original bulb?

Answers

Answer:

a.The current is cut in half

b.the current stays the same

c.the current doubles

d.the current becomes zero

Explanation:

The current doubles

Consider an 8-car caravan, where the propagation speed is 100 km/hour, each car takes 1 minute to pass a toll both. The caravan starts in front of toll booth A, goes through toll booth B, and ends after passing toll booth C. Let dAB and dBC be the distance between A-B, and B-C.

a. Suppose dAB = dBc = 10 km. What is the end-to-end delay if the caravan travels together (i.e., the first car must wait for the last car after passing each toll booth)?
b. Repeat a), but assume the cars travel separately (i.e., not waiting for each other).
c. Repeat a) and b), but suppose dAB = dBC =100 km
d. Still suppose dAB = dBC = 100 km. Suppose toll booth B takes 10 minute to pass each car (A and C still takes 1 minute per car). Where is the first car when the second car passes B?
e. Under the assumption of d), what is the maximum value of dBC such that the first car has passed C when the second car passes B?

Answers

Answer:

A. 36 minutes

B. 120 minutes

C.

i. 144 minutes

ii. 984 minutes

D. Car 1 is 1.67km ahead of Cat 2 when Car 2 passed the toll B.

E. 98.33km

Explanation

A.

Given

dAb = 10km

dBc = 10km

Propagation Speed = 100km/hr

Delay time = 1 minute

Numbers of cars = 8

Number of tolls = 3

Total End to End delay = Propagation delay + Transition delay

Calculating Propagation Delay

Propagation delay = Total Distance/Propagation speed

Total distance = 10km + 10km = 20km

So, Propagation delay = 20km/100km/hr

Propagation delay = 0.2 hour

                               

Translation delay = delay time* numbers of tolls * numbers of cars

Transitional delay = 1 * 3 * 8

Transitional delay = 24 minutes

Total End delay = 24 minutes + 0.2 hours

= 24 minutes + 0.2 * 60 minutes

= 24 minutes + 12 minutes

= 36 minutes

B.

Total End to End delay = Propagation delay + Transition delay

Calculating Propagation Delay

Propagation delay = Total Distance/Propagation speed

Total distance = 10km + 10km = 20km

So, Propagation delay = 20km/100km/hr

Propagation delay = 0.2 hour

                               

Translation delay = delay time* numbers of tolls ------ Cars traveling separately

Transitional delay = 1 * 3

Transitional delay = 3 minutes

Total End delay for one car = 3 minutes + 0.2 hours

= 3 minutes + 0.2 * 60 minutes

= 3 minutes + 12 minutes

= 15 minutes

Total End delay for 8 cars = 8 * 15 = 120 minutes

C.

Given

dAb = 100km

dBc = 100km

Propagation Speed = 100km/hr

Delay time = 1 minute

Numbers of cars = 8

Number of tolls = 3

i. Cars travelling together

Total End to End delay = Propagation delay + Transition delay

Calculating Propagation Delay

Propagation delay = Total Distance/Propagation speed

Total distance = 100km + 100km = 200km

So, Propagation delay = 200km/100km/hr

Propagation delay = 2 hours

                               

Translation delay = delay time* numbers of tolls * numbers of cars

Transitional delay = 1 * 3 * 8

Transitional delay = 24 minutes

Total End delay = 24 minutes + 2 hours

= 24 minutes + 2 * 60 minutes

= 24 minutes + 120 minutes

= 144 minutes

ii. Cars travelling separately

Total End to End delay = Propagation delay + Transition delay

Calculating Propagation Delay

Propagation delay = Total Distance/Propagation speed

Total distance = 100km + 100km = 200km

So, Propagation delay = 200km/100km/hr

Propagation delay = 2 hours

                               

Translation delay = delay time* numbers of tolls ------ Cars traveling separately

Transitional delay = 1 * 3

Transitional delay = 3 minutes

Total End delay for one car = 3 minutes + 2 hours

= 3 minutes + 2 * 60 minutes

= 3 minutes + 120 minutes

= 123 minutes

Total End delay for 8 cars = 8 * 123 = 984 minutes

D.

Distance = 100km

Time = 1 min/car

Car 1 is 1 minute ahead of car 2 --- at toll A and B

If car 1 leaves toll B after 10 minutes then cat 2 leaves after 11 minutes

Time delay = 11 - 10 = 1 minute

Distance = time * speed

= 1 minute * 100km/hr

= 1 hr/60 * 100 km/hr

= 100/60

= 1.67km

E.

Given

Distance = 100km

Distance behind = 1.67

Maximum value of dBc = 100km - 1.67km = 98.33km

The maximum distance that can be reached is 98.33km

Define the following terms in your own words: (a) elastic strain, (b) plastic strain, (c) creep strain, (d) tensile viscosity, (e) recovery, and (f) relaxation.

Answers

Answer:

Detailed Answer is given below,

Explanation:

(a) Elastic strain

Elastic deformation is defined as the limit for the deformation values up to which the object will bounce and return to the original shape when the load is removed.

When the object is subjected to an external load, it deforms. If the load exceeds the load corresponding to the elastic limit of the object, then, after removing the load, the object cannot return to its original geometric specification.

(b) Plastic strain

Plastic Strain is a deformation that cannot be recovered after eliminating the deforming force. In other words, if the applied tension is greater than the elastic limit of the material, there will be a permanent deformation.

(c) Creep strain

The deformation of the material at a higher temperature is much more than at the normal temperature known as creep.

Subsequently, the deformation produced in heated material is called creep deformation. Creep deformation is a function of temperature.

(d) Tensile viscosity

Viscosity is a main parameter when measuring flux fluids, such as liquids, semi-solids, gases and even solids. Brookfield deals with liquids and semi-solids. Viscosity measurements are made together with the quality and efficiency of the product. Any person involved in the characterization of the flow, in research or development, quality control or transfer of fluids, at one time or another is involved with some kind of viscosity measurement.

(e) Recovery

Recovery is a process whereby deformed grains can reduce their stored energy by eliminating or reorganizing defects in their crystalline structure. These defects, mainly dislocations, are introduced by plastic deformation of the material and act to increase the elastic limit of a material.

(f) Relaxation

Stress relaxation occurs in polymers when they remain tense for long periods of time.

These alloys have very good resistance to stress relaxation and, therefore, are used as spring materials.

Stress relaxation is a gradual reduction of stress over time in constant tension.

An electric field is expressed in rectangular coordinates by E = 6x2ax + 6y ay +4az V/m.Find:a) VMN if point M and N are specified by M(2,6,1) and N(-3, -3, 2).b) VM if V = 0 at Q(4, -2, -35)c) VN if V = 2 at P(1,2,4).Please show all steps

Answers

Answer:

a.) -147V

b.) -120V

c.) 51V

Explanation:

a.) Equation for potential difference is the integral of the electrical field from a to b for the voltage V_ba = V(b)-V(a).

b.) The problem becomes easier to solve if you draw out the circuit. Since potential at Q is 0, then Q is at ground. So voltage across V_MQ is the same as potential at V_M.

c.) Same process as part b. Draw out the circuit and you'll see that the potential a point V_N is the same as the voltage across V_NP added with the 2V from the other box.

Honestly, these things take practice to get used to. It's really hard to explain this.

The values of the potential differences for the three questions are;

A) [tex]V_{MN} = -147 V[/tex]

B) [tex]V_{MQ}[/tex] = -120 V

C) [tex]V_{N} = 51 V[/tex]

We are given the expression of the electric field as;

E = (6x² x^ + 6y y^ +4 z^) V/m

A) We want to find the potential difference between point M and N with coordinates M(2,6,1) and N(-3, -3, 2).

[tex]V_{MN} = -\int\limits^M_N {E} \, dx[/tex]

Integrating this with the M and N coordinates as boundaries in mind gives;

[tex]V_{MN} = -[6\frac{x^{3}}{3} + 6\frac{y^{2}}{2} + 4z]^{2,6,1}_{-3,-3,2}[/tex]

[tex]V_{MN} = -[2{x^{3} + 3y^{2} + 4z]^{2,6,1}_{-3,-3,2}[/tex]

Plugging in those boundary values and solving using an online integral calculator gives;

[tex]V_{MN} = -147 V[/tex]

B) We are told that V = 0 at Q(4, -2, -35). Thus potential difference between point M and Q is;

[tex]V_{MQ} = -[6\frac{x^{3}}{3} + 6\frac{y^{2}}{2} + 4z]^{2,6,1}_{4,-2,-35}[/tex]

[tex]V_{MQ} = -[2{x^{3} + 3y^{2} + 4z]^{2,6,1}_{4,-2,-35}[/tex]

Plugging in those boundary values and solving using an online integral calculator gives;

[tex]V_{MQ}[/tex] = -120 V

C) We are told that V = 2 at P(1,2,4). Thus potential difference between point V and N is;

[tex]V_{NP} = -[6\frac{x^{3}}{3} + 6\frac{y^{2}}{2} + 4z]^{-3,-3,2}_{1,2,4}[/tex]

[tex]V_{NP} = -[2{x^{3} + 3y^{2} + 4z]^{-3,-3,2}_{1,2,4}[/tex]

Plugging in those boundary values and solving using an online integral calculator gives; [tex]V_{NP} = 49 V[/tex]

Thus;

[tex]V_{N} = V + V_{NP}[/tex]

[tex]V_{N}[/tex] = 2 + 49

[tex]V_{N} = 51 V[/tex]

Read more about Electric field vectors at; https://brainly.com/question/13193669

The following laboratory tests are performed on aggregate samples:a. Specific gravity and absorptionb. Soundnessc. Sieve analysis test.What are the significance and use of each of these tests (1 point each)?

Answers

Answer:

Explanation:

A- Specific gravity and Absorption Test: Specific gravity is a measure of a material’s density as compared to the density of water at 73.4°F (23°C). Therefore, by definition, water at a temperature of 73.4°F (23°C) has a specific gravity of 1. Absorption is also determined by the same test procedure and it is a measure of the amount of water that an aggregate can absorb into its pore structure.

Specific gravity is used in a number of applications including Superpave mix design, deleterious particle identification and separation and material property change identification while

B- Soundness Test : This determines an aggregate's resistance to disintegration by weathering and in particular, freeze-thaw cycles. Aggregates that are durable (resistant to weathering) are less likely to degrade in the field and cause premature HMA pavement distress and potentially failure.It is used to identify the excess amount of lime in cement.

C - Sieve analysis Test: is a practice or procedure used to assess the particle size distribution (also called gradation) of a granular material by allowing the material to pass through a series of sieves of progressively smaller mesh size and weighing the amount of material that is stopped by each sieve as a fraction of the whole mass. This test is used to describe the properties of the aggregate and to see if it is appropriate for various civil engineering purposes such as selecting the appropriate aggregate for concrete mixes and asphalt mixes as well as sizing of water production well screens.

P1.30 shows a gas contained in a vertical piston– cylinder assembly. A vertical shaft whose cross-sectional area is 0.8 cm2 is attached to the top of the piston. Determine the magnitude, F, of the force acting on the shaft, in N, required if the gas pressure is 3 bar. The masses of thepiston and attached shaft are 24.5kg and 0.5kg respectively. The piston diameter is 10cm. The local atmospheric pressure is 1 bar. The piston moves smoothly in the cylinder and g=9.81 m/s2

Answers

In the process of analyzing a thermodynamic system it is important to identify what system is being worked on and the processes and properties if the system

The magnitude of the force acting on the shaft, is approximately 1,336.5 N

The reason the value for the force magnitude acting on the shaft is correct is as follows:

The known parameters are:

The cross-sectional area of the shaft, Aₐ = 0.8 cm²

The required gas pressure in the cylinder, P = 3 bar

The mass of the piston, m₁ = 24.5 kg

The mass of the shaft, m₂ = 0.5 kg

The diameter of the piston, D = 10 cm

The atmospheric pressure, Pₐ = 1 bar

Required:

The magnitude of the force F acting on the shaft

Solution:

The force due to the gas in the cylinder, [tex]\mathbf{F_{gas}}[/tex], is given as follows;

[tex]F_{gas}[/tex] = 3 bar × π × (10 cm)²/4 = 2,359.19449 N

The force due to the atmosphere, [tex]\mathbf{F_{atm}}[/tex], is given as follows;

[tex]F_{atm}[/tex] = 1 bar × ((π × (10 cm)²/4) -  0.8 cm²) ≈ 777.4 N

The force due to the piston and shaft, [tex]\mathbf{F_{ps}}[/tex], is given as follows;

[tex]F_{ps}[/tex] = (24.5 kg + 0.5 kg) × 9.81 m/s² = 245.25 N

The magnitude of the force acting on the shaft, F = [tex]F_{gas}[/tex] - ([tex]\mathbf{F_{atm}}[/tex] + [tex]\mathbf{F_{ps}}[/tex])

∴ F = 2,359.19449 N - (777.4 N + 245.25 N) ≈ 1,336.5449 N

The magnitude of the force acting on the shaft, F ≈ 1,336.5 N

Learn more about forces due to pressure here:

https://brainly.com/question/4197598

Calculate the change in enthalpy of 1.94 mol of PbO(s) if it is cooled from 732 K to 234 K at constant pressure.

Answers

Complete question:

The heat capacity of solid lead oxide is given by Cp,m=44.35+1.47×10⁻³T/K in units of J K−1 mol−1.

Calculate the change in enthalpy of 1.94 mol of PbO(s) if it is cooled from 732 K to 234 K at constant pressure.

Answer:

The change in enthalpy of PbO(s) is -39.488 x10³J

Explanation:

Given:

Initial temperature of PbO(s) (T₁) = 732 K

Final temperature of PbO(s) (T₂) = 234 K

[tex]\delta H = n\int\limits^{T_2}_{T_1} {C_p m} \, dT[/tex]

where;

Cp,m is the specific heat capacity of PbO(s)

[tex]\delta H = 1.94 molX\int\limits^{234}_{732} {[44.35 +1.47 X10^{-3}\frac{T}{K} ]} \,d (\frac{T}{K})[/tex]

[tex]\delta H = 1.94 molX {[44.35 (234-732) +1.47 X10^{-3}(\frac{234^2 -732^2}{2}) ]}[/tex]

     = 1.94mol [(-19957.5)+(-396.9)]

     = -38717.55 J -769.986J

     = -39487.536 J

ΔH = -39.488 x10³J

Therefore, the change in enthalpy of PbO(s) is -39.488 x10³J

What properties should the head of a carpenter’s hammer possess? How would you manufacture a hammer head?

Answers

Properties of Carpenter's hammer possess

Explanation:

1.The head of a carpenter's hammer should possess the impact resistance, so that the chips do not peel off the striking face while working.

2.The hammer head should also be very hard, so that it does not deform while driving or eradicate any nails in wood.

3.Carpenter's hammer is used to impact smaller areas of an object.It can drive nails in the wood,can crush  the rock and shape the metal.It is not suitable for heavy work.

How hammer head is manufactured :

1.Hammer head is produced by metal forging process.

2.In this process metal is heated and this molten metal is placed in the cavities said to be dies.

3.One die is fixed and another die is movable.Ram forces the two dies under the forces which gives the metal desired shape.

4.The third process is repeated for several times.

Fictional Corp is looking at solutions for their new CRM system for the sales department. The IT staff already has a fairly heavy workload, but they do not want to hire any additional IT staff. In order to reduce the maintenance burden of the new system, which of the following types of CRM should they choose to meet these needs?

a. IaaS

b. PaaS

c. SaaS

d. DBaaS

Answers

Answer:

SaaS

Explanation:

Software as a service (SaaS) is also called software on demand, it involves a third party that centrally hosts the software and provides it to the end user.

All aspects of hosting is handled by the third party: application, data, runtime, middleware, operating system, server, virtualization, storage and networking are all handled by the provider.

This is an ideal software service for Fictional corp, as there will be no need to hire additional IT staff to maintain the new CRM software.

In creating C++ applications, you have the ability to utilize various formatting functions in the iostream library. What are some of the formatting vulnerabilities that can be encountered in using the iostream library in C++?

Answers

Answer:

i. Utility

ii. Performance

Explanation:

While there may be other vulnerabilities of the iostream library when compared to other C++ libraries, the two most common vulnerabilities are

I. Utility

II. Performance

Utility

The capacity of iostream to extend its structured read and write functions is its biggest features. One can overload the operator "<<" for various functions and types and simply use them.

This can't be done with fprintf but it can be used for classes in namespaces. Also, new streambuf types and even streams can't be created just anytime.

Performance

The effect of, “iostreams is intended to do far more than C-standard file IO.” but that is not always true because with iostreams, though there is an extensible mechanism for writing any type directly to a stream, one can't easily write new streambuf’s that will allow you to (via runtime polymorphism) be able to work with existing code.

Other Questions
On a ring road, 12 trams are spaced at regular intervals and travel at a constant speed. How many trams need to be added to the circuit so that, maintaining the same speed, the intervals between them will decrease by 1 5 A gas mixture of nitrogen and oxygen having a total pressure of 2.50 atm is above 2.0 L of water at 25 C. The water has 51.3 mg of nitrogen dissolved in it. What is the molar composition of nitrogen and oxygen in the gas mixture? The Henrys constants for N2 and O2 in water at 25 C are 6.1104 M/atm and 1.3103 M/atm, respectively. A roofing tile slides down a roof and falls off the roof edge 10 m above the ground at a speed of 6 m/s. The roof makes an angle of 30 degrees to the horizontal. How far from the exit point on the roof does the tile land? A car can travel 25 miles per gallon on the high way and 20 miles in the city. The car's gas tank can hold 21 gallons. If the car traveled 500 miles on a full tank of gas, how many were used for city driving? A prescriber has ordered clonidine [Catapres] for a patient who has hypertension. The nurse teaches the patient about the side effects of this drug. Which statement by the patient indicates an understanding of the teaching? Which of the following supports the idea of establishing justice?A. raising an army and a navyB. collecting taxesc. forming a judicial branchD. regulating commerce How would you solve ((-x^2)-(12x^3)-8)^2 Graph g(x)=4cos(2x)2 . Use 3.14 for . Which of the following statements is false? a. The text contained in an identifying label should be left-aligned within the label. b. An identifying label should be positioned either above or to the right of the control it identifies. c. Identifying labels should use sentence capitalization. d. Identifying labels should end with a colon (:). Rahul needs a loan and is speaking to several lending agencies about the interest rates they would charge and the terms they offer. He particularly likes his local bank because he is being offered a nominal rate of 10%. But the bank is compounding bimonthly (every two months). What is the effective interest rate that Rahul would pay for the loan?a. 10.603% b. 10.426% c. 10.609% d. 10.285% What is 17 equals 5y - 3 Which statement best compares the two jobs? Job A has a lower salary than job B, but the benefits make job A a more attractive pay package. Job B has a lower salary than job A, but the benefits make job B a more attractive pay package. Job A has a higher salary than job B plus benefits that make job A a more attractive pay package. Job B has a higher salary than job A plus benefits that make job B a more attractive pay package. Exploring the Orbits of Dwarf PlanetsUse the information from the article to answer the question.Dwarf PlanetWhich statements apply to the orbits of dwarf planets? Check all that apply.Dwarf planets orbit the Sun.Pluto could collide with JupiterDwarf planets are round.Pluto is a dwarf planetEris could collide with Uranus Slaves were brought from Africa to help grow which crop?. WheatO B. Trees. SugarOD. Corn The electron transport chain is common to both respiration and photosynthesis. However, there are some differencesin the steps involved in the electron transport chain in both processes. The table lists some steps in the electrontransport chainWhich of these CORRECTLY shows where the steps take place? Postmodernism in law posits that concepts like justice and truth are not objective. Group of answer choices True False Which measure is most appropriate to describe the center of the data in the stem-and-leaf plot below?pounds of food collected0 l 5 61 l 0 2 3 3 42 l 1 93 l 4 l 25 l 1 Dr. Grodner is conducting an experiment on age-related changes in memory. He is comparing how well retirees and high school students perform on a memory task. In order to conveniently schedule research participants, he has the older adults come to the lab during the day, since they are retired. The students come to the lab in the evening, after they are finished with school and other activities. What is the problematic confound in this study? A. It is unfair to compare older adults to younger adults, because older adults sometimes experience memory problems. B. Dr. Grodner has not operationally defined memory for the purposes of his study. C. If memory turns out to be something that varies by time of day, it is problematic that the older adults all do the study in the morning and the younger adults do the study at night. D. Older adults have a lot more memories than younger adults, which confound the study. The present value of a stream of cash flows is just the sum of the present values of each individual cash flow. True False An experiment is performed in the lab, where the mass and the volume of an object are measured to determine its density. Two completely different valid methods are used. Each experimental method to measure the density is performed, two considerable sets of data are taken on each and the results are compared. The results of the density measurement by each method should be:______.a. dependent on the mass and the volume of the objectb. completely different, because it was measured different ways.c. correct on the most accurate method and wrong in the otherd. the same within the uncertainty of each measurement method Steam Workshop Downloader