Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6.22 Lab: Programming Lab 3 This lab will be available until February 20th. 11:59 PM ESI Write a program that reads in a given number

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
6.22 Lab: Programming Lab 3 This lab will be available until February 20th. 11:59 PM ESI Write a program that reads in a given number of scores and stoees them in an Aray, finds the average of the scores, and detemires how many scores are above or equal to the avenge, and how mary scoces are below the averige Sample fun of the program: Hlow many bcores to be encered?t a Henter a nes acore: 34.5 Finter a nok acezet 79,5 xiter a new seore: 66+1 Fires a annw-seoret 98 The myerage lst 82.03 Hamber of nocres abeve of equal to the average: 2 Bu-ber of weores belox the averaget 2 In addition to the na in method (last ( atep), you wil have 4 additional requred methods for a total of 5 meithods in your ciast. Instruetions: Write a program that reads in a given number of scores and stores them in an Arroy, finds the average of the ncores, and determines how many scores are above or equal to the average, and how many scores are below the average. Sample run of the program For many nooren to be enteredz: 4 Enter a new scoret 84.5 Enter a now neeret 79.5 Enter a new nobret 66.1 Eister a bew ecoret 98 The average ist 92,03 Number of nepres above or equal to the averaget 2 Humber of acoren belon the averages 2 in addition to the main method (last ntep). you will hove 4 additional fequired methods for a fotal of 5 methods in your elasi. Instructions: 1. Write a wethod that gets the seores from the user that takes 2 parameters - a Scanner object and an integer foc the length of the Arroy and returnn the filled array of scores. - Create an array and use a for loop structure to prompt the user for a soore and - inside the for joop use a while loop structure to tent that the score is between 0 and 100 . If not, output the error mesnage reas in a new score Sampie run where user enters 6 for 8 score Haw nany acotes co be eftered?: 4 . Bhitor a new ncore: 97.5 Sarrole run whene user entert 6 for a score: How many bcores ite be enterat? it Enter =ined enores 97.5 finter a new score1 fe. 4 Eniter A nat seorel 6 Tinvaidi, Hoter a acores is Enter a liew score1 45.7 The average las. 76.40 Whaber of scores abewn of al tol the avecoget I. Kunbar of acered bolow the average 1 2. Write s method to find the average of the scores that takes 1 parameter the Aroy of scoren and returns the ayeragn of the steres - Use for fop structue to sum the acores - Remembec average is just the sum/ number of scores. There is an Aray methed that can be ured wo find the wie of the amiy. fhow mary values it has ) inerage of the scores - Ust a for ioop structure to count the fumber of ucoren above the averoge and recorn ths value A. Wite a mothod to find the fumber of ecocen below the awerege that tabes 2 parameters - the hiney of ocoirs and the overage of the scoles - Uoe a tor loop stucture to count the number of acocen bethw the average and return the value: 5. Back in the nain method. - creite your Searmer object to read in uleer data (ard pass to the inethoce) 4. prompt the user for the number of scores to enter. 5. fack in ehe ain method: * eull the method to find the aneroge (tiep 2) ind steet ti intemvatu Sencip ram w th al pocsabil hes (soore vald soort 40 or eoore s 100 ). Furbet of siatet acove or aquat th the uyerapes:- niunber of sedifer belden the averaquilf Nivere pte) 2. I wit alsa check for origingity of code (ie. Suudent sirvilanty socore) (10 pts ) - Remember that zylabs putpit wil appes as obie lone num on sentence when testing owsus you stenis sgace your promptivecevh your. inputh, and prirt your outpute as modeled aboye. \begin{tabular}{l|l} ue \\ atfivir. \end{tabular} fesinisedatin frs Scorehnalyzer jara Letoriaitingeda 1. imert jevaiutil,"; yine - To doz Closs cement - Ainutian t evierition Ff 8. public rlass ScoreAnalyzer I. ScoreAnatyzerjava inport jova, util: *; - To .00r class coment - Eauthor - mersiar (5) % 5. nublic eless ScoreAnatyzer f * esiaren args not used. public static void eain(String[] args) (. Scanner in = new Sconner(System, in)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

The concept of flow and its characteristics.

Answered: 1 week ago