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
Describe the greatest power in design according to Aravena?
Ann [662]

Answer: Describe the greatest power in design according to Aravena? The subject of Aravena’s recent Futuna Lecture Series in New Zealand was ‘the power of design,’ which he described as ultimately being “the power of synthesis” because, increasingly, architects are dealing with complex issues and problems.

What are the three problems with global urbanization? 1. Degraded Environmental Quality ...

2. Overcrowding ...

3. Housing Problems ...

4. Unemployment ...

5. Development of Slums...

How could you use synthesis in your life to solve problems? Hence, synthesis is often not a one-time process of solution design but is used in combination with problem understanding and solution analysis to progress towards a more complete understanding of problems and solutions over time (see Applying the Systems Approach topic for a more complete discussion of the dynamics of this aspect of the approach).

I got all three answers

4 0
2 years ago
joe is an exceptional systems engineer who hopes to work at the techtonic group. he is handicapped and uses a wheelchair. techto
ASHA 777 [7]

The HR department should install wheelchair ramps and widen the doorways as they don't want to loose an exceptional systems engineer who hopes to work at the techtonic group.

What is a wheelchair ramps?

A wheelchair ramp is an inclined plane that can be installed in addition to or instead of stairs. Ramps make it easier for wheelchair users, as well as people pushing strollers, carts, or other wheeled objects, to enter a building.

The Americans with Disabilities Act requires wheelchair ramps (or other ways for wheelchair users to access a building, such as a wheelchair lift) in new construction for public accommodations in the United States.

A wheelchair ramp can be fixed, semi-fixed, or portable. Permanent ramps are intended to be bolted or otherwise attached to the ground. Semi-permanent ramps are commonly used in the short term and rest on top of the ground or concrete pad.

To know more about wheelchair ramps, visit: brainly.com/question/17395685

#SPJ4

5 0
1 year ago
rt this question on a NEW page Give ONE word/tem for each of the following descriptions by choosing a word/term from the list be
Shalnov [3]

Answer:

oh I am sorry I can't understand your question.

6 0
3 years ago
In python/Spyder
lianna [129]

Answer:

Answer to both the parts A and B are provided in the word document attached.

Explanation:

The explanation of the programs is provided in the attached file along with the screenshot of ATM application output.

Download docx
8 0
2 years ago
What is the ANSI B paper size also know as?
krek1111 [17]

Answer:

ANSI A sized paper is commonly referred to as Letter and ANSI B as Ledger or Tabloid.

Explanation:

7 0
2 years ago
Other questions:
  • The popularity of orange juice, especially as a breakfast drink, makes it an important factor in the economy of orange-growing r
    14·1 answer
  • A bridge hand consists of 13 cards. One way to evaluate a hand is to calculate the total high point count (HPC) where an ace is
    7·1 answer
  • Is a 68.75 and a 70 a pass in 5th grade?
    10·2 answers
  • Why is it important to stop climate change?
    15·2 answers
  • You want to know your grade in Computer Science, so write a program that continuously takes grades between 0 and 100 to standard
    7·1 answer
  • The sports car has a weight of 4900 lblb and center of gravity at GG. If it starts from rest it causes the rear wheels to slip a
    13·1 answer
  • A machine raises 20kg of water through a height of 50m in 10secs. What is the power of the machine.​
    5·1 answer
  • A river has an average rate of water flow of 59.6 M3/s. This river has three tributaries, tributary A, B and C, which account fo
    10·1 answer
  • Cup-sveg-aph<br><br>I m finding gf<br><br>if anyone interested pls come​
    11·2 answers
  • which of the following processes would be appropriate for cutting a narrow slot, less than 0.015 inch wide, in a 3/8- inch thick
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!