Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help i haven't found anyone to help get it right. This lab will be available until February 20th,11:59 PM EST Write a program that

please help i haven't found anyone to help get it right.
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
This lab will be available until February 20th,11:59 PM EST Write a program that reads in a given number of scores and stores them in an Array, finds the average of the scores, and deternines how mary seores are above or equal to the average, and how many scores are below the average. Sample tun of the program: Number af senten atiove ot equal to the dvorage: 2 Tounhers of gcores belod the avectgin: 7. in adomion to the ma in method (ast sting, you wil have A additonel foguingd methods for in total of 5 metrodu in your clase Instruetions: Aray and returna the filed anny of scares Number of moornt below that averaget? 2 In addition to the nain method (last stepl you will have 4 additional requred methods for a total of 5 methods in your elass Instruetions: 1. Write a we tbod that gets the scotes from the user that takes 2 parameters-3 Scanner cojcct and ani integer for the length ofilie Aray and returnn the filed aray of acores. - Create an array and use a for loop stivuture to prompt the user for a score and - intide the for loog use a whil e loop structure to test that the score in between 0 and 100 . If not, output the error messase reed in in new acore Sample run when user entecs -s for a score 2. Write a nethod to find the average of the scores that takes 1 parameter - the Aray of soores and returnn the average of me scores Use a tor loop structure to sum the scoces: - Remember, average is just the sum / fumber of scoces. There is an Array method that can be used to find the sze of the array (how mory values it has). 3. Write a nethod to find the number of scores above or equal to the averaga that tawes 2 parameters - the Anray of scores and thie Everage of the soores. - Use a for loop structure to count the number of scores above the averge and return that value: 4. Write a method to find the number of scores below the avenge that takes 2 paramelers - the Aray of acores and the average of the scotes. 4. Use a for loog structire to count the number of uoores beiow the average and return this vilue 5. Backin the main meihod, - create your scarnes object to read in user data (and pass to the methods) - prompt the user for the number of ocores to enter + oall the method to get the stores (Step 1) and stote the teturn array - coll the method to find the =nergge (stip 2 ) and store the return voue -. output the average, the number of scoked above or equal to the averige and the number of teotes below the aimage Sampieverun with alf possibaltins (ocore valid, score e 0 or score +100 ). Hom matly peoces ta be enceredin 5 : - create your Soanner obyect to read in user data (and pass to the method9) 6. prompt the user for the number of scores to enter 6. call the method to get the scores (Step 1) and stcre the retien array - cail the method to find the average (Step 2) and otore the return value 0. output the wernge, the number of scores above of equal to the average, and the number of soces below the average Semple run with all possibilities (bcore valid, scote * 0 ,ot score >100 ) fiem many scores to be entered?t 5 Knter a new moore: 38.7 Finter a itien feoret 103 . Ytivalid. fonter a ecote1 100 Finten a new scores 643 Finter a nex meoret 17 5rivali3. kotar a acores 77 Enter a nem secerei 34.6 thin average isy 34+1 if Munoer of seofel alweve ot equal to the sveregei 2 Wustiec of mores heton thin wverale: 1 . NOIE: 7. Wili alag check Friter a nev ocore: 64+7 Enter a new scaret 7 Invalid. Enteria score: 77 Enter a new 8coret 84+6 The Average is: 64.85 Number of scores above or equal to the average: 2 Nhamber of pooro below the average: 3 . NOTE 1. You are required to (1) comment your code according to Java standards, (2) use good variables, and (3) follow lab specificotions (to pts): 2. I wib also check for oniginality of code (ie Student similarity score) (10 pts) I Will matvually inspect your code and deviations may result in up to 20 pts deducted from your score * Remember that zytabs output will appear as one kng, rurhon sertence when tenting occurs You should spoco your pmompts recene your inqutif and ptint your outputs as modeled above. at Java.base/java. uti1. Scanner, nextint (Scanner.java:2258) at java.base/java. util. Scanner, nextint (Scanner.java:2212) at ScoreAnalyzer.getScore (ScoreAnalyzer. java:12) at ScoreAnalyzer. main (ScoreAnalyzer.java:62) Output differs. See highlights below. \begin{tabular}{l|l|} \hline & 4 \\ & 84.5 \\ 7 Input & 79.5 \\ 66.1 \\ 98 \end{tabular} Your output new scoret Enter a now:jcore: Entef a new scores the average isi 32.03 Expected output Number of ncores above ir equal to the average: 2e: Numbor of scorer helovi the avarages 2 a 2.Copy of Compare output Output differs. See highlights below. Speeial eharacter logand \begin{tabular}{l} 8 \\ \hline input \\ 65.1 \\ 79 \\ 78.9 \\ 97 \\ 80.4 \\ 63.1 \\ 52.3 \\ 92.6 \end{tabular} Your output How many soores io be cateratdi anter an new acoret Encex a new aeoret Expected output Wuther of Fecozen above or equal to the averages se 3icompare output a Number of soozes halow the avoraget t. Output differs. See highlights below. Special character legend Expected output Number ot mocres above or equat to the avoragot 3 at Number of acorell betay the averaget 2 4.Oompare outputin at- jova. bose (java uti. Scannerynext (scannes-javai2594) Output differs. See highlights below. special chancter iogend Your output ilowimany acouthi ko pe mentmindit En How maky ucores to be niteredrtign In Exgented output boubme af apgerem mhove of equali io Wintapi at ithorieg betiou the aver ate 5 Wanaal deduetion tieit fornmatiting fepartam foefarm biauthor, Miverson, variabie narring

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

Step: 3

blur-text-image

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

Advances In Databases 28th British National Conference On Databases Bncod 28 Manchester Uk July 2011 Revised Selected Papers Lncs 7051

Authors: Alvaro A.A. Fernandes ,Alasdair J.G. Gray ,Khalid Belhajjame

2011th Edition

3642245765, 978-3642245763

More Books

Students also viewed these Databases questions