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
Cybersquatters:_________.
ZanzabumX [31]

It should be noted that cybersquatters b. register domain names for famous trademarks or company names to which they have no connection remain connected to popular Web sites.

<h3>What is Cybersquatting?</h3>

Cybersquatting  can be explained as  registering as well as selling a domain name with the so that one can benefit from goodwill of someone else's trademark.

It serves as a practice of buying up domain names which is operating on names of existing businesses.

Learn more about Cybersquatting at;

brainly.com/question/21400963

8 0
2 years ago
Identify and define the various systems used in creating the Technological Systems.
Sergeu [11.5K]

Answer:best programming language

Explanation:

There is no best programming language but the simplest is python language.

5 0
3 years ago
How are PivotCharts different from regular charts?
goldenfox [79]

Answer:

A) They are interactive

Explanation:

6 0
3 years ago
Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?
Vlada [557]

Explanation:

The argument is for the right braces.The right braces are used for simplicity.The right brace always terminates a block of code or a function.

The argument against right brace is that when we see a right brace in a program,we are not obvious about the location of the corresponding left brace because all or multiple  statement end with a right brace.

7 0
3 years ago
This tag element is the last one used in the html code sequence
satela [25.4K]

Answer:

Looking closely at the HTML code sequence, it does seem that the tag element is the endpoint from where the HTML form gets the input, like input boxes, checkboxes, radio buttons, etc. And hence it is correct to say that the tag elements are the last one used in the HTML code sequence. And in the HTML code sequence head title script and styles comes at the top, and hence we mention the script or the Javascript code basically at the last, such that the HTML code or the web page run one time at least.

Explanation:

Please check the answer section.

3 0
4 years ago
Other questions:
  • Jane is designing a print brochure for a retail company. She’s having trouble deciding on the page margin. Which best practice w
    13·2 answers
  • Fractures in Earth’s crust where displacement has occurred are called
    13·1 answer
  • CAPTCHAs can be used as a form of signature to create a valid contract in e-commerce. True False
    6·2 answers
  • What should you do when an error message pops up on the screen?
    9·1 answer
  • 14. You can store data copied from any Office application file with the
    14·1 answer
  • What is presentation software in bussiness used for
    9·1 answer
  • True or False? Threat modeling is the practice of identifying and prioritizing potential threats and security mitigations to pro
    9·1 answer
  • ______ controls are information security safeguards that focus on the application of modern technologies, systems, and processes
    12·1 answer
  • 1. Who is known as the father of a computer?​
    12·2 answers
  • Explain briefly how learning how to follow can make a person a good leader
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!