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
Pls help me it’s due today
hichkok12 [17]

Answer:

C. 14.55

Explanation:

12 x 10 = 120

120 divded by 10 is 12

so now we do the left side

7 x 3 = 21 divded by 10 is 2

so now we have 14

and the remaning area is 0.55

so 14.55

6 0
2 years ago
assume a five layer network model. There are 700 bytes of application data. There is a 20 bye header at the transport layer, a 2
amm1812

Answer: The overhead percentage is 7.7%.

Explanation:

We call overhead, to all those bytes that are delivered to the physical layer, that don't carry real data.

We are told that we have 700 bytes of application data, so all the other bytes are simply overhead, i.e. , 58 bytes composed by the transport layer header, the network layer header, the 14 byte header at the data link layer and the 4 byte trailer at the data link layer.

So, in order to assess the overhead percentage, we divide the overhead bytes between the total quantity of bytes sent to the physical layer, as follows:

OH % = (58 / 758) * 100 = 7.7 %

4 0
3 years ago
Do the coil resistances have any effect on the plots?
PolarNik [594]
Because of the skin depth effect, the current at high frequency tends to flow at very low depth from radius. Then at high frequency the effective cross section of the wire is narrower than at DC.

Fro example skin depth at 100 kHz is 0.206 mm (0.008”), a wire more thicker than AWG26 could be a waste of copper, better use a bunch of thin wire (Litz wire) to rise the Q factor.
8 0
2 years ago
W10L1-Show It: Pythagorean Theorem<br> Calculate the total material in the picture.<br> 4<br> 3
Fantom [35]

Answer:

35

Explanation: I really dont even know, I just used up all my tries on it and got it wrong on every other thing i chose. So it's 35 i believe cause its the only answer i didnt choose.

7 0
3 years ago
Why do engineers play a variety of roles in the engineering process?
katrin2010 [14]

Answer:

b

Explanation:

7 0
2 years ago
Other questions:
  • A __ insulated panel consists of a layer of insulating foam between two osb or plywood panels
    14·2 answers
  • Advances in vehicle manufacturing technology have decreased the need for:
    10·1 answer
  • Technician A says that proper footwear may include both leather and steel-toed shoes. Technician B says that leather-soled shoes
    8·1 answer
  • Which field in a Transmission Control Protocol (TCP) header is chosen from ephemeral ports?
    11·1 answer
  • Two routes connect an origin and a destination. Routes 1 and 2 have performance functions t1 = 2 + X1 and t2 = 1 + X2, where the
    6·1 answer
  • How to update android 4.4.2 to 5.1 if there isnt any update available​
    15·2 answers
  • A closed, rigid tank is filled with a gas modeled as an ideal gas, initially at 27°C and gauge pressure of 300 kPa. The gas is h
    9·1 answer
  • By using a book of the OHS Act, Act 85 of 1993, find the act or regulation where the following extraction comes from "every empl
    12·1 answer
  • What is the first step of the engineering design process?
    9·2 answers
  • Technician A says that the definition of torque is how far the crankshaft twists in degrees.Technician B says that torque can re
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!