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
Makovka662 [10]
4 years ago
5

Write a static method named fixSpacing that accepts a Scanner representing a file as a parameter and writes that file's text to

the console, with multiple spaces or tabs reduced to single spaces between words that appear on the same line.

Engineering
1 answer:
Umnica [9.8K]4 years ago
8 0

Answer:

See the code and explanation below

Explanation:

Is neccesary that accepts a Scan  representing a file as a parameter and writes that file's text on the language, and we need to reduce the multiple spaces to single spaces between  words that appear using just one line. Each word is to appear on the same line  in output as it appears in the file. We need to consider that the lines can be blank.

The code on Jave is this one:

public void DavidSpaces(Scan sc) {

   while(sc.hasNextLine()) {

       String line = sc.nextLine();

       Scanner linesc = new Scan(line);

       while(linesc.hasNext())

           System.out.print(linesc.next() + " ");

       System.out.println();

   }

}

The algorithm scheme is given on the picture attached.

You might be interested in
This is an essential safety procedure that protects workers from injury while working on or near electrical circuits and equipme
Mice21 [21]

Answer:

Option B

Lockout/ Tagout

Explanation:

lockout and tagout is a safety procedure used in most industries and work places. This ensures that during any maintenance work, that dangerous machines are properly shut off and not able to be started up again prior to the completion of maintenance or repair work.

The procedure includes:

1. Turns off and disconnects the machinery or equipment from its energy source(s) before performing service or maintenance.

2. The authorized employee(s) either lock or tag the energy-isolating device(s) to prevent the release of hazardous energy.

8 0
4 years ago
Consider a very long, cylindrical fin. The temperature of the fin at the tip and base are 25 °C and 50 °C, respectively. The dia
Mrrafil [7]

Answer:

The fin temperature in °C at a distance of 10 cm from the base = 33.78°C

Explanation:

The following assumptions will be made to solve this problem

- The heat transfer coefficient does not change with the time or distance.

- The temperature of the fins varies just in only one direction.

The temperature of the fin at x = 10 cm = 0.10 m from the base can be calculated from the temperature variation with distance formula for a very long fin.

(T - T∞) = (T₀ - T∞)e⁻ᵐˣ

T = T(x) = temperature at any point along the fin

T∞ = temperature at the tip of the fin = ambient temperature = 25°C

T₀ = temperature at the base of thw fin = 50°C

x = any distance along the length of the fin from the base of the fin = 0.1 m

m = √(hP/KA)

h = Heat transfer coefficient = 123 W/m².K

P = perimeter in contact with the base = πD = π × 0.03 = 0.0943 m

K = thermal conductivity = 150 W/m.K

A = surface area in contact with the base = πD²/4 = π(0.03)²/4 = 0.0007071 m²

m = √(123 × 0.0943)/(150 × 0.0007071)

m = 10.46

mx = 10.46 × 0.1 = 1.046

(T - 25) = (50 - 25) e⁻¹•⁰⁴⁶

T = 25 + 25 e⁻¹•⁰⁴⁶ = 25 + 8.78 = 33.78°C

8 0
3 years ago
Convenience items like liquid egg are a lot more expensive?<br> True<br> Or False
Alchen [17]
It’s true because convenience stores are more expensive so that means overall the items would be more expensive.
3 0
3 years ago
Read 2 more answers
A rocket is to be designed to produce 5 MN of thrust at sea level. The pressure in the combustion chamber is 7 MPa and the tempe
tiny-mole [99]

Answer:

a) specific impulse = 203 s

(b) mass flow rate = 2511 kg/s

(c) throat diameter = 0.774 m

(d) exit diameter = 1.95 m

(e) thrust =  5.3*10^6 N/m^2

(f) thrust at sea level = 15.6*10^6 N

(g) thrust with hydrogen = 5*10^6 N

(h) thrust with stagnation =  5*10^6 N

Explanation:

See the attached file for explanation.

7 0
4 years ago
Methane (CH4) at 298 K, 1 atm enters a furnace operating at steady state and burns completely with 140% of theoretical air enter
lesya [120]
ATM enters a furnace operating at steady state and burns completely
4 0
3 years ago
Other questions:
  • According to the HERARCHY of hazard control what sequence is specified for protecting workers from chemical hazards assume that
    7·1 answer
  • The displacement of an oscillating mass is 0.004*sin(7t) meters. What is the peak amplitude of its velocity in meters/second?
    10·1 answer
  • LET'S DO THIS! Here are the directions whoever answers first will get the brainliest! I Promise!
    12·1 answer
  • When your workplace obtains new materials, you should add them to the chemical list:
    10·1 answer
  • Gina is about to use a fire extinguisher on a small fire. What factor determines the
    8·1 answer
  • In one study the critical stress intensity factor for human bone was calculated to be 4.05 MN/m3/2. If the value of Y in Eq. (2.
    6·1 answer
  • Some wire of radius is 1.262mm has a resistance of 20Ω. Determine the resistance of a wire of the same length and material if th
    14·2 answers
  • Select a research proposal topic that relates to electrical and electronics engineering and write a proposal report taking into
    12·1 answer
  • Describe the potential evidences of child hood fixation that show up in adult personality?​
    13·2 answers
  • The source term will affect all algebraic equations.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!