Array named peopletypes that can store a maximum

Assignment Help JAVA Programming
Reference no: EM13165838

Define a 1-D array named peopleTypes 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 a 1 represents an infant, a 2 represents a child, a 3 represents a teenager, and a 4 represents an adult that was present at a college fair. Any other integer value should not be accepted as 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 were at the college fair.

Reference no: EM13165838

Questions Cloud

Script that creates and calls a function named : Write a script that creates and calls a function named fnDiscountPrice that calculates the discount price of an item in the OrderItems table (discount amount subtracted from item price). To do that, this function should accept one parameter for th..
Create a bar chart showing the average monthly mean temperat : Write a ++ program to create a bar chart showing the average monthly mean temperature for College Station from 2004 to 2013. The point of the exercise is to compute the sie and location of the rectangles rather than explicitely hardcode that informat..
Write a method called range that returns the range of value : Write a method called 'range' that returns the range of values in an array of integers. The range is defined as 1 more than the difference between the maximum and minimum values in the array. For example, if an array called list contains the value..
Draw a two-dimensional house seen from the front : Draw a two-dimensional house seen from the front, the way a child would: with a door, two windows, and a roof with a chimney. Feel free to add details; mabe have "smoke" come out of the chimney.
Array named peopletypes that can store a maximum : Define a 1-D array named peopleTypes 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 a 1 represents an infant, a 2 represents a child, a 3 represents..
A fuel economy study was carried out : A Fuel economy study was carried out for five models of cars. each car was driven 100 miles, and then the model of the car and the number of gallons used were placed in a line of the file Mileage.txt. Table 7.22 shows the data for the entries of t..
Make the circles have a thickness of 5 pixels, : Make the circles have a thickness of 5 pixels, except for the circle that didn't open at Sochi; make that one a solid disk.
Script that creates and calls a function : Write a script that creates and calls a function named fnItemTotal that calculates the total amount of an item in the OrderItems table (discount price multiplied by quantity)
Accepts filename to sort and run : Accepts filename to sort and run size as command line arguments. Calls the sort routine. Writes the sorted result to a file named sorted.txt.

Reviews

Write a Review

 

JAVA Programming Questions & Answers

  A program that reads a four-digit number from the keyboard

Write a program that reads a four-digit number from the keyboard as a string and then converts it into decimal. For example, if the input is 1100, the output should be 12. Hint: Break the string into characters and then convert each character to a va..

  Design and implement a small and simple email server

Design and implement a small and simple email server

  Write a jsf application that reports the values

Write a JSF application that reports the values of the following system properties of the web server

  Using an array in java

Using an array in Java - have a list of keywords from a web service and have to print out the list of keywords on the screen with one keyword on each line. This is my code

  Compute the temperature in centigrade

Compute the temperature in Centigrade - Display the temperatures in both Centrigrade and Fahrenheit with appropriate labels, using the + operator to concatenate the labels with the variables

  Create application uses two-dimensional arrays

Create an application which uses 2-dimensional arrays to keep track of 5 students' grades, with each student having 3 different classes.

  Own file to test your program

Create your own file to test your program. Your job is to set up the input and output files to have the program read from a file and write to a file. Here is a basic program that will accomplish what is desired

  Java application to permit user to enter ten numbers

Write down Java application which permits a user to enter 10 numbers (double precision) into the array and then sorts and displays numbers from lowest to highest.

  Algorithm analysis with advanced data structures

Write a program to help the merchants devise a sequence of transmutations that would change silver into gold with the smallest possible total fee paid to the alchemists.

  Java servlet uses doget to return markup document

Write down Java servlet which uses doGet to return markup document which provides your name, e-mail address, and mailing address along with a brief autobiography.

  Implement/update specific methods for the dfs of a graph

show the DFS order of vertices in the graph, and for each node, specify its parent node in the search (the node from which the currect node was reached). Moreover, display for each node the discovery and finishing time, to check that the Parenthesis ..

  Consider an array of integers

Consider an array of integers as below: int[] a = {5, 2, -4, 3, 0, -5, 7, 11, 6, 13} Complete the method named count(int[] a) in the class Count. The method should return the number of positive numbers in the array

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