Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help with JAVA coding assignment please! Create the classes Employee, Programmer, SeniorProgrammer and another called MainExercise2. Add a main( ) method to MainExercise2. Exercise
Need help with JAVA coding assignment please!
Create the classes Employee, Programmer, SeniorProgrammer and another called MainExercise2. Add a main( ) method to MainExercise2. Exercise 2B [15\%] Add three variables to the Employee class: - a private String called name that will contain the name of the employee - a private double called monthlySalary that will contain the monthly salary Next add the constructor. Set name and monthlySalary using parameters. Finally add three methods: - a public method called getName with no parameters that returns the name variable - a public method called getMonthlySalary with no parameters that returns the monthlySalary variable - a public method called getAnnualSalary with no parameters that returns the annual salary of the employee formatted to have only two decimal places (e.g. 10.3832 will be returned as 10.38)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