I need help with a Token-Based file processing homework

Nov 17th, 2015
DreamIt
Category:
Computer Science
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. 

Thanks

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: University of Virginia
PREMIUM TUTOR

Studypool has helped 1,244,100 students

5 Reviews


Summary
Quality
Communication
On Time
Value
ashleyisgod
Nov 25th, 2016
" Top quality work from this guy! I'll be back! "
Molly_Moon
Nov 2nd, 2016
" AMAZING as always! "
Hemapathy
Oct 11th, 2016
" all I can say is wow very fast work, great work thanks "
BlueOcean
Sep 27th, 2016
" Awesome! Exactly what I wanted. "
kevin12622
Sep 18th, 2016
" Goes above and beyond expectations ! "
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