Write a complete Java
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Java: An Introduction to Problem Solving and Programming (7th Edition)
Additional Engineering Textbook Solutions
Starting Out with Python (4th Edition)
Starting Out with C++: Early Objects (9th Edition)
C How to Program (8th Edition)
Starting Out with Python (3rd Edition)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
- İn javaarrow_forwardWrite a Java program named Findletter that asks the user to enter 10 letters and store them in an array. Then it should ask the user to enter a letter (char value) to search for it. Then, if the entered letter is found, the program should display the message "The letter is in the array", otherwise it should display the message "The letter is not in the array".arrow_forwardWrite a program that creates a 2D array of size 4x5. Then, user enters the elements for this 2D array. Display the array in tabular form, using manipulators.arrow_forward
- Given an array below, write a program in Java language to print all numbers which are greater than the average of all numbers in the array. int []array = {1,10,-8,16,-12,34,0,19,-23,14}arrow_forwardJAVA PROGRAM Write a program that asks the user to input two integers a and b. Then create an array that has all integer from a to b. Print out the array. (Don’t forget to consider the situation of a=b, a<b, and a>b.) Example 1: Input two numbers: 6 2 Array is [6, 5, 4, 3, 2] Example 2: Input two numbers: 4 8 Array is [4, 5, 6, 7, 8] Pass the above array as a parameter to a method called average and return the average and print it out in the main method. (Do not use Math library to get the average.)arrow_forwardJAVA PROGRAM Ask the user for the number of rows and columns of a two-dimensional array and then its integer elements. Rotate the array 90 degrees counter-clockwise and print the new result. Input 1. One line containing an integer for the number of rows The value is guaranteed to be >= 3 and <= 100. 2. One line containing an integer for the number of columns The value is guaranteed to be >= 3 and <= 100. 3. Multiple lines containing at least one integer each line for the elements of the array All elements are non-negative and are all less than 100 SAMPLE OUTPUT: Enter the number of rows: 4 Enter the number of columns: 4 Row #1: 1 3 3 4 Row #2: 5 6 7 8 Row #3: 9 10 10 12 Row #4: 12 14 17 16 4 8 12 16 3 7 10 17 3 6 10 14 1 5 9 12arrow_forward
- Write a java program that creates an array of one hundred random numbers (the range of the random numbers must be between 150 and 999 inclusive). Then it should find out and display: 1- how many even numbers in the array. 2- The average of all numbers in the array. 3- how many numbers are greater than the average in the array.arrow_forwardJavaarrow_forwardIn Java, create a program that gets user input to create an array of books. The length of the array should be determined by how many books the user enters. You may ask the user how many books they will enter. After all books have been entered by the user, invoke a method to display the contents of the array in a table. Each book will have a title, author, cover, pages, copyright (year), read time (float).arrow_forward
- Java code Screenshot and outputarrow_forwardIn Java.arrow_forwardWrite a program that declares an array of 15 integers and reads the values from the user. Make sure that the user doesn’t enter a value greater than 10 (if the user enters a value not in the allowed range, discard that value and read another to put into the array). Now tell the number that occur maximum number of times in the array. For example for the following 7 has maximum occurrence. 4,7,3,3,2,7,1,5,7,9,9,9,7,8,10 Use both linear and binary search.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT