Anda di halaman 1dari 2

UNIT-1

Assignment-1
Java Programming (CST-254)
1: Modify the Java code in exercise 1 to sort the array in descending order.

2: By using the sequential search algorithm, write a Java program to search for an element
of an integer array of 10 elements.

3: Modify the Java code in exercise 1 to search for an element of the array by using binary
search algorithm.

4: Write a Java program to answer about the statistical information such as arithmetic
mean, median, mode, and standard deviation of an integer data set. The data points are
input by the user from keyboard. This program will display the output similar to the one
shown below:

5: Write a Java program to display an integer data set in the form of stem and leaf. The
data points are input by the user from keyboard. This program will display the output
similar to the one shown below:
6. Write a Java program that accepts two integers from the user and then prints the sum,
the difference, the product, the average, the distance (the difference between integer), the
maximum (the larger of the two integers), the minimum (smaller of the two integers).

Anda mungkin juga menyukai