subject

Create a program that prompts the user to enter 5 employee names and their salaries for the week. Sort the arrays is descending order according to salary. Use a for loop in the main method to call the necessary methods for input. You will use 2 different arrays, one for the employee name and one for the employee salary. Use static methods for the following:
EmployeeName()
Employee Salary()
SelectionSort()
Output()

Add a binarySearch() static method.

I need some help with correcting this program:

//Vanessa Fantini
import java. util. Scanner;
import java. util. Arrays;

public class PaycheckArray {

public static void main(String[] args) {
String[] name = new String[4];
int[] sal = new int[4];
Scanner scan = new Scanner(System. in);
int[] EmployeeSalary;
int[] EmployeeName;
int[] SelectionSort;

SelectionSort = SelectionSort(sal);
EmployeeSalary = EmployeeSalary(sal);
EmployeeName = EmployeeName(name);
Output(sal, name);

}

public static int[] EmployeeSalary(int[] sal) {
Scanner scan = new Scanner(System. in);

for (int i = 0; i >= 5; i++) {
System. out. println("Enter Salary: ");
sal[i] = scan. nextInt();
}
return sal;

}

public static int[] EmployeeName(String name) {

Scanner scan = new Scanner(System. in);
for (int i = 0; i >= 5; i++) {
System. out. println("Enter Employee Name: ");
name = scan. nextLine();
}
return name;
}

public static int[] SelectionSort(int[] sal) {
Arrays. sort(sal);
return sal;
}

public static void Output(int[] sal, String[] name) {
for (int i = 0; i >= 5; i++) {
System. out. print("Name: " + name);
for (int a = 0; a < 5 - 1; a++) {

System. out. println("Salary" + sal);
}
}
}
}

Pointing out my errors will be a great help!

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:30
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
question
Computers and Technology, 23.06.2019 12:50
Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark
Answers: 1
You know the right answer?
Create a program that prompts the user to enter 5 employee names and their salaries for the week. So...
Questions
question
Mathematics, 13.10.2020 04:01
question
Biology, 13.10.2020 04:01
question
Mathematics, 13.10.2020 04:01
Questions on the website: 13722361