"...Pedro,
Lets say you want 4 names and ages in the format name1
age1 name2 age2 name3 age3 name4 age4, you could pass them as arguments
into your code ... see below. This code does the folllowing:
verifies if the total number of arguments passed is 8..."
I did the homework in different way.
the homework was: "...Receive
the ages of the all your family members (between 3 to 6 members) "
I did so:
1) verify if total number of arguments passed is less than 6 so write: "Too
less name"
2) verify if total number of arguments passed is more than 12 write: "Too much
name"
3) read the data. If args is even it's OK if args is odd write error: "input
incorrect"
4) calculate age average.
May be I did not well understand what need to do in the homework, but I did so.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---