Question: Language: Java Functional requirements: Your program should behave as discussed in class. Input items (whole and/or floating point numbers) can be spread over one or
Language: Java
Functional requirements:
Your program should behave as discussed in class. Input items (whole and/or floating point numbers) can be spread over one or more lines. If there is at least one input item, the program prints the resulting average and exits. If there is no valid numerical input item, the program prints nothing and exits.
Reflection:
What specific changes do you need to make to enable automatic testing for your code? At least how many test cases should you have, and which ones (a high-level description is sufficient).
Grading Scale:
- 2 submission exists
- 0.5 correct average calculation for one or more inputs
- 0.5 empty output (rather than NaN or error) for empty input
- 0.5 detect EOF (rather than specific sentinel value) following Scanner-based idiom
- 0.5 input can have zero or more double values on each line
- 0.5 good coding style (indentation, use of final everywhere except when a variable has to be updated one or more times)
- 0.5 meaningful reflection (three or more sentences) preferably in readme file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
