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
Sphinxa [80]
3 years ago
10

NO LINKS OR BE REPORTED. Please help me I can't figure this out.

Engineering
1 answer:
Lady bird [3.3K]3 years ago
5 0

Answer: 11.25

Explanation:

You might be interested in
Your Java program will be reading input from a file name strInput.txt. Each record contains String firstname String lastName Str
stiks02 [169]

Answer:

The program requires that you have the specified input files and it reads from each file at a time and processes salary in digits, states the city, state and bonus with respective first and last name as requested in the question. Note that you must have access to the mentioned output files for the program to work properly. Below is the java version of the program.

import java.io.File;

import java.io.FileNotFoundException;

import java.io.PrintWriter;

import java.util.Scanner;

class Driver

{

public static void main(String[] args) throws FileNotFoundException

{

Scanner sc = new Scanner(new File("strInput.txt"));

PrintWriter pd = new PrintWriter(new File("strOutputD"));

PrintWriter prf = new PrintWriter(new File("strOutputRF"));

String firstname = "", lastname = "", strSalary = "", status = "", cityState = "", city = "", state = "";

double salary = 0, bonus = 0;

int incorrectRecords = 0;

int dRecords = 0;

int fRecords = 0;

while(sc.hasNextLine())

{

firstname = sc.next();

lastname = sc.next();

strSalary = sc.next();

status = sc.next();

cityState = sc.next();

if(!status.equals("D") && !status.equals("F"))

{

System.out.println("Records is neither D nor F. Skipping this...");

incorrectRecords++;

continue;

}

else if(status.equals("D") || status.equals("F"))

{

char c = ' ';

int i = 0;

for(i=0; i<strSalary.length() && c != '.'; i++)

{

c = strSalary.charAt(i);

if(!Character.isDigit(c))

{

System.out.println("Char at position " + (i+1) + " in salary is not a digit");

incorrectRecords++;

continue;

}

}

if(c == '.')

{

if(i+1 == strSalary.length()-1)

{

if(!Character.isDigit(strSalary.charAt(i)))

{

System.out.println("Char at position " + (i+1) + " in salary is not a digit");

incorrectRecords++;

continue;

}

if(!Character.isDigit(strSalary.charAt(i+1)))

{

System.out.println("Char at position " + (i+1+1) + " in salary is not a digit");

incorrectRecords++;

continue;

}

}

else

{

System.out.println("Period is in the wrong position. Expected at " + (strSalary.length()-3) + " but found at " + (i+1));

continue;

}

}

city = cityState.split(",")[0];

state = cityState.split(",")[1];

salary = Double.parseDouble(strSalary);

if(status.equals("D"))

{

bonus = salary * 0.125;

dRecords++;

pd.write(firstname + " " + lastname + " " + status + " " + salary + " " + bonus + " " + city + " " + state);

}

else

{

bonus = salary * 0.18;

fRecords++;

prf.write(firstname + " " + lastname + " " + status + " " + salary + " " + bonus + " " + city + " " + state);

}

}

}

System.out.println("No of D records : " + dRecords);

System.out.println("No of F records : " + fRecords);

System.out.println("No of incorrect records : " + incorrectRecords);

}

}

6 0
3 years ago
20 POINTS
Kobotan [32]

Answer:

True ...................

5 0
3 years ago
1 A power transmission includes a belt drive, a chain drive and a gear drive. Which of the following is the best arrangement bet
Setler79 [48]

Answer:d

Explanation:

(d) chain drive belt drive gear drive

3 0
3 years ago
The size of an engine is called the engine
Stolb23 [73]

Answer:

a

Explanation:

I guess so

8 0
3 years ago
Read 2 more answers
An 18-in.-long titanium alloy rod is subjected to a tensile load of 24,000 lb. If the allowable tensile stress is 60 ksi and the
Vilka [71]

Answer:

Required Diameter = 302.65 inches

Explanation:

We are given;

Allowable tensile stress = 60 ksi

Weight of tensile load = 24,000 lb

Elongation = 0.05 in

Original length = 18 in

We'll need to check the diameters under stress and strain.

Now, we know that the formula for stress is;

Stress = Force/Area

Thus,

Area = Force/stress

So for this stress, area required is;

A_req = 24000/60 = 4000 in²

So let's find the required diameter here.

Area = πd²/4

So, 4000 = πd²/4

(4000 x 4)/π = d²

d² = 5092.96

Required diameter here is;

d = √5092.96

d = 71.36 in

For Strain;

Formula for strain is;

Strain = stress/E

We are given E = 120 ksi

stress = P/A = 24,000/A

strain = elongation/original length = 0.05/18 = 0.00278

Thus;

0.00278 = P/(A•E)

0.00278 = 24000/(120 x A)

Making A the subject to obtain;

A = 24000/(120 x 0.00278)

A_required = 71942 in²

Area = πd²/4

So, 71942 = πd²/4

(71942 x 4)/π = d²

d² = 91599.4

Required diameter here is;

d = √91599.4

d = 302.65 in

The larger diameter is 302.65 inchesand it's therefore the required one.

3 0
4 years ago
Other questions:
  • A Wheatstone bridge initially has resistances equal to R1 = 200Ω, R2 = 400Ω, R3=500Ω and R4=600Ω. For an input voltage of 5V, de
    12·1 answer
  • The barrel of a bicycle tire pump becomes quite warm during use. Explain the mechanisms responsible for the temperature increase
    7·1 answer
  • A spherical, stainless steel (k 16 W m1 K-1) tank has a wall thickness of 0.2 cm and an inside diameter of 10 cm. The inside sur
    12·1 answer
  • Why does the the diffusion capacitance fall off at high frequencies?
    10·1 answer
  • Water flows near a flat surface and some measurements of the water velocity, u, parallel to the surface, at different heights y
    8·1 answer
  • Think about all the things we have investigated in class so far this semester. Identify three examples of climate-related aspect
    7·1 answer
  • Explain the process of predicting equipment failure?
    12·1 answer
  • Which is true about the workplace of Construction workers?
    15·2 answers
  • A coil consists of 200 turns of copper wire and have a cross-sectional area of 0.8 mmm square.The mean length per turn is 80 cm
    13·1 answer
  • Consider a 25-mm-diameter and 15-m-long smooth tube that is maintained at a constant surface temperature. Fluids enter the tube
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!