Define a 1-d array named people types that can store a


Define a 1-D array named people Types that can store a maximum of 50 integer values that will be entered at the keyboard. enter a series of 1's, 2's, 3's, and 4's into the array, where one represents an infant, a 2 represents a child, a 3 represents a teenager, and a 4 represents an adult that was present. Any other integer value should not be accepted as a valid input, and data entry should stop when a negative value has been entered.

Your java program should count the number of each 1,2,3, and 4 in the array and output a list of how many infants, children, teenagers, and adults there were.

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Define a 1-d array named people types that can store a
Reference No:- TGS0646957

Expected delivery within 24 Hours