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
A circular ceramic plate that can be modeled as a blackbody is being heated by an electrical heater. The plate is 30 cm in diame
MakcuM [25]

Answer:

Heater power = 425 watts

Explanation:

Detailed explanation and calculation is shown in the image below

6 0
3 years ago
7.35 and 7.36 For the beam and loading shown, (a) draw the shear and bending-moment diagrams, (b) determine the maximum absolute
Crank

Maximum absolute values of the shear = 28 KN

Maximum absolute values of bending moment = 5.7 KN.m

<h3>How to draw Shear Force and Bending Moment Diagram?</h3>

A) We can see the beam loaded in the first image attached.

For the shear diagram, let us calculate the shear from point load to point load.

From A to C, summing vertical to zero gives; ∑fy = 0: -20 - V = 0

V = -20 KN

From C to D, summing vertical to zero gives; ∑fy = 0: -20 + 48 - V = 0

V = 28 KN

From D to E, summing vertical to zero gives; ∑fy = 0: -20 + 48 - 20 - V = 0

V = 8 KN

From E to B, summing vertical to zero gives; ∑fy = 0: -20 + 48 - 20 - 20 - V = 0

V = -12 KN

For the bending moment diagram, let us calculate the bending moment from point load to point load.

At point A, the bending moment would be zero. Thus, M_A = 0 KN.m

At point C, taking moment about point C and equating to zero gives;

M_C = 0. Thus; 20(0.225) + M = 0

M = -4.5 KN.m

At point D, taking moment about point D and equating to zero gives;

M_D = 0. Thus; 20(0.525) - 48(0.3) + M = 0

M = 3.9 KN.m

At point E, taking moment about point E and equating to zero gives;

M_D = 0. Thus; 20(0.75) - 48(0.525) + 20(0.225) + M = 0

M = 5.7 KN.m

At point B, taking moment about point E and equating to zero gives;

M_E = 0. Thus; 20(1.05) - 48(0.825) + 20(0.525) + (20 * 0.3) + M = 0

M = 2.1 KN.m

2) From the attached diagrams, we can deduce that;

Maximum absolute values of the shear = 28 KN

Maximum absolute values of bending moment = 5.7 KN.m

Read more about shear force & bending moment diagram at; brainly.com/question/14834487

#SPJ1

4 0
2 years ago
Who is father of Engineer?
3241004551 [841]

John Smeatom, U.K. 18th century, was the first self-proclaimed, civil engineer in the 18th century and IS considered “the father of modern, civil engineering”.

hoped this helped! :)

4 0
3 years ago
Read 2 more answers
The yellow rectangle area is 25% (or 1/4) the area of the blue rhombus. The height (H) of the yellow rectangle is twice as long
Kitty [74]

Answer:

I don't know sry

Explanation:

6 0
3 years ago
Proper ventilation is required when welding, so that you don't ____________.
galben [10]
I say the answers is A but if you mean ventilation in the area of the room then answer B
4 0
3 years ago
Read 2 more answers
Other questions:
  • An aluminum cylinder bar ( 70 GPa E m = ) is instrumented with strain gauges and is subject to a tensile force of 5 kN. The diam
    9·1 answer
  • A series R-L circuit is given. Circuit is connected to an AC voltage generator. a) Derive equations for magnitude and phase of c
    13·1 answer
  • If 100 J of heat is added to a system so that the final temperature of the system is 400 K, what is the change in entropy of the
    5·1 answer
  • Technician A says that squeeze-type resistance spot welding (STRSW) may be used on open butt joints. Technician B says that repl
    14·1 answer
  • Ok there..............................................
    6·1 answer
  • 100 POINTS! do sweedish people have yogurt do u think they have had yogurt and chimichangas do they have those
    11·1 answer
  • In a long trip what is considered a life line to take with you.
    12·1 answer
  • As you have learned, not all motor oils are the same. What are two things that make them different?.
    11·1 answer
  • 1. Band saw lower wheel does not require a guard *
    6·1 answer
  • Which of the following situations best describes student engaged in active learning
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!