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

  Sorting routine adopted in the java api for arrays.sort()?

What is the sorting routine adopted in the Java API for Arrays.sort()? How different is it from the sorting routine we discussed in class? Is it better? Explain your answers in short clear sentences.

  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

  Create java program to find number of days left in that year

Create a Java program called "DaysLeftInYear.java" that outputs the number of days left in that year. use the calendar class to represent dates. Use the DateFormat class to display the current date in the output.

  One search function

One search function will use a sentinel to mark the end of the array. The other search function will use an array length (maximum legal index into the array) to determine when to exit the search loop. Both functions must return true when the searc..

  Identify the first character of the name and lengthof length

Write a Java application that stores the names of your family and friends in a one-dimensional array of Strings. The program should show all names in upper case and lower case, identify the first character of the name, and the lengths of the names.

  Determine the visual resolution of resulting image

Drawing in 8.5 by 11 inch sheet is digitized by means of 300 dpi (dots per inch) scanner. Determine the visual resolution of resulting image (number of dots in each dimension)?

  A client or server prepare to use udp in a java application

How does a client or server prepare to use UDP in a Java application? Are there any differences in what the client does and what the server does?

  Write prolog clauses to express therelationships

Write prolog clauses to express the following relationships, given the parent relationship: grand-parent, sibling, cousin.

  How to count number of objects (instances) created

How to count number of objects (instances) Created, use java code and please be descriptive

  Write a java loop

write a java loop ( of your choice ) that produces exactly the following output to the screen: 2-4-6-8-

  Data structures and algorithms

Code analysis and programming.

  Write a java program to compute salary

Write a Java program which computes the Salary for a given number of employees. The program prompts user to enter n the number of employees.

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