Answer:
static int [] bubbleSort(int[] arr) {
int n = arr.length;
int temp = 0;
for(int i=0; i < n; i++){
for(int j=1; j < (n-i); j++){
if(arr[j-1] > arr[j]){
temp = arr[j-1];
arr[j-1] = arr[j];
arr[j] = temp;
}
}
}
return arr;
}
Explanation:
Above function is written in java language in which it takes integer array then sorts it using bubble sort and return back the array. The function has return type int[] which is necessary for returning array of type integer. The variable n contains the size of array which is calculated through array's length method which is built in. Above function sorts array in descending order if you want to sort it in ascending order just change the condition of in if branch from <em>"</em><em>if(</em><em>arr[j-1] > arr[j]</em><em>)</em><em>"</em> to <em>"</em><em>if(</em><em>arr[j-1] < arr[j]</em><em>)</em><em>"</em> means replace > sign with < sign .
With range names you are able to tell the program how to solve complex mathematical problems.
Answer:
The answer is below
Explanation:
Usability is a term that describes the assessment of the performance of a system in assisting the task of the user, or how effective a certain product system or design supports the task of a user in accomplishing a set out objective as desired.
The characteristics of an interface that are used to assess a system’s usability are:
1. Effectiveness
2. Efficiency
3. Error Tolerance
4. Engagement
5. Ease of Learning and Navigation