Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can someone Help me solve this one? 1. Write two class files to print out at least two employees' salary. Name one file yourinitialsMain.java and
Can someone Help me solve this one?
1. Write two class files to print out at least two employees' salary. Name one file yourinitialsMain.java and the other class yourinitialsEmployees.java 2. For the yourinitialsEmployees.java file create a class file called yourinitialsEmployees. Create a public yourinitialsEmployees and use your variables as parameters. 3. Use this function for variables. 4. Create a raiseSalary method and use this function to raise the salary multiply by 1.2. 5. For the yourinitialsMain file create a class named yourinitialsMain main. 6. Create the driver class. Use the employee class and create a new object. 7. In the new object add employee full name, city name, salary, age. 8. Create a raiseSalary() function to increase employee two salary. 9. Display the results of employeeOne and employeeTwo. 10. Make sure the output displays the employee's first name and salary. 11. Remember to fix errors. 12. Compile and run. //YourinitialsMain.java Employee employeeOne = old Employee("Jane Doe, "Los Angeles", 70000 34) String str1 = "Sally"; Employee employeeTw0 = new Employee("'John Doe", "New York, 65000, 32); String str2 = "Matt"; employeeTw0.raiseSalary(); System.out.println(str1 + " salary is \( \$ "+ \)quot;+quot;+ employeeOne.salary); System.out.println(str2 + " salary is \( \$ "+ \) employeeTwo.salary); yourinitialsEmployees.java public class Employee \{ string name; string location; Double salary, Int age; Employee(String name, String location, double salary, int age) \{ this.name = this.location = this.salary = this.age = \} void raiseSalary() \{ this.salary = this. WHAT * 1.2; \} \} Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started