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
Ilia_Sergeevich [38]
3 years ago
11

java Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins w

ith an integer indicating the number of words that follow. Assume that the list will always contain less than 20 words.
Computers and Technology
1 answer:
vfiekz [6]3 years ago
6 0

Answer:

The following are the program in the Java Programming Language.

//set a package

import java.util.Scanner;

//define class

public class Main  

{

 //define a main method

 public static void main(String[] args)  

 {

   //declare the Scanner class object

   Scanner s = new Scanner(System.in);

   //get the size of the array from the user

   int size=s.nextInt();

   //declare an integer array with given size

   int a[]=new int[size];

   //declare a string array with given size

   String word[]=new String[size];

   //set the for loop  

   for(int i=0;i<size;i++)

   //get string input from the user

   word[i]=s.next();

   //iterates with the array, increase the count

   for(int i=0;i<size;i++)  

   {

     for(int j=0;j<size;j++)  

     {

       //check that elements of words

       if(word[i].equals(word[j]))

         //increament in the array by 1

         a[i]++;

     }

   }

   System.out.print("\n");

   //set for loop to print the following result

   for(int i=0;i<size;i++)

     System.out.println(word[i]+" "+a[i]);

  }

}

Explanation:

<u>The following are the description of the program</u>.

  • Firstly, set the required predefined package and define class 'main then, define main method inside the class and inside the method.
  • Declare the object of the scanner class and get the size of the array through the object in the variable 'size'.
  • Then, declare two array which are integer type 'a' with the given input size and string type 'word' with the given input size.
  • Set the for loop that get string type array elements from the user and again set two for loop that increase the size of the integer data type array by 1 with the loop iteration.
  • Finally, set the for loop that print the following result.
You might be interested in
Which of the following would you not see on a windows 10 start menu?
mixas84 [53]
Task view is the option that you would not see on a Windows 10 Start menu, whereas if you click the Windows button, you can see tiles with different applications, all of your apps in the form of tiles you can distribute according to your own taste, and power button where you can choose whether you want to shut down your computer, put it to sleep, or log out.
4 0
3 years ago
What are some similarity's between NES console and consoles today
blondinia [14]

Answer:

Old game consoles

New game consoles

Old games consoles like the NES, SNES, the SEGA Genesis were manufactured during the 1970's This generation started in the first and ends in the fifth

New game 3-D consoles like the PS3, X-Box 360 and the Wii U were manufactured during the late 90s to right now. This generation started in the sixth and ends at the eighth.

Facts

They have introduce a lot of game genres and characters like the Mario bros, The Legend of Zelda series, The Tetris game, and Sonic the Hedgehog series.

Genres like platformers and side scrollers were introduced in the 2-D era

New game consoles has introduce game genres like First Person Shooters. Games like Call of Duty and Halo are examples

The answer

The differences between an old console and a new console is not only the modeling of either the game console, but the functional properties and the way it operates. From each generation , there are about eight generations of consoles right now

The difference between an old generation of consoles and a new genration of console

Sources

http://www.answers.com/Q/What_is_the_difference_between_the_old_games_consoles_and_the_new_games_consoles

Pictures and more facts

The X-Box sucessor, the X-Box 360 was released in November 22, 2005 in the United States. Games like Halo and Call of Duty are the games that introduced really good First-Person Shooters

The Playstation 1, PSx, or the PS1 was made in September 9th 1995 in North America. The games that was in for the playstation is the famous Crash Bandicoot and Spyro the Dragon series and a few 2-d games.

The second picture the Super Nintendo Entertainment System or the SNES, was release to America in 1991 and is the sucessor of the NES

The games that was in the system was Super Mario World 1-2, The legend of zelda 3, which were one of the best selling games on the system

The first picture the Nintendo Entertainment System or the NES, that was released to America in 1985 and it was the best selling console at its time.

The games it introduce was of course Super Mario Bros 1-3, The Legend of Zelda 1-2

The third and last picture is the SEGA Overdrive or SEGA Genesis was releases to America in 1989 and rivaled with the SNES during the time.

Games that was with the system was SEGA's blue mascot Sonic the Hedgehog 1-3 and Knuckles, Teenage Mutant Ninja Turtles

PS1 fact

Even though the PS1 has its 2-D games, it also has 3-D games like the Crash Bandicoot and Spyro series made by Naughty Dog, who also did the Last of us game

Explanation:

the similarities are they both play games they both load some type of disk etc.

3 0
3 years ago
Read 2 more answers
Kelly is evaluating the following image. Which of the statements that she makes about the photograph is true?
Stells [14]

Photo not included

Plz add photo

7 0
3 years ago
How do i divid 521 to the nearest tenth
Softa [21]

Answer:

520

Explanation:

take 521 round that to the nearest 10th and thats 520

8 0
4 years ago
Read 2 more answers
A spreadsheet is an example of a(n):
zhenek [66]

Answer:

general-purpose application

Explanation:

General purpose application

1. These are software applications which can be used for multiple purposes.

2. These applications perform various tasks as per the need of the user. These tasks can vary in complexity and may or may not be related to each other.

3. These applications are useful for almost all categories of users.

Example include spreadsheets which is a primary application for accounting purpose. It can also be used for to store numerical data or other data in an organized format.

Another use of spreadsheets is visible in data analysis. Graphs and charts can be created based on the given numerical data stored in the spreadsheet. This helps in business growth.

Microsoft Excel and Apple Numbers are spreadsheet applications.

Another example is a word application that can be used to prepare document, reports, and flyers also. Microsoft word is a word processor.

Specialized program

1. These are software applications which can be used for special purpose only.

2. These applications can perform only the task for which it is created.

Examples include windows media player. This application can only run media (audio or video) programs.

System application

1. These include operating system and utility applications.

2. The operating system acts as an interface between the user and the hardware resources of the computer.

For example, Windows is an operating system. It is available in various versions.

3. The computer system and its resources, both software and hardware, are maintained and optimized using utility applications.

Anti-virus is an example of utility applications. It protects the computer resources from virus.

Utility applications

4. The computer system and its resources, both software and hardware, are maintained and optimized using utility applications.

5. These applications are mandatory to smooth functioning of a computer.

For example, disk driver, file manager and back up applications help in managing disks and aid in taking back ups and file management is done by file manager

8 0
3 years ago
Other questions:
  • What is basic statement made up of​
    10·2 answers
  • Recall that TCP can be enhanced with SSL to provide process-to-process security services, including encryption. Does SSL operate
    7·1 answer
  • Convert the ProjectedRaises class to an interactive application named ProjectedRaisesInteractive. Instead of assigning values to
    15·1 answer
  • Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's
    5·1 answer
  • output device is any peripheral to provide data and control signal to ab information processing system​
    7·1 answer
  • What could be a pass word if the hint is stayton its for windows 10 <br><br> please help
    5·1 answer
  • Suppose you are given a sequence that is described by a formula, starting at index n=0. If you need to change the starting index
    6·1 answer
  • The Danger zone around a robot is?
    13·2 answers
  • What are the differences between switches and routers? cse question
    8·1 answer
  • when connecting to a wireless local area network (wlan), what is the most important fact about the service set identifier (ssid)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!