Write a program called GradesAverage, which prompts user for the number of students, reads it from the keyboard, and saves it in an int variable called numStudents. It then prompts user for the grades of each of the students and saves them in an int array called grades. Your program shall check that the grade is between 0 and 100.
Q: Write a function named greaterThan131. It takes an array of int s as the input parameter and returns…
A: An array can be returned using pointers. syntax:- int* functionName() { return address of array;…
Q: Write a program named FullName2.sce that prompts the user for an array of x data and an array of y…
A: given data, enter x data : [1, 2, 3, 4] enter y data : [2, 5, 9, 10]
Q: I need help to write this code in JAVA with comment please Write a program that stores the…
A: Program code: //import the required package import java.util.Scanner; //define the class…
Q: A method int [] makeRandomArray(int size ,int a , int b) that makes and returns an array with…
A: hi there in the code as mentioned, above i have used all four methods int[] make randomArray(): To…
Q: Given two arrays named locks and keys of size 10 each, keys[i] is the key for lock[i]. Write a…
A: Since the coding language is not mentioned, I have done the code in C++. Algorithm : Step 1 :…
Q: Given the following table containing information about employees of an organization, develop a small…
A: Java used to answer this question
Q: Write an application that displays a series of at least five student ID numbers (that you have…
A: CODE:- ScoreException.javapublic class ScoreException extends Exception{ public…
Q: Wally's Training Gym and you encourage your trainers to enroll new members. Input is the trainer's…
A: Here, gym trainer name and how many enrolled members this show and also divided three category…
Q: Write a program that declares three one-dimensional arrays named current, resistance, and voltage.…
A: Given Write a program that declares three one-dimensional arrays named current, resistance, and…
Q: This program ask the user to enter the scores of theory and practical tests which are stored as…
A: #include<stdio.h> #include<conio.h> class score { int theory[5],practical[5],total[5];…
Q: I got part of this code right but the other part I dont this is the question - In the exercises in…
A: In the question, it was stated: "continuously prompt until the user enters an invoice number between…
Q: Given: an int variable num, an int array current that has been declared and initialized, an int…
A: First Part Code #include <iostream> using namespace std; int main(){ int num; int…
Q: Write a program that accepts an integer value called multiplier as user input. Create an array of…
A: As programming language is not mentioned, so we are providing answer in C language.
Q: Write a program that uses arrays to store the registration number of your total class.it then search…
A: Here, we take an integer array named registration to store the registration number of class_size…
Q: Write a code that calculates the total score for students in a class. Suppose the scores are stored…
A: CODE TO COPY public class TotalScore { /** main method **/ public static void main(String[]…
Q: Write a program that uses a two-dimensional array to store the highest and lowest temperatures for…
A: The two-dimensional array stores the data in rows and columns that are in a matrix type. In this…
Q: Write a program that accepts a series of numbers, stores the numbers into an array, writes the…
A: - We will have one array which will take the numbers we want and then accordingly the operations…
Q: Write a Java program named Occurrence that asks the user to enter 10 integer numbers and store them…
A: Step-1: Start Step-2: Declare an array arr of size 10 Step-3: Declare two variable x and count…
Q: You store the x, y, and z coordinates of Planets in a galaxy simulator in an array declared like…
A: There is x,y and z coordinates stored for each Planet. The array Planets declared to store…
Q: Write a program which does the following (name=xxx_and_xxx_lab2):1) Create a 2 dim array containing…
A: Description:The following program is to print the two dimensional array with the given information…
Q: Given an int variable k, an int array incompletes that has been declared and initialized, an int…
A: Source Code: //NOC.java import java.util.Scanner; public class NOC { public static void…
Q: Write a program that uses a 2-D array to store the highest and lowest temperatures for each month of…
A: The answer is given below:-
Q: The local Driver’s License Office has asked you to write a program that grades the written portion…
A: Given data, The local Driver’s License Office has asked you to write a program that grades the…
Q: Write a program named ArrayDemo that stores an array of 10 integers. (Note that the array is created…
A: 1. declare variable option, start, end; 2. run infinite while loop 1. prompt the user 2. get…
Q: Make an application that displays a series of at least five student ID numbers (that you have stored…
A: Actually, java is a object oriented programing. It is a platform independent.
Q: 2. write two method called findIndex and findLastlndex that search for a number in an array. they…
A: Note:- solved first question. Please repost second question . Logic:- use loop from 0 to lastIndex…
Q: The function below takes an array of User objects and returns the User object that has taken the…
A: Solution: Given,
Q: Write a Java program named Findletter that asks the user to enter 10 letters and store them in an…
A: The required Java code is given below: import java.util.Scanner;public class Findletter{ public…
Q: Write an application that displays a series of at least five student ID numbers (that you have…
A: Lets discuss the solution in the next steps
Q: Write a class AnalyzeNumbers which asks the user to enter the number of inputs and stores them in an…
A: Based on the input num, an array of specified size is allocated and then inputted from user
Q: Write a program called GradesAverage, which prompts user for the number of students, reads it from…
A: CODE:- //PROGRAM NAME = GradesAverage#include<iostream>using namespace std;int main(){int…
Q: Write a program that repeatedly prompts the user to entera capital for a state. Upon receiving the…
A: Program Planning Assume that 10 states and their capitals are stored in a two-dimensional array.…
Q: Write a program that will accept 5 employee names, department code, and hours worked. The program…
A: In this question, we are asked to write a java program which takes input of 5 employees and…
Q: 1. Write a method that returns an int array using user's inputs from the console window. The method…
A: Java Code :- package homework; import java.util.Arrays; import java.util.Scanner; public class HW8…
Q: Write a program that calculates the multiple body mass index (BMI) where the program read multiple…
A: As per the given question, we have to design a C program for calculating BMI for multiple inputs.…
Q: Create a program that reads the data into an array or vector. . Run the program with 3 grades per…
A: Program: #include<iostream> #include<iomanip> #include<string> using namespace…
Q: Write a short program that prompts the user and reads in integers into an array called Table. When…
A: C++ used to answer this question
Q: This program ask the user to enter the scores of theory and practical tests which are stored as…
A: Solution Programming Approach Importing necessary package Declare a class Declare variable for…
Q: Write a console application with several functions that deal with a two-dimensional array of…
A: As the language is not specified answer written in c++ rand() function helps to generate random…
Q: Write a program called GradesAverage, which prompts user for the number of students, reads it from…
A: Required: Using INTELLIJ IDEA COMMUNITY.
Q: Write a program that calls a method that takes a character array as a parameter (you can initialize…
A: Program code: //define class CountVowelspublic class CountVowels{ //define a method to count the…
Q: • Write a program that has two overloaded functions that return the average of an array with the…
A: Function overloading is a feature of object-oriented programming where two or more functions can…
Q: public int binarySearch(int[]array, int num) { int low = 0; //low range int high = array.length -1;…
A: Compare num with the mid element. If num matches with middle element, we return the mid location.…
Q: Given the following variable declaration: int* newDimensions; Which assignment statement will…
A: Given variable - int* newDimensions;
Q: Your task is to create a function that simulates a vending machine. Given an amount of money (in…
A: function vendingMachine(products, money, number) { let coins = [500,200,100,50,20,10], result =…
Q: Using the two arrays shown below,write a program that prompts the user to enter an integer between 1…
A: PROGRAM STRUCTURE: Import the Scanner class to use the Scanner function to take the input from…
Q: Given an int variable k, an int array incompletes that has been declared and initialized, an int…
A: You are running the 'for' loop from k=0 to k='numberOfIncompletes' but it is mentioned that…
Q: Write an application that prompts the user to enter nine integers and then store those nine integers…
A: As given, we need to write a Java program that prompts the user to enter nine integers and then…
Q: Given an array of wine objects, write a function that returns the name of the wine he will buy for…
A: According to the information given:- We have to follow the instruction in order to get the desired…
USING INTELLIJ IDEA COMMUNITY JAVA
// with comments
Thank you.
Step by step
Solved in 3 steps with 1 images
- Write a java program called GradesAverage, which prompts user for the number of students, reads it from the keyboard, and saves it in an int variable called numStudents. It then prompts user for the grades of each of the students and saves them in an int array called grades. Your program shall check that the grade is between 0 and 100. A sample session is as follow: Enter the number of students: 3 Enter the grade for student 1: 55 Enter the grade for student 2: 108 Invalid grade, try again... Enter the grade for student 2: 56 Enter the grade for student 3: 57 The average is 56.0Write a class AnalyzeNumbers which asks the user to enter the number of inputs andstores them in an Array, then prints the Array that was inputted, calculates the sum ofthe numbers entered and prints the total numbers greater than the first inputtednumber: Two Sample RunsEnter the number of items: 5Enter the numbers: 3.4 5 6 7.1 9You inputted: 3.4 5.0 6.0 7.1 9.0Sum is: 30.5Number of elements greater than the first element: 4 Enter the number of items: 3Enter the numbers: 6.7 1.5 3.2You inputted: 6.7 1.5 3.2Sum is: 11.4Number of elements greater than the first element: 0Write a program called Words that: prints your name followed by three asterisks; reads the words in a text file into a String array, where each array entry contains a word; prints the number of words in the file; counts and prints the number of five-letter words; prints all of the five-letter words starting with a vowel (that is, 'a', 'e', 'i', 'o', or 'u'); finds and prints the alphabetically first five-letter word and the alphabetically last five-letter word. it was the best of times it was the worst of timesit was the age of wisdom it was the age of foolishnessit was the epoch of belief it was the epoch of incredulityit was the season of light it was the season of darknessit was the spring of hope it was the winter of despairwe had everything before us we had nothing before uswe were all going direct to heaven we were all going directthe other wayin short the period was so far like the presentperiod that some of its noisiest authorities insisted on itsbeing received for good or…
- Write a class called analyze numbers which asks the user to enter the number of inputs and stores them in an array, then prints the array that was inputted, calculates the sum of the numbers entered and prints the total numbers greater Than the first inputted number. Refer to the pic and show your code and console.Write a class called AnalyzeNumbers which asks the user to enter the number of inputs and stores them in array, then prints the total numbers greater than the first inputted number: please show your code and console. Also refer to the pic.Write a program that prompts the user for an integer, then asks user to enter that many integer value. Store these values in an integer array and print the array. Reverse the array elements so that first element become the last element, the second element become the second to last element, and so on, with the old last element now first. Do not just reverse the order in which they are printed; actually, change the way they are stored in the array. Try not to create a second array; just rearrange the elements within the array you have. (Hints; Swap elements that need to change place.) When the elements have been reversed, Print the array again.
- Write 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".Write a java program that:1. Prompts the user to enter an integer representing the size of an array of integers2. Fills the array with integers from the user3. Creates an array of integers to hold the differences between two consecutive elements, fills it accordingly and displays itExample: In the below sample run, the array is of size 7 and is filled using values entered by the user with the below integers. The array of differences contains -10 which is (22 – 32), 2 which is (32 – 30), -18 which is (30 – 48) and so forth.Sample Run:Enter the size of the array: 7Enter 7 integers: 22 32 30 48 54 26 21Differences: -10 2 -18 -6 28 5Write a program that accepts two integer values, called "arraySize" and "multiplier", as user input. Create an array of integers with arraySize elements. Set each array element to the value i*multiplier, where i is the element's index. Next create two functions, called PrintForward() and PrintBackward(), that each accept two parameters: (a) the array to print, (b) the size of the array. The PrintForward() function should print each integer in the array, beginning with index 0. The PrintBackward() function should print the array in reverse order, beginning with the last element in the array and concluding with the element at index 0. As output, print the array once forward and once backward.
- Write a program called FiveLetterWords that: prints your name followed by three asterisks; reads the words in a text file into a String array, where each array entry contains a word; prints the number of words in the file; counts and prints the number of five-letter words; prints all of the five-letter words starting with a vowel (that is, 'a', 'e', 'i', 'o', or 'u'); finds and prints the alphabetically first five-letter word and the alphabetically last five-letter word. tale.txt file content : it was the best of times it was the worst of timesit was the age of wisdom it was the age of foolishnessit was the epoch of belief it was the epoch of incredulityit was the season of light it was the season of darknessit was the spring of hope it was the winter of despairWrite a program which allow user to enter a number that represents repetition. Then, the userwill need to enter any random decimal number based on the number of repetition. The numbersshould be stored in a single dimensional array. Lastly, the program will display the averageof these numbers and count how many numbers that above the average.Write a Java program to generate random integer values between 5 and 20 to fill a single dimensional integer array of size 10. Pass the array to a method named computeArray that returns an array. In this method, if a number is odd then multiply it by 5 and if it is even then divide it 3 and place them in another array. Display the two arrays and their total by invoking a method named displayArray. Here is a sample run of this program (with an array of 4 elements): The generated array 12 17 4 20 The output X Y 12 4 17 85 4 1 20 6 ___ ___ Total=53 96