Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSC 162 - Lab 6 (4 programs)_exceptions From the Gaddis (6th ed.) textbook 1, P. 757 #1 Create a TestScoresDemo class. o Create a double

image text in transcribed
CSC 162 - Lab 6 (4 programs)_exceptions From the Gaddis (6th ed.) textbook 1, P. 757 #1 Create a TestScoresDemo class. o Create a double 1-D array called badScores with the following test scores: 97.5, 66.7, 88.0, 101.0, 99.0 Create another array called goodScores with the following scores: 97.5, 66.7, 88.0, 100.0, 99.0 o Create a TestScores object initialized with badScores. o Create a TestScores object initialized with goodScores. Output the message: "Invalid score found" ion of the element and the score that was invalid. Give the average of the good grades to 2 decimal places Create a TestScores class Include the following methods: Overloaded constructor initializes an object with an array of scores. If the array contains an invalid value, an exception is thrown. getAverage - returns the average of the object's test scores

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

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

Gay, lesbian, bisexual, and transgender issues in sport

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago