Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CIS 2212 Java Software Development I Course Score using Parallel Arrays Lab 03 Due by Tuesday, June 5, 2018 at 5:00 pm In Lab 01,

CIS 2212 Java Software Development I Course Score using Parallel Arrays Lab 03 Due by Tuesday, June 5, 2018 at 5:00 pm

In Lab 01, you prompted the user for earned scores & max scores for assignments, calculated the totals, and then determined the appropriate letter grade. This weeks lab project will be similar, but well use loops to validate, use methods, and use parallel arrays for a number of assignments to be determined by the user.

Create the following methods using these EXACT method headers:

? public static double[] ptsEarned(int numAssignments) use a loop to get user input needed to populate the array with earned points. Be sure to validate that no negative numbers are entered. Students can earn 0 if they do not submit an assignment. Return the populated array.

? public static double[] ptsMax(int numAssignments) use a loop to get user input needed to populate the array with the maximum points possible. Be sure to validate that no negative numbers or zero are entered. Assignments must be worth at least 1 point. Return the populated array.

? public static double calcTotalPts(double[] ptsArray) use a loop to sum the points to get the total number of points. Return the total number of points. This method will be called to sum the points earned and to sum the maximum points possible.

? public static void displayArray(double[] earnedArray, double[] maxArray) use a loop to display the points. This method will be called to display points earned and maximum points possible.

? public static char ltrGrade(double courseScore) as you did in Lab 01, you will determine the letter grade earned which is dependent on course score as a percentage (total earned divided by total possible). Use data type char to return the character of the letter grade. In the main method, prompt the user for how many assignments will be included. Validate that the user enters scores for at least 1 assignment. Call the ptsEarned method & the ptsMax method & pass the value for the number of assignments to be included. Perform any calculations necessary to display the data as follows:

? Display points earned & max points for each assignment in 2 columns as shown in sample output below. Format both to 2 decimal places.

? Display total points earned and total points possible. Format both to 2 decimal places.

? Display the course score as a percentage (total earned divided by total possible). Format to 2 decimal places and be sure the percent sign is included. ? Display the letter grade associated with the course score. 90 to 100% is an A, 80 to < 90% is a B, etc. Before starting this lab, be sure to refer to the How to Submit Assignments document in eLearn for proper documentation, indention, naming conventions, etc. Points may be deducted if submitted incorrectly. Required project name: LastnameFirstname_03 Recommended package name: arrays Recommended class name: CourseScoreArray See sample output below. Here is a sample run of the program. Your program should display something similar. Keep in mind that line breaks are important for easy readability.

User input is green text. How many assignments (at least 1): -2

How many assignments (at least 1): -1

How many assignments (at least 1): 0

How many assignments (at least 1): 3

Earned pts for Assignment #1: 85

Maximum pts for Assignment #1: 100

Earned pts for Assignment #2: 75

Maximum pts for Assignment #2: 100

Earned pts for Assignment #3: 8

Maximum pts for Assignment #3: 10

Earned Max

85.00 100.00

75.00 100.00

8.00 10.00

Total Points Earned: 168.00

Total Points Possible: 210.00 Course

Score: 80.00%

Letter Grade: B

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions