Define a 1-d array named people types

Assignment Help Basic Computer Science
Reference no: EM13308271

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.

 

Reference no: EM13308271

Questions Cloud

Compare clock cycle times and execution times : Instead of a single cycle orgization we use multicycle organization where each instruction takes multiple cucles but only one instruction finishes before another is fetched. in this organization.
What is the fundamental frequency of the air column : One of the harmonics of a column of air open at one end and closed at the other has a frequency of 448 Hz, What is the fundamental frequency of the air column
List the set of all possible combinations of vehicles : The traffic that makes a left turnat an intersection consists of two types of vehicles, Type A andB. A type A vehicle is twice the length of the type B. THe left turn lane can accommodate ten vehicles of type B, five oftype A.
How many hits does the sequence exhibit : Assume LRU replacement policy, for each sequence, how many hits does the sequence exhibit?
Define a 1-d array named people types : Define a 1-D array named people Types that can store a maximum of 50 integer values that will be entered at the keyboard.
Write a java for file processing according to rules : The file is read into memory, all of it in one buffer, and the buffer is reversed, then the file is overwritten. For simplicity, we may assume that the maximum size of the file is 200000 bytes. If no file was selected an error message is displayed..
Write a php script that computes the total cost : Write a PHP script that computes the total cost of the ordered light bulbs from above after adding 6.2 percent sales tax. The program must inform the buyer of exactly what was ordered, in a table.
Write a java method called smallestindex : write a java method called smallestIndex, which takes as its parameters a 1-d int array and its size, and returns the index variable of the smallest element in the array and the smallest element in the list. Write a java method that uses the metho..
Compute how many joules of energy does the battery lose : A 12 V battery causes a current of 0.7A through a resistor. How many joules of energy does the battery lose in a minute

Reviews

Write a Review

Basic Computer Science Questions & Answers

  How to choose optimal location of pipeline for oil field

A Consultant is to lay oil pipeline running east to west through the oil field of n wells. From each well spur pipeline is to be connected directly to main pipeline along shortest path.

  Design hardware and software driver-byte-wide data transfer

Design the hardware and software driver that will implement a byte-wide data transfer from your processor to a peripheral device.

  Write a turing machine that takes as input

Write a Turing machine that takes as input the unary representation of any two different numbers, separated by a blank, and halts with the representation of the larger of the two numbers on the tape.

  What is probability that n items hash to different locations

What is the probability that all n items hash to different locations?

  Create direct-mapped data cache for the byte offset

Create the 128KB direct-mapped data cache which uses a 32 bit address and 16 bytes per block. Compute the following: How many bits are utilized for the byte offset?

  Find all the sections associated with the course

Find the names of faculty who have taught every course that is being taught by John Nick in Spring 2010. Give an expression in Relational alegebra and domain relational calculus.

  Draw logic diagram of circuit having flip-flop equations

A sequential circuit has two D flip-flops A and B, two inputs x and y, and one output z. The flip-flop equations and circuit. Draw the logic diagram of the circuit.

  Study impact of global environmental policy

Consider how neighboring countries are affected, also emergent issues like new arctic shipping routes, or the international interest in Africa's natural resources. Study impact of global environmental policy associated with these issues.

  Create two-page written analysis for problem statement

Create a two-page written analysis based on the following specification: Problem statement, Possible outcomes if no action taken (this one is mine and the only thing i have to do) Alternative actions.

  Difference in tossing a fair coin to get half-and-half hs-ts

When we toss a fair coin, we expect that we get roughly half-and-half Hs and Ts. Of course, this might not happen in general: the question is, how bad can the difference get?

  What is the proportion of white cars driving past my house

What is the proportion of white cars driving past my house?

  What is the geometric center frequency

A band-pass filter has a lower cutoff frequency of 100 Hz and an upper cut-off frequency of 144 Hz. What is the geometric center frequency? (Points : 3) 120 Hz 130 Hz 134.5 Hz 140 Hz

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd