Create a method to find smallest mark and print its value


Assignment: Business Computer Languages

Question One

Write a complete Java program (code + screenshot of output)that performs the following:

Given the following marks of a student: 84, 72, 91, 61, 69, 77

• Create an array (marksArray) to include allofstudent marks.
• Create a method (smallest) to find the smallest mark and print its value.
• Create a method (average) to compute the average of a student marks and return its value to the caller.
• Create a new array (backup) to copy all marks of the current array (marksArray).(Hint: use Arrays.copyOf method)

Question Two

Write a completeJava program (code + screenshot of output)that performs the following:

• Create an array list and add the following items: [Toyota, Nissan, Mercedes, Mazda].
• Print out the existing items of the array list on the screen.
• Replace the item "Mercedes" with "Kia", and remove the item "Mazda".
• Print out the current array list items in the opposite order.

Question Three

Write a completeJava program (code + screenshot of output)that performs the following:

• Write a while loop that reads integer values entered byuser.
• Stop when a user enters any non-integer value.
• Compute the sum of all entered values that are greater than Zero and print the result on the screen.

Question Four

Each of the following Java code contains one or more errors. Find the error(s) and modify the code so that it will work properly.

#

Original Code

Correct Code

1.

int[] values= values [10];
for (int i = 0; i <= 10; i++)
{
values[i] = i * i;
}

2.

int count= -10;
while (count<0)
{
System.out.println(count);
}

3.

for (double i : values){
Sum = sum + values [i];
   i++;
}

4.

int fractions[] = [2.8, 5.5, 4.6];

5.

ArrayList arr = new ArrayList();
arr.add(5);
System.out.println(arr.length);

6.

for (int i = 0; i {
System.out.println(values);
}

Format your assignment according to the following formatting requirements:

1. The answer should be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides.

2. The response also includes a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.

3. Also include a reference page. The Citations and references should follow APA format. The reference page is not included in the required page length.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Create a method to find smallest mark and print its value
Reference No:- TGS02981393

Expected delivery within 24 Hours