Question: Introduction To Java Objectives: To create and populate arrays to store information. To use random numbers to randomly choose an array element. Description: Your task

 Introduction To Java Objectives: To create and populate arrays to storeinformation. To use random numbers to randomly choose an array element. Description:

Introduction To Java Objectives: To create and populate arrays to store information. To use random numbers to randomly choose an array element. Description: Your task is to implement a "Random Insult Generator" program in Java. The computer must randomly choose a description and an animal (which are stored in arrays). There must be at least six descriptions and at least ten animals. Your program should randomly display an insult made up of a description and an animal. You should ensure that your code works correctly even if the programmer decides to add more descriptions or animals to the arrays before running your program. Good coding practices are expected (sensible variable names, comments, etc.). Sample Output: The following screenshots will give you an idea of what the program should look like. Your output must appear the same way as the screenshots below. run: You are a silly cat! BUILD SUCCESSFUL (total time: 0 seconds) run: You are a silly cat! BUILD SUCCESSFUL (total time: 0 seconds) run: You are a silly cat! BUILD SUCCESSFUL (total time: 0 seconds) Introduction To Java Arrays: Learning Objectives: Creating arrays and populating them with values. Using the for loop and the enhanced for loop to navigate through arrays. Five Foods Write some Java code that stores five foods in an array. What Size Array? Write some code that asks the user for the number of elements they wish to store, and then creates an integer array of the required size. Printing Contents of An Array Create an integer array and populate it with five values. Use an enhanced for loop to print out the array elements one at a time. Repeat the above task using a basic for loop (with initialisation, test and update). Sum It Up Write some code that stores the values from (1-10) inclusive in an array. Your code must loop through the array contents, calculate and print the total

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!