Define java programming with commented code

Assignment Help Computer Engineering
Reference no: EM13141802

Java Programming with Commented Code
A marketing research company has hired you to develop a program. Analytics Nation, Inc. has gathered information from about five different products. They would like to follow up with 1% of these households. Analytics Nation requires a third party to select 1% of the households for one of the products. Choices must be random.

Analytics Nation needs you to develop a program that uses a random number generator to identify 1% of the households for one product. Each household is mapped to a unique number ranging from 1 to the number of households as listed below. Choose one product from the following:

Product 1 (mounth wash)
3,765 households

Product 2 (dental floss)
3,800 households

Product 3 (grass seed)
2,400 households

Product 4 (grass fertilizer)
4,012 households

Product 5 (Blue-Ray DVD unit)
3,580 households

Requirements:

Develop a program to select the households for follow up. The user will be prompted for their selection. The code will randomly select 1% of the households for one of the five products using the random method. Your code would generate numbers for 1% of the available household population. For example, there are 2,400 households on record for product 3. The households are individually numbered from 1 to 2,400. You need to generate 24 random numbers between 1-2,400. A table containing these numbers should be produced and printed to the screen. The table must not contain duplicates. Print 7 numbers per row.

You need to use at least one repetition statement, at least one array and the random method in this code. For generating random numbers you should use the random() static method of class Math. It returns a double so you will need to cast it as an integer. If you chose product three you would set the generator range to 2,400 and generate random numbers for 1% (24) of the households. These numbers should range between 1 and 2,400:

number = (int) ( range * Math.random() ) + 1;

Reference no: EM13141802

Questions Cloud

Explain the general formation, shape : Explain the general formation, shape, and structure of shield volcanoes, composite volcanoes and lava domes.
Find probability all four tires will last at least miles : Tire will last 50000 miles before it comes bald or fails. adjustment is made on any tire that doesn't last 50000. purchase four tires. what is the probability all four tires will last at least 50000 miles.
Challenging student issues : What would be institutions most challenging student issues in the next several years? Please support your answer
What is the pressure in a 17.1 l cylinder : What is the pressure in a 17.1 L cylinder filled with 47.9 g of oxygen gas at a temperature of 341 K?
Define java programming with commented code : Java Programming with Commented Code, A marketing research company has hired you to develop a program. Analytics Nation, Inc. has gathered information from about five different products
Use of antibiotics livestock is contributing to development : Deadly "super bacteria" are the outcome of decades of antibiotic overuse. The same antibiotics used to treat bacterial infection in people also help sick animals.
What is the sampling distribution of the mean : With a mean of 1.30 inches and standard deviation of 0.04 inch. If you select a random sample of 16 Ping-pong balls, what is the sampling distribution of the mean?
What are the benefits of using preventive antibiotics : What are the benefits of using preventive antibiotics? Should the animal husbandry practice of repeated dosing of healthy animals with antibiotics stop?
Demographic difference : What are some things that you have noticed your institution is doing to overcome this demographic difference? Please support your answer.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Show the accurate statement

Find out the error(s) in each of the following program segments. Show the corrected statement.

  Discuss the simplicity of the dtd compared xml schema

Discuss the simplicity of the DTD compared to that of XML Schema. Has trade-off gone too far towards complexity in trying to overcome the limitations of the DTD.

  Write down a program that, given the amount of a purchase

note down a program that, given the amount of a purchase and the amount received in payment, computes the change in dollars, half-dollars, quarters, dimes, nickles, and pennies.

  Plan a network diagram for the tasks

imagine you have a project with seven activities Labeled A-G, as shown below. Derive the earliest completion time (or early finish time - EF), the latest completion time (or late finish - LF) and slack for each of the following tasks (begin at tim..

  How might you improve your performance in the case

After a computer forensics investigation, you need to meet with your department or group of fellow investigators and critique the case in an effort to improve your work. define how to make a self-evaluation of your work by answering.

  Get the cylinder class from the base circle class

Get the cylinder class from the base circle class

  Execute a class person with two fields name and age

Execute a class Person with two fields name and age.

  Comprise an explanation of functions and grouping

define the key concepts that are involved in summarizing data in a query. Include an explanation of functions and grouping. Please provide some examples to illustrate your points.

  Multi-dimensional arrays can cost a lot of memory

Multi-dimensional arrays may cost a lot of memory. How much memory (how many bytes) does it take to create an integer array of 3 dimensions, with each dimension having 1000 elements (i.e. int myHugeArrays[1000] [1000] [1000]).

  Find out the correct solution

if the percentage of the correct answers is 75% of the 10 questions, then it would take us to the next level from 7 to 9. it continues to next level from 10 to 60 and thne next level from 70 to 90.

  Creating a new domain tree root checkbox

In case, I select the “Create a new domain tree root checkbox” in place of the “Create a new child domain checkbox”, how would configuration of the forest be different?

  What circumstances will you use flash over an html editor

Flash is a popular tool to enhance site interactivity. I require recommendations for how to integrate Flash into a website effectively. Under what circumstances would you use Flash over an HTML editor?

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