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
What is the definition of insert view and why do we use it
maw [93]

Answer:

its a view point for auto cad

Explanation:

from my knowlege in IED we learned about it as a way of sing how an object would look in inventor or auto CAD

4 0
3 years ago
An eddy current separator is to separate aluminum product from an input streamshredded MSW. The feed rate to the separator is 2,
blsea [12.9K]

Answer:

<em>the % recovery of aluminum product is 80.5%</em>

<em>the % purity of the aluminum product is 54.7%</em>

<em></em>

Explanation:

feed rate to separator = 2500 kg/hr

in one hour, there will be 2500 kg/hr x 1 hr = 2500 kg of material is fed into the  machine

of this 2500 kg, the feed is known to contain 174 kg of aluminium and 2326 kg of rejects.

After the separation, 256 kg  is collected in the product stream.

of this 256 kg, 140 kg is aluminium.

% recovery of aluminium will be = mass of aluminium in material collected in the product stream ÷ mass of aluminium contained in the feed material

% recovery of aluminium = 140kg/174kg x 100% = <em>80.5%</em>

% purity of the aluminium product = mass of aluminium in final product ÷ total mass of product collected in product stream

% purity of the aluminium product = 140kg/256kg

x 100% = <em>54.7%</em>

8 0
3 years ago
Two players find themselves in a legal battle over a patent. The patent is worth 20 for each player, so the winner would receive
Alborosie

Answer:

The solution and complete explanation for the above question and mentioned conditions is given below in the attached document.i hope my explanation will help you in understanding this particular question.

Explanation:

5 0
3 years ago
Design for human-fit strategies include:
andreev551 [17]

Answer:

B- extreme fit, close fit, adjustable fit

Explanation:

A human-fit design typically involves the process of manufacturing or producing products (tools) that are easy to use by the end users. Therefore, human-fit designs mainly deals with creating ideas that makes the use of a particular product comfortable and convenient for the end users.

The design for human-fit strategies include; extreme fit, close fit and adjustable fit.

Hence, when the aforementioned strategies are properly integrated into a design process, it helps to ensure the ease of use of products and guarantees comfort for the end users.

5 0
3 years ago
A highway reconstruction project is being undertaken to reduce crash rates. The reconstruction involves a major realignment of t
CaHeK987 [17]

Answer:

The provided length of the vertical curve is satisfactory for the reconstruction design speed of 60 mi/h

Explanation:

The explanation is shown on the first uploaded image

8 0
3 years ago
Other questions:
  • A fluid has a dynamic viscosity of 0.048 Pa.s and a specific gravity of 0.913. For the flow of such a fluid over a flat solid su
    10·1 answer
  • The development team recently moved a new application into production for the accounting department. After this occurred, the Ch
    6·1 answer
  • a 120 volt,13 watts fluorescent light bulb is operated from 6pm until 10pm every day the cost per kilo watt hour is $0.07. what
    11·1 answer
  • A banked highway is designed for traffic moving at v = 88 km/h. The radius of the curve r = 314 m. show answer No Attempt 50% Pa
    5·2 answers
  • Which type of design does not need special care for the placement of dimensions?
    5·1 answer
  • A Carnot engine is operated between two heat reservoirs at temperatures of 520 K and 300 K. It receives heat from the 520 K rese
    8·1 answer
  • B) Calculate the FS against uplift and calculate effoctive stress at the base level for water
    11·1 answer
  • The build up of electrons will cause electrical called ?
    14·1 answer
  • (20 points) A 1 mm diameter tube is connected to the bottom of a container filled with water to a height of 2 cm from the bottom
    12·1 answer
  • On a day in which the local atmospheric pressure is 99.5 kPa, answer each of the following: (a) Calculate the column height of m
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!