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
Helen [10]
3 years ago
10

7.14 LAB: Word frequencies Write a program that reads a list of words. Then, the program outputs those words and their frequenci

es. The input begins with an integer indicating the number of words that follow. Assume that the list will always contain fewer than 20 words. Ex: If the input is: 5 hey hi Mark hi mark the output is: hey 1 hi 2 Mark 1 hi 2 mark 1 Hint: Use two arrays, one array for the strings and one array for the frequencies.

Computers and Technology
1 answer:
Anastasy [175]3 years ago
4 0

Answer:

See explaination

Explanation:

Below is the program code;

import java.util.Scanner;

public class LabProgram {

public static void main(String[] args) {

Scanner in = new Scanner(System.in);

int n = in.nextInt();

String[] words = new String[n];

for (int i = 0; i < words.length; i++) {

words[i] = in.next();

}

int count;

for (int i = 0; i < words.length; i++) {

count = 0;

for (int j = 0; j < words.length; j++) {

if (words[i].equals(words[j])) {

++count;

}

}

System.out.println(words[i] + " " + count);

}

}

}

Please kindly check attachment for the output.

You might be interested in
Michael works for a graphic design firm. He is creating an informative poster. He needs to add a great deal of text in the poste
Dennis_Churaev [7]

Michael will use a Adobe Photoshop or CorelDraw   tool to help format the text for creating an informative poster.

<h3>What application is used for graphic design?</h3>

They are:

  • Adobe Photoshop
  • Illustrator, GIMP
  • CorelDraw
  • Canva  and others

Based on the American Institute of Graphic Arts (AIGA), graphic design is known to be a term that is described as “the art and method of planning and bringing forth ideas and experiences along with the use of visual and textual content.”

Therefore, Michael will use a Adobe Photoshop or CorelDraw   tool to help format the text for creating an informative poster.

Learn more about graphic design from

brainly.com/question/27019704

#SPJ1

3 0
2 years ago
Why is it grey? i recently dropped it , the switch is on!
iragen [17]

Answer:

because it is what it is

7 0
3 years ago
Discuss the five challenges that limit the use of computer in remote places in Africa​
Alchen [17]

The first challenge is that there is not electric conection.So the computer won't be able to function.Also there will be noone who will be able to use it due to the lack of education.Plus there will not be internet connection , limitting the abilities of the computer to the very basics.In addition there will not be any tools or spare parts in order to fix a computer.Finally even if thete were spare parts there woul not be someone able to gix the computer.

I hop I was helpful.Let me know if you need anything else.

3 0
3 years ago
A system might help managers to
Minchanka [31]

Answer:Decisions are only as valid as the information on which they are based. Management information systems improve your decision-making, because they provide information that is accurate, timely, relevant and complete.

Explanation:

Decisions are only as valid as the information on which they are based. Management information systems improve your decision-making, because they provide information that is accurate, timely, relevant and complete.

5 0
3 years ago
8.
Licemer1 [7]

Answer:

yes

Explanation:

the faster the processor the better the computer loads things and works faster, there's little to no latency depending on the wifi

3 0
3 years ago
Other questions:
  • PLS HELP!!
    13·1 answer
  • Documents on the web stored on web servers are known as web _____.
    6·1 answer
  • By defeaut, Excel cells are top aligned<br><br> a. True<br><br> b. False
    12·1 answer
  • I don't know the answer and I tried different ones and they not what the book is looking for.
    7·1 answer
  • Which of the following statements is/are true? (Points : 5) A. A default constructor is automatically created for you if you do
    12·1 answer
  • Lube job---------$18.00
    14·1 answer
  • The seven basic internal components found in a computer tower
    9·1 answer
  • Why is it important to evaluate the website on which you plan to shop?
    13·1 answer
  • Why do you classify computers?
    6·1 answer
  • Regarding the Internet of Things (IoT), a business involved in utilities, critical infrastructure, or environmental services can
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!