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]
3 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]3 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
Question Completion Status:
Mashutka [201]

Answer: c. Centre of pressure​

Explanation:

Pressure is applied on a surface when a force is exerted on a particular point on that surface by another object when the two come into contact with each other.

The point where the pressure is applied is known as the centre of the pressure with the force then spreading out from this point much like an epicentre in an earthquake.

6 0
3 years ago
or a metal pipe used to pump tomato paste, the overall heat- transfer coefficient based on internal area is 2 W/(m2 K). The insi
igomit [66]

Answer: ok the best one would be letter s because it goes

Explanation:

467,,mm tubing should do

7 0
3 years ago
A remote village on an island was devastated by a typhoon. Farmland was flooded and the crops
insens350 [35]

Answer:

A flood happens when water overflows or soaks land that is normally dry. flooding, happens when a large storm or tsunami causes the sea to They soon fell ill and died from cholera, which is spread by  Rice, wheat, and corn crops were destroyed.  Excess water overflows and runs on top of the land.

Explanation:

hope this helps

6 0
3 years ago
A 500-km, 500-kV, 60-Hz, uncompensated three-phase line has a positivesequence series impedance. z = 5 0.03 1 + j 0.35 V/km and
Anni [7]

Answer:

A) 282.34 - j 12.08 Ω

B) 0.0266 + j 0.621 / unit

C)

A = 0.812 < 1.09° per unit

B =  164.6 < 85.42°Ω  

C =  2.061 * 10^-3 < 90.32° s

D =  0.812 < 1.09° per unit

Explanation:

Given data :

Z ( impedance ) = 0.03 i  + j 0.35 Ω/km

positive sequence shunt admittance ( Y ) = j4.4*10^-6 S/km

A) calculate Zc

Zc = \sqrt{\frac{z}{y} }  =  \sqrt{\frac{0.03 i  + j 0.35}{j4.4*10^-6 } }    

    = \sqrt{79837.128< 4.899^o}   =  282.6 < -2.45°

hence Zc = 282.34 - j 12.08 Ω

B) Calculate  gl

gl = \sqrt{zy} * d  

 d = 500

 z = 0.03 i  + j 0.35

 y = j4.4*10^-6 S/km

gl =  \sqrt{0.03 i  + j 0.35*  j4.4*10^-6}  * 500

   = \sqrt{1.5456*10^{-6} < 175.1^0} * 500

   = 0.622 < 87.55 °

gl = 0.0266 + j 0.621 / unit

C) exact ABCD parameters for this line

A = cos h (gl) . per unit  =  0.812 < 1.09° per unit ( as calculated )

B = Zc sin h (gl) Ω  = 164.6 < 85.42°Ω  ( as calculated )

C = 1/Zc  sin h (gl) s  =  2.061 * 10^-3 < 90.32° s ( as calculated )

D = cos h (gl) . per unit = 0.812 < 1.09° per unit ( as calculated )

where :  cos h (gl)  = \frac{e^{gl} + e^{-gl}  }{2}

             sin h (gl) = \frac{e^{gl}-e^{-gl}  }{2}

     

7 0
2 years ago
What are the success factors for mechanical engineering?
Eva8 [605]

Answer:

-effective technical skills.

-the ability to work under pressure.

-problem-solving skills.

-creativity.

-interpersonal skills.

-verbal and written communication skills.

-commercial awareness.

-teamworking skills.

Explanation:

is this what ur looking for? if so there ya go lol

7 0
2 years ago
Read 2 more answers
Other questions:
  • Find the equivalent impedance Zeq seen by the source when Vs = 2 cos (5t) v, C = 0.2 F, R = 1 Ω and L = 0.1 H. (Give angles in d
    12·1 answer
  • By efficiency, we generally mean the ratio of the desired output to the required input. That is, efficiency is a measure of what
    7·1 answer
  • A 4-pole, 3-phase induction motor operates from a supply whose frequency is 60 Hz. calculate: 1- the speed at which the magnetic
    10·1 answer
  • Automobile engines normally have
    8·1 answer
  • The ultimate BOD of a river just below a sewage outfall is 50.0 mg/L, and the oxygen deficit at the outfall D0 is 2.0 mg/L. The
    6·1 answer
  • If a car travels 8 miles in 15 minutes, what is the speed of the car in miles per hour
    11·1 answer
  • A 2.0-in-thick slab is 10.0 in wide and 12.0 ft long. Thickness is to be reduced in three steps in a hot rolling operation. Each
    9·1 answer
  • 1. Pump extracts energy from a flowing fluid. _______
    10·1 answer
  • two cars travel on a straight road from the point. A to point B both cars accelerate to their maximum speed and then continue at
    10·1 answer
  • Anything you want to do in Hootsuite can be found in the ________, with the main workspace in the _________?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!