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]
4 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]4 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
Alicia uses a software application to store the names, email addresses, and phone numbers of her friends in alphabetical order. 
SpyIntel [72]

I think she's using Excel.

6 0
3 years ago
The most common technique for using an appropriate synchronization mechanism to serialize the accesses to prevent errors is to a
Aleks04 [339]

The most common technique for using an appropriate synchronization mechanism to serialize the accesses to prevent errors is to acquire a lock on the shared file.

<h3>What does a lock on a file mean?</h3>

The lock icon can be seen in Windows and it shows that the file or folder is one that can only be accessed by the person who lock it.

Note that The most common technique for using an appropriate synchronization mechanism to serialize the accesses to prevent errors is to acquire a lock on the shared file.

Learn more about synchronization from

brainly.com/question/25541016

#SPJ1

5 0
2 years ago
What are the example of dedicated computers?
Drupady [299]
A dedicated server is a single computer in a network reserved for serving the needs of the network. For example, some networks require that one computer be set aside to manage communications between all the other computers. A dedicated server could also be a computer that manages printer resources.
8 0
3 years ago
The Apple II is an IBM-compatible PC "clone.
lutik1710 [3]
Is this supposed to be a true or false question?
4 0
3 years ago
Should Manufacturers Include Extra Programs in Operating Systems for Computers and Mobile Devices?
Gennadij [26K]

Answer:

Well, it depends. Sometimes the extra programs can be useful or just plain fun, in which case the answer is yes. But extra programs can also sometimes be utterly useless and get in the way, in which case the answer is no.\

4 0
3 years ago
Other questions:
  • What does this mean?
    7·2 answers
  • Its false because I got it wrong
    5·1 answer
  • J'Dean is a team lead at a car wash. He wrote a memo to the employees, explaining some upcoming promotions, but J'Dean didn't fu
    6·2 answers
  • Siva added a Contact Form to her website. This is used for the collection to be included in
    5·1 answer
  • Which of the following can be considered classifications of technology companies? (Select all that apply)
    11·1 answer
  • An organizational structure that combines a functional structure with a divisional structure to emphasize project or program nee
    8·1 answer
  • What is a complex instruction set computer chip? Multiple Choice Performs all arithmetic operations (for example, addition and s
    6·1 answer
  • Cryptanalysis is made more difficult by having shorter keywords.a) trueb) false
    6·1 answer
  • Trong mạng internet, chúng tôi thay đổi công nghệ mạng LAN sang một công nghệ
    5·1 answer
  • All mortgage companies are willing to loan anyone money regardless of credit scores. True or false?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!