public class EmployeeTester { public static void main (String [] args) { final d
ID: 3793329 • Letter: P
Question
public class EmployeeTester {
public static void main (String [] args)
{
final double increase = 0.25;
// Create two instances of the Employee class
Employee jas = new Employee();
Employee abc = new Employee("Alice", "Cason", 4000);
//set first name, last name and salary for employee jas
jas.setFirst("James");
//add the additional information
jas.setLast("Harry");
jas.setSalary(5000);
//display the name and salary of both Employee objects
System.out.println();
System.out.println("jas Employee first name:"+ jas.getFirst());
System.out.println("jas Employee last name:"+ jas.getLast());
System.out.println("jas Employee salary:"+jas.getSalary());
System.out.println();
System.out.println("abc Employee first name:"+abc.getFirst());
System.out.println("abc Employee last name:"+abc.getLast());
System.out.println("abc Employee salary:"+abc.getSalary());
//Determine the year to date salary for both employee
System.out.print.ln();
System.out.print(abc.getFirst()+"'s salary:");
int mo = 9;
System.out.println(abc.getSalary());
System.out.println("YTD:"+abc.ytdSalary(mo));
System.out.println();
System.out.print(jas.getFirst()+"'s salary:");
System.out.println(jas.getSalary());
System.out.println("YTD:"+jas.ytdSalary(mo));
//set and display salary with increase
System.out.println();
abc.setSalary(abc.getSalary()+abc.getSalary()*increase);
System.out.println("abc salary after increase:"+abc.getSalary());
jas.setSalary(jas.getSalary()+jas.getSalary()*increase);
System.out.println("jas salary after increase:"+jas.get.Salary());
}//end method main
}//end class EmployeeTester
Output is errorenous
output - System.out.print.ln();
^
symbol: variable print
location: variable out of type PrintStream
EmployeeTester.java:46: error: cannot find symbol
System.out.println("jas salary after increase:"+jas.get.Salary());
Explanation / Answer
It should be System.out.println() not System.out.print.ln();
The code will be excuted...
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.