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
AC motor characteristics require the applied voltage to be proportionally adjusted by an AC drive whenever the frequency is chan
Margarita [4]
The answer is false
6 0
3 years ago
Read 2 more answers
A(n)_____ is a device that provides the power and motion to manipulate the moving parts of a valve or damper used to control flu
Lesechka [4]

Answer:

Out of the four options provided

option A. actuator

is correct

Explanation:

An actuator is the only device out of the four mentioned devices that provides power and ensures the motion in it in order to manipulate the movement of the moving parts of the damper or a valve used whereas others like ratio regulator are used to regulate air or gas ratio and none mof the 3 remaining options serves the purpose

5 0
3 years ago
Tech A says that speed density systems use vehicle speed and fuel density to determine injector pulse width. Tech B says that ma
bogdanovich [222]

The person that is correct based on the 2 statements from Tech A and Tech B is; Tech B

A mass flow sensor is defined as a sensor that is used to measure the mass flow rate of air entering a fuel-injected internal combustion engine and then sends a voltage that represents the airflow to the electronic control circuit.

However, for Tech A is incorrect and so the correct answer is that Tech B is right because his statement corresponds with the definition of mass flow sensor.

Read more about fuel injection engines at; brainly.com/question/4561445

8 0
2 years ago
Multiple Choice
Ymorist [56]

Answer:

Sealing agent

Explanation:

Generally, when we have water leaks in almost any building or equipment, we use a sealant. However, this sealant could be of different types depending on the peculiarity of the leakage.

Thus, the correct answer is sealing agent.

5 0
2 years ago
Read 2 more answers
Which two word pairs to locate the word vicious in the dictionary
Harman [31]

AnsweR Viciously comes from the adjective vicious, which originally meant "of the nature of vice, or wicked." The Latin root, vitiosus, means "faulty, defective, or corrupt."

Explanation:

5 0
3 years ago
Other questions:
  • Water circulates throughout a house in a hot water heating system. If the water is pumped at a speed of 0.50m/s through a 4.0-cm
    5·1 answer
  • How does the modern Diesel engine achieve higher power output without the use of higher compression ratio?
    5·1 answer
  • 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
    11·2 answers
  • For what two reasons do countries specialize? Countries specialize so that opportunity costs can be increased. Countries special
    13·1 answer
  • An engineer is considering time of convergence in a new Layer 3 environment design. Which two attributes must be considered? (Ch
    15·1 answer
  • 1. Represent each of the following combinations of units in the correct SI form using the appropriate prefix: (a) μMN, (b) N/μm,
    6·1 answer
  • A Gaussian random voltage X volts is input to a half-wave rectifier and the output voltage is Y = Xu (X) Volts were u (x) is the
    9·1 answer
  • The purpose of the __________ algorithm is to enable two users to exchange a secret key securely that can then be used for subse
    8·1 answer
  • If the old radiator is replaced with a new one that has longer tubes made of the same material and same thickness as those in th
    10·1 answer
  • Define Mechanism and mechanics.​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!