JAVA代写 | ITEC-2610D Fall 2019 Assignment

ITEC-2610D Fall 2019 Assignment One In: Sep. 27th, Before Class
1. Write a program that reads an integer value and prints the sum of all even integers between 2 and the input value, inclusive. Print an error message if the input value is less than 2. Prompt accordingly.
2. Write a program that reads a string from the user and prints it one character per line.
3. Print the following patterns. Create a separate program to produce each pattern. Hint: Part b requires multiple loops, some of which print a specific number of spaces.
a.
**********
*********
********
*******
******
*****
**** *** **
*
b.
*
**
***
****
*****
******
*******
********
*********
**********
4. Write a program that reads a string from the user, then determines and prints how many of each lowercase vowels (a, e. i, o, and u) appear in the entire string. Have a separate counter for each vowel. Also count and print the number of nonvowel characters.
5. Write a program that reads an arbitrary number of integers that are in the range 0 to 50 inclusive and counts how many occurrences of each are entered. Indicate the end of the input by a value outside of the range. After all input has been processed., print all of the values (with the number of occurrences) that were entered one or more time.
6. Write a program that computes and prints the mean and standard deviation of a list of integers x1 through xn. Assume that there will be no more that 50 input values and the maximal possible value is 100. Compute both the mean and standard deviation as floating point values, using the following formulas:
n
? Xi
mean = i=1 n
??n 2 ?? ? (Xi − mean)
sd = ?i=1
n
Create a driver class, which randomly generates values that are less than or equal to the maximal value 100. Template files are given here:
1

//********************************************************************
// Statistics.java
//********************************************************************
public class Statistics
{
public static double mean(int[] numbers, int count){
//your code here.
}
public static double standardDeviation(int[] numbers, int count){
//your code here.
} }
//********************************************************************
// StatisticsDriver.java
//********************************************************************
import java.util.Random;
public class StatisticsDriver
{
private static final int MAX_COUNT = 50, MAX_VALUE = 100;
//—————————————————————–
// Demonstrates the mean and standard deviation methods.
//—————————————————————–
public static void main(String args[]){
//your code here.
}
}
2