Question: Write a static method called getGPAs that takes no arguments, prompts the user, repeatedly gets GPAs until 0.0 is entered, prints the GPAs, and returns

Write a static method called getGPAs that takes no arguments, prompts the user, repeatedly gets GPAs until 0.0 is entered, prints the GPAs, and returns an array of doubles. If the GPA is < 0 or > 4.0 discard it. Assume at least one and at most 25 valid GPAs are provided. Write this as one method with comments, no class, and do not write any unnecessary code. Re-read the problem before submitting to check you've met each requirement. The user interaction should look like this including all punctuation. The second line is user input and only sample numbers, not the exact numbers or count of numbers. You may not use any of the Arrays class methods such as Arrays.toString. You must write the code manually using only primitive arrays. Please enter GPAs terminated by 0.0 3.5 2.1 4.5 3.0 -1.5 0.0 Your GPAs are [3.5, 2.1, 3.0]

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!