Reference no: EM132210493
Write a program that prompts a user to enter data for an array. The user should be able to input ANY primitive data type (int, float, double, long). The program should also have the following methods:
getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array.
GetAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array.
GetHighest. This method should accept a one-dimensional array as its argument and return the highest of the values in the array.
GetLowest. This method should accept a one-dimensional array as its argument and return the lowest of the values in the array.
Example input and output
Enter Data Type: INT (Enter -999 to stop)
Enter Integers: (Enter -999 to stop) 2
Enter Integer: 3
Enter Integer: 4
Enter Integer: 5
Enter Integer: -999
Processing the int array.
Total : 14
Average : 4
Highest value : 5
Lowest value : 2
Enter Data Type: DOUBLE (Enter -999 to stop)
Enter Double: (Enter -999 to stop) 2.5
Enter Double: 2.4
Enter Double: 2.3
Enter Double: 2.2
Enter Double: -999
Processing the Double array.
Total : 9.4
Average : 2.35
Highest value : 2.5
Lowest value : 2.2
Describe how that change will affect the numerator
: For each of those ways, describe how that change will affect the numerator and the denominator of formula used to compute the risk adjusted return on capital
|
Perform multiple die rolls using a random number generator
: Write a program that performs multiple die rolls using a random number generator.
|
Write a program to process this student data
: Write a program to process this student data. First, input these records into a record structure.
|
Discuss what you feel are minimum top three elements of art
: Choose a photograph from the Professional Artist's website given below. Describe the photo and discuss what you feel are minimum top three elements of art.
|
Prompt a user to enter data for an array
: getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array.
|
Prepare consolidation worksheet entries for december
: What is the consolidated balance for the Equipment account as of December 31, 2012 - Prepare consolidation worksheet entries for December 31, 2011, and December
|
Determine the number and type of variables
: Write a program that prompts the user to enter a decimal number and then outputs this number rounded to two decimal places.
|
Write about two artworks from the periods
: For this essay, write about two artworks from the periods we read about in Unit VII: Renaissance, Baroque, Impressionist, or Post-Impressionist periods.
|
Write a program to play the pig game against the computer
: Write a program to play the pig game against the computer. At each turn, the current player will roll a pair of dice and accumulates points.
|