I need help with a Token-Based file processing homework

Nov 17th, 2015
Price: $5 USD

Question description

Write a static method named evenNumbers that accepts a string of text as a parameter.  Assume that the text is a series of integers, and process this text and report various statistics about the integers.  Report the total number of numbers, the sum of the numbers, the total count of even numbers and the percent of even numbers.  For example, if the string is the following:

"5 7 2 8 9 10 12 98 7 14 20 22"

Your method should produce the following output.

Total numbers  = 12

Sum of numbers = 214

Total evens  = 8

Percent evens  = 66.66666666666667

This is the first question on my homework assignment and the rest that follow are similar,  I am not seeking a solution to the question, I am seeking to better understand how to accomplish this step by step so that I can accomplish the rest of my assignment. 


Tutor Answer

(Top Tutor) tanezavm
School: Cornell University

Studypool has helped 1,244,100 students

Review from student
" Top quality work from this guy! I'll be back! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1825 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors