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 hot plate with a temperature of 60 C, 50 triangular profile needle wings of length (54 mm), diameter 10 mm (k = 204W / mK) wil
frez [133]

Complete question is;

A hot plate with a temperature of 60 °C will be cooled by adding 50 triangular profile needle blades (k = 204 W/m.K) with a length of 54 mm and diameter 10 mm. According to the ambient temperature 20 °C and the heat transfer coefficient on the surface 20 W/m².K. Calculate,

a-) Wing efficiency

b-) Total heat transfer rate (W) from the wings,

c-) Calculate the effectiveness of a wing.

Answer:

A) Efficiency = 96.05 %

B) Total heat transfer rate = 166.68 W/m

C) Wing Effectiveness = 10.42

Explanation:

Please find attached explanation for all the answers given.

3 0
3 years ago
In the figure show, what's the distance from point H to point C?
padilas [110]

Answer:

B.

Explanation:

I think not sure hehe

4 0
3 years ago
In the truss below, the vertical reaction force at A is
Montano1993 [528]
It’s c trust just trust
7 0
3 years ago
In ________ programming, the programming is centered on objects that are created from abstract data types that encapsulate data
Contact [7]

Answer:

<em>Object-oriented</em>

Explanation:

<em>Object Oriented programming</em> <em>(OOP)</em> is a specific way of programming, where the code is organized in units called classes, from which objects are created that are related to each other to achieve the objectives of the applications. Object-oriented programming took over as the dominant programming style in the mid-1980s, largely due to the influence of C ++. Its dominance was consolidated thanks to the rise of graphical user interfaces, for which object-oriented programming is particularly well suited. Its most important characteristics are the following:

  • Encapsulation
  • Polymorphism
  • Abstraction
  • Inheritance

8 0
3 years ago
A cylindrical container is 150mm in diameter and weights 2.25n when empty
stellarik [79]

Answer:

.

Explanation:

.

3 0
3 years ago
Other questions:
  • A material condition used to indicate that a specified geometric tolerance applies at each increment of size of a feature within
    15·1 answer
  • The acceleration of a particle is given by a = 2t − 10, where a is in meters per second squared and t is in seconds. Determine t
    11·1 answer
  • Suppose we are managing a consulting team of expert computer hackers, and each week we have to choose a job for them to undertak
    12·1 answer
  • What do you enjoy most and least about engineering?
    15·2 answers
  • This circuit is?
    14·2 answers
  • Ok this really isn’t a question but I need help, I’m wondering if a Samsung galaxy 9 is a good phone
    12·2 answers
  • Please help fast
    13·1 answer
  • Describe two fundamental reasons why flexural strength should depend on porosity
    14·1 answer
  • 10. True or False? A disruptive technology<br> radically changes the way people live and<br> work.
    5·2 answers
  • Which of the following is a correct version of a user story?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!