Question: Solve the following problem: Write a program that reads integers, one per line, and displays their sum. Also, display all the numbers read, each with

 Solve the following problem: Write a program that reads integers, one

Solve the following problem: Write a program that reads integers, one per line, and displays their sum. Also, display all the numbers read, each with an annotation giving its percentage contribution to the sum. Use a method that takes the entire array as one argument and returns the sum of the numbers in the array. (Hint: Ask the user for the number of integers to be entered, create an array of that length, and then fill the array with the integers read. A possible dialogue between the program and the user follows: How many numbers will you enter? 4 Enter 4 integers, one per line: The sum is 6. The numbers are 2, which is 33.3333% of the sum. 1, which is 16.6666% of the sum. 1, which is 16.6666% of the sum. 2, which is 33.3333% of the sum. Add 5 comment lines (comment lines start with at the very top of your program with your name, your class and section, the project number, due date, and a short description of the program Please submit the following file(s) to me on the due date. 1. Soft copy of your program. That is, submit your -java file(s) using Canvas . Class name: CountLettersInLine

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!