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
DaniilM [7]
3 years ago
9

Write a method called compFloat5 which accepts as input two doubles as an argument (parameter). Write the appropriate code to te

st the two numbers up to five decimal points to see if they are close enough. If they are close enough return true else return false. This would be a Boolean value. f. Write a method called compInt which accepts as input two integers as an argument (parameter). Write the appropriate code to test the two integers to see if they are equal. If they are equal return true else return false. This would be a Boolean value. g. Write a method called stringEqual program that reads in two sentences as an argument (parameter). Write the appropriate code to test the two strings to see if they are the equal. If they are equal return true
Engineering
1 answer:
Umnica [9.8K]3 years ago
4 0

Answer:

public class Comparision {

public boolean compFloat5(double d1, double d2) {

// Rounding off to two decimal places

d1 = (Math.round(d1 * 100000) / 100000.00);

d2 = (Math.round(d2 * 100000) / 100000.00);

if (d1 == d2)

return true;

else

return false;

}

public boolean compInt(int int1, int int2) {

if (int1 == int2)

return true;

else

return false;

}

public boolean stringEqual(String s1, String s2) {  

if (s1.equals(s2))

return true;

else

return false;

}

public boolean stringCompare(String s1, String s2) {

int i = s1.compareTo(s2);

if (i == -1)

return true;

else  

return false;

}  

}

You might be interested in
You have a piece of 1045 steel 80 cm long and 30 cm wide and 15cm high. In this piece it is desired to make a groove along the 8
tino4ka555 [31]

Answer:

0.65 m/min

Explanation:

The volume of material to be removed is

80*8*10 = 650 cm^3

The tool has a diameter of 4 mm and a maximum axial cutting capacity of 50 mm, so its cross section normal to advance is

0.4*5 = 2 cm^2

If the groove have to be made in T = 5 minutes the advance speed would be

V/(S * T)

650/(2 * 5) = 65 cm/min = 0.65 m/min

4 0
3 years ago
Select the parameters that are included in a baseline performance check. you may select more than one. select one or more: a. co
pishuonlain [190]

Answer:

A F E C D B

Explanation:

6 0
3 years ago
Which of the following is not a reason to give yourself extra "cushion" when driving?
damaskus [11]

Answer:

The question is incomplete, the complete question is:

Which of the following is not a reason to give yourself extra "cushion" when driving?

A. Poor visibility B. Poor road conditions C. Inclement weather D. None of these.

The correct answer is D. None of these.

Explanation:

All the options are not reasons to give yourself an extra cushion when driving, rather they are reasons that are not favorable to driving at all.

A cushion is a certain amount of distance you are supposed to keep between you and the car in front of you to allow easy maneuvering in any condition.

A typical cushion is 3 seconds between you and the car in front of you, in less than perfect conditions like bad weather or poor road conditions an additional second must be added to it.

7 0
3 years ago
The supplement file* that enclosed to this homework consists Time Versus Force data. The first column in the file stands for tim
AysviL [449]

Answer:

A.) 1mv = 2000N

B.) Impulse = 60Ns

C.) Acceleration = 66.67 m/s^2

Velocity = 4 m/s

Displacement = 0.075 metre

Absorbed energy = 60 J

Explanation:

A.) Using a mathematical linear equation,

Y = MX + C

Where M = (2000 - 0)/( 898 - 0 )

M = 2000/898

M = 2.23

Let Y = 2000 and X = 898

2000 = 2.23(898) + C

2000 = 2000 + C

C = 0

We can therefore conclude that

1 mV = 2000N

B.) Impulse is the product of force and time.

Also, impulse = momentum

Given that

Mass M = 30kg

Velocity V = 2 m/s

Impulse = M × V = momentum

Impulse = 30 × 2 = 60 Ns

C.) Force = mass × acceleration

F = ma

Substitute force and mass into the formula

2000 = 30a

Make a the subject of formula

a = 2000/30

acceleration a = 66.67 m/s^2

Since impulse = 60 Ns

From Newton 2nd law,

Force = rate of change in momentum

Where

change in momentum = -MV - (- MU)

Impulse = -MV + MU

Where U = initial velocity

60 = -60 + MU

30U = 120

U = 120/30

U = 4 m/s

Force = 2000N

Impulse = Ft

Substitute force and impulse to get time

60 = 2000t

t = 60/2000

t = 0.03 second

Using third equation of motion

V^2 = U^2 + 2as

Where S = displacement

4^2 = 2^2 + 2 × 66.67S

16 = 4 + 133.4S

133.4S = 10

S = 10/133.4

S = 0.075 metre

D.) Energy = 1/2 mV^2

Energy = 0.5 × 30 × 2^2

Energy = 15 × 4 = 60J

5 0
4 years ago
Poly(cis-1,4-isoprene), or natural rubber (NR), has a tendency crystallize. The Tm of this polymer is slightly below room temper
Nonamiya [84]

Answer:

Explanation:

Crystalline melting temperature (Tm) is termed as the temperature required for a  crystalline polymer to change to a fluid or glasslike crystalline spaces of a semi-crystalline polymer liquefy (expanded sub-atomic movement).  

Crystallization of polymers is an interaction related with incomplete arrangement of their atomic and molecular chains. These chains crease together and structure requested districts called lamellae, which form bigger spheroidal designs named spherulites. Polymers can solidify after cooling from melting, mechanical extending, or dissolvable dissipation. Crystallization influences the optical, mechanical, and synthetic chemical properties of the polymer.  

For a crystalline polymer, a required polymer chain is present in or goes along a few crystalline and amorphous zones. The crystalline zones are comprised of intermolecular & intramolecular arrangements or deliberate and thus firmly stuffed plan of atoms or chain fragments, and an absence of it brings about the development of amorphous zones.  

The mechanical property boundary, for example, shear modulus expansions in the temperature of perception for polymer material framework.  

The temperature reaction of direct linear polymers might be seen as partitioned into three particularly separate fragments:  

1. Above Tm: The polymer stays as fluid whose consistency & viscosity would rely upon atomic molecular weight and temperature.  

2. Between Tm and Tg: This area may go between close to 100% crystalline & 100% amorphous chain atomic bunches relying upon the polymer underlying consistency. The amorphous part carries on similar to supercooled fluid in this section. The generally actual conduct of the polymer in this moderate portion is similar to an elastic rubber.  

3.Below Tg: The polymer material saw as glass is hard and inflexible, showing and emanating a predetermined coefficient of thermal extension. The glass is more like a crystalline strong than the fluid in personal conduct standard regarding mechanical property boundaries. In regard to the molecular atomic request, in any case, the glass all the more intently takes after the fluid. There is little contrast between the direct linear and cross-connected polymer beneath Tg.

8 0
3 years ago
Other questions:
  • Compute the strain-hardening exponent (n) for an alloy in which a true stress of 415 MPa produces a true strain of 0.10; assume
    10·1 answer
  • Solid spherical particles having a diameter of 0.090 mm and a density of 2002 kg/m3 are settling in a solution of water at 26.7C
    8·1 answer
  • A railcar with an overall mass of 78,000 kg traveling with a speed vi is approaching a barrier equipped with a bumper consisting
    15·1 answer
  • List irreversibilities
    11·1 answer
  • Calculate the availability of a system where the mean time between failures is 900 hours and the mean time to repair is 100 hour
    15·1 answer
  • The ice on the rear window of an automobile is defrosted by attaching a thin, transparent, film type heating element to its inne
    8·1 answer
  • a solid circular shaft 150 mm diameter transmits a torque of 29820.586 N.m. find the maximum shear stress
    15·1 answer
  • 3.8. Describe the two alternatives for specifying structural constraints on relationship types. What are the advantages and disa
    12·1 answer
  • Applications of attenuators.
    5·1 answer
  • 3) The box lands on the surface of the earth.​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!