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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:00, ahmedislife
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
image
Computers and Technology, 22.06.2019 09:00, jgrable5175
Designing a mobile web page is a little different from designing a regular web page. name at least three features that should be considered when designing a website that is mobile phone-friendly, and briefly explain why they are important.
Answers: 1
image
Computers and Technology, 23.06.2019 13:10, BrianKeokot4534
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
image
Computers and Technology, 24.06.2019 02:00, sameh0425
Which steps will open the system so that you can enter a question and do a search for
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 in other subjects:

Konu
Mathematics, 11.06.2020 17:57