Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this project is to reinforce the topics for OOP covered in class. Project Requirements 1. You will modify your Java Class called

The purpose of this project is to reinforce the topics for OOP covered in class.

Project Requirements

1. You will modify your Java Class called Sphere from project 1. Specifically, any attempt to create or set the radius to a negative value should throw an IllegalArgumentException

You must include a main method with appropriate test(s). Remember what an appropriate level of testing includes.

Your Sphere must also include javadoc comments and tags for the class, and all methods and constructors.

2. You will create a new class called Project2. Project2 class will have a main method that reads a single command-line argument: the name of a file to open and process. To process this file, you will read it line-by-line and create a running Total of the double values contained in the file. When your main finishes, it should print the total number of lines, the number of lines skipped (because they were invalid or did not contain a single double value on them), the minimum value read and the largest value read. There will be boundary conditions and exceptions that your main method will need to detect and handle properly.

Valid lines in a file only contain a number that is a double. If a line is blank, it should be skipped. If a line has any alpha or non-numeric characters, it should be skipped. No line will have more than one number on it.

Finally, you should create a documentation.txt file. Please have the file include you name, your n# and describe how you implemented the Sphere object. What challenges did you have? How did you go about testing? What work and what does not work?

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

Students also viewed these Databases questions

Question

2. How do rituals and routines express organizational values?

Answered: 1 week ago

Question

=+2 Why are so many countries bothered by their brain drains?

Answered: 1 week ago