This is a very simple, early program, that is supposed demonstrate basic knowledge of get and set type functions in a class. I have what seems to me to be a weird run time error, and my professor wouldn't help me (since the assignment doesn't necessarily demand input). But I want to know what I'm doing wrong dagnammit!

The problem is that the program skips the user's input for the second employee's first name. Nothing seems to be different about that call for input than every other request for input

Here is the program's output from the Command Prompt:

Please set the employee one's first name: David
Please set the employee one's last name: Robinson
Please set the employee one's monthly salary (in 00.00 format): 00.00
Please set the employee two's first name: Please set the employee two's last name: Byran
Please set the employee two's monthly salary (in 00.00 format): 00.00

Here is the code for the class with the main function:

//This tests the class written for homework assignment 3.14
 
import java.util.Scanner;
 
public class EmployeeTest {
 
	public static void main(String args[]) {
 
		Scanner input = new Scanner(System.in);
 
		Employee employeeOne = new Employee();
		Employee employeeTwo = new Employee();
 
		System.out.print("Please set the employee one's first name: ");
		String name = input.nextLine();
		employeeOne.setFirstName(name);
 
		System.out.print("Please set the employee one's last name: ");
		name = input.nextLine();
		employeeOne.setLastName(name);
 
		System.out.print("Please set the employee one's monthly salary (in 00.00 format): ");
		double number = input.nextDouble();
		employeeOne.setMonthlySalary(number);
 
		System.out.print("Please set the employee two's first name: ");
		name = input.nextLine();
		employeeTwo.setFirstName(name);
 
		System.out.print("Please set the employee two's last name: ");
		name = input.nextLine();
		employeeTwo.setLastName(name);
 
		System.out.print("Please set the employee two's monthly salary (in 00.00 format): ");
		number = input.nextDouble();
		employeeTwo.setMonthlySalary(number);
 
		double yearlyOne = employeeOne.getMonthlySalary() * 12;
		double yearlyTwo = employeeTwo.getMonthlySalary() * 12;
 
		System.out.print("\n");
 
		System.out.printf("%s", employeeOne.getFirstName() );
		System.out.printf(" %s\n", employeeOne.getLastName() );
		System.out.printf("Monthly Salary is: %f", employeeOne.getMonthlySalary() );
		System.out.printf("\nYearly Salary is: %f", yearlyOne);
 
		System.out.print("\n");
		System.out.print("\n");
 
		System.out.printf("%s", employeeTwo.getFirstName() );
		System.out.printf(" %s\n", employeeTwo.getLastName() );
		System.out.printf("Monthly Salary is: %f", employeeTwo.getMonthlySalary() );
		System.out.printf("\nYearly Salary is: %f", yearlyTwo);
 
	}
 
}

And this is the Employee class with the get and set functions (I don't think the error is here, but what do I know):

//This is homework assignment 3.14. It demonstrates my knowledge of get and set functions in a public class.
 
public class Employee {
 
	private String firstName;
	private String lastName;
	private double monthlySalary;
 
	public void setFirstName(String newName) {
 
		firstName = newName;
 
	}
 
	public void setLastName(String newName2) {
 
		lastName = newName2;
 
	}
 
	public void setMonthlySalary(double newNumber) {
 
		monthlySalary = newNumber;
 
		if (monthlySalary < 0.0)
			monthlySalary = 0.0;
 
	}
 
	public String getFirstName() {
 
		return firstName;
 
	}
 
	public String getLastName() {
 
		return lastName;
 
	}
 
	public double getMonthlySalary() {
 
		return monthlySalary;
 
	}
 
}