After consuming your Double
for the pay rate, you need to consume the line feed before reading the next Employee
name.
Thus, simply adding input.nextLine()
just before the end of your while
loop should do the trick.
Sample piece of code:
while (!name.equals(term)) { // will continue as long as name does not equal "stop"
System.out.print("Enter the employee's name or stop if finished: ");
name = input.nextLine(); // assigns the value input for name
// all your stuff...
System.out.print("Enter " + employeeName + "'s pay rate: ");
rate = input.nextDouble(); // assigns the value input for rate
// some more stuff...
if(input.hasNextLine()) {
input.nextLine();
}
}