How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask ATLProg Your Own Question

ATLProg
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 9151
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
44910485
Type Your Homework Question Here...
ATLProg is online now
A new question is answered every 9 seconds

The first programming project involves writing a program that

This answer was rated:

The first programming project involves writing a program that computes the average salary for a collection of employees of different types. This program consists of four classes. The first class is the Employee class, which contains the employee's name and monthly salary, which is specified in whole dollars. It should have two methods:
1. A constructor that allows the name and monthly salary to be initialized.
2. A method named annualSalary that returns the salary for a whole year.
The Employee class has two subclasses. The first is Salesman. It has an additional instance variable that contains the annual sales in whole dollars for that salesman. It should have the same two methods:
1. A constructor that allows the name, monthly salary and annual sales to be initialized.
2. An overridden method annualSalary that returns the salary for a whole year. The salary for a salesman consists of the base salary computed from the monthly salary plus a commission. The commission is computed as 2% of that salesman's annual sales up to a maximum of $20,000.
The second subclass is Executive. It has an additional instance variable that reflects the current stock price. It should have the same two methods:
1. A constructor that allows the name, monthly salary and stock price to be initialized.
2. An overridden method annualSalary that returns the salary for a whole year. The salary for an executive consists of the base salary computed from the monthly salary plus a bonus. The bonus is $30,000 if the current stock price is greater than $50 and nothing otherwise.
Finally there should be a fourth class than contains the main method. It should create an array of objects of type Employee and initialize them to a mixture of different kinds of employees. It should then compute and display the average salary for all employees.
Hello welcome i can assist you
Please upload any file you may have related to this question on www.wikisend.com and post the generated File ID or download link here

Also please let me know by when you need this done
Customer: replied 3 years ago.
I didnt get an answer back
I havent provided one yet. I have to understand the requirement and would like to know how soon you need this done
Customer: replied 3 years ago.
In the next couple of days. I just have an issue with the salesperson class and the executive class the putting the objects in the main class. If you can give me an explenation on how you did the code would be great too i really would like to learn too thanks.
Customer: replied 3 years ago.
This is the requierments.
The first programming project involves writing a program that computes the average salary for a collection of employees of different types. This program consists of four classes. The first class is the Employee class, which contains the employee's name and monthly salary, which is specified in whole dollars. It should have two methods:
1. A constructor that allows the name and monthly salary to be initialized.
2. A method named annualSalary that returns the salary for a whole year.
The Employee class has two subclasses. The first is Salesman. It has an additional instance variable that contains the annual sales in whole dollars for that salesman. It should have the same two methods:
1. A constructor that allows the name, monthly salary and annual sales to be initialized.
2. An overridden method annualSalary that returns the salary for a whole year. The salary for a salesman consists of the base salary computed from the monthly salary plus a commission. The commission is computed as 2% of that salesman's annual sales up to a maximum of $20,000.
The second subclass is Executive. It has an additional instance variable that reflects the current stock price. It should have the same two methods:
1. A constructor that allows the name, monthly salary and stock price to be initialized.
2. An overridden method annualSalary that returns the salary for a whole year. The salary for an executive consists of the base salary computed from the monthly salary plus a bonus. The bonus is $30,000 if the current stock price is greater than $50 and nothing otherwise.
Finally there should be a fourth class than contains the main method. It should create an array of objects of type Employee and initialize them to a mixture of different kinds of employees. It should then compute and display the average salary for all employees.

sure i can do that and have it ready before 2 days also please upload any files you may have on wikisend.com and post the file id here
Customer: replied 3 years ago.
Dont have any there.
ok i will keep you posted
Customer: replied 3 years ago.
can i put the code i have so far here
No as that will cause formatting to loose and this is a public website
Please zip your code and upload on wikisend.com
Customer: replied 3 years ago.
http://wikisend.com/download/375926/EmpolyeeProject.java
Customer: replied 3 years ago.
http://wikisend.com/download/822566/Employee.java
these are the two classes i have so far
ok got it
Customer: replied 3 years ago.
Morning going to work. When you think I can get the response
Customer: replied 3 years ago.
U there
Yes, Sometime in evening this should eb ready
Customer: replied 3 years ago.
Great thanks
welcome
Customer: replied 3 years ago.
How's everything going
Everyhting is goign welll..give me another hour or so pls
Customer: replied 3 years ago.
No problem take ur time. I have to go to class tonight anyway. Thanks for the help.
Customer: replied 3 years ago.
Need a superclass employee
ok..
Customer: replied 3 years ago.
U knew
yes
Customer: replied 3 years ago.
How's it going?
good, will send a better update in 45 mins or so..thanks
Customer: replied 3 years ago.
Update?
Customer: replied 3 years ago.
So any news bean more than 45 min
Yes, Finishing it up...testuing it out..check in another 20 mins
Customer: replied 3 years ago.
Cool beans
try this link ou t... Download Answer Link
ATLProg and 2 other Homework Specialists are ready to help you
Customer: replied 3 years ago.
I'm going to sleep can I check it tommorow
Sure ! Thats fine.
Were you able to download and review answer I provided above ?
Customer: replied 3 years ago.
I'm at work can't review it till 5 est. is that ok
ok..
Customer: replied 3 years ago.
Great love it and understand what you did thanks. Also should I change the int to double. Also he wanted a constant for the year so just int YEAR = 12;
Customer: replied 3 years ago.
and I can change all that juat wanted your opinon.
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
Customer: replied 3 years ago.
Also he wanted the variable private
Sorry but that was missing in the requirements you gave me, I repeatedly asked for an assignment document and all I got was the text you pasted above. What I have provided meets all the needs of your requirements.
Customer: replied 3 years ago.
It's ok I figured it out now u gave me a great outline I can make the few changes. Thanks again
Welcome ! Pls feel free to let me know if you want me to review your files after your changes..I will happily do so..
Customer: replied 3 years ago.
Cool beans thanks

Please start your question text with "For ATLProg Only" to request me again, next time you need help!
http://www.justanswer.com/homework/expert-atlprog/ - Please bookmark this link to ask new question.
Customer: replied 3 years ago.
question needed doubles because he wanted cents. How do i get it to have just two decimal points
which field needs cents ?
Customer: replied 3 years ago.
the output for the annual salary
just need to make it two places not 80
Do something like this... Math.round(number*100.0)/100.0;
Customer: replied 3 years ago.
cool where hold on im going to give u what i have now
also there something wrong with the salesman class if i put the same number in the first peramater no matter what the annual sales there is no diffrenece.
Customer: replied 3 years ago.
http://wikisend.com/download/102574/Salesman.java
http://wikisend.com/download/171348/TestEmployee.java
http://wikisend.com/download/940150/Executive.java
http://wikisend.com/download/787984/Employee.java
ok, what do you want me to review in specific here ?
Customer: replied 3 years ago.
if you run the program and in the new salesman if you put the same numbers in the first one and different numbers in the others no matter what you put in the second peramaters there output will be the same. And just to get two decimal points in the out put as well. I been trying to figure out why my self
The salary for a salesman consists of the base salary computed from the monthly salary plus a commission.
//The commission is computed as 2% of that salesman's annual sales up to a maximum of $20,000.
Customer: replied 3 years ago.
yeah i got that but when i run the program the numbers arent diffrent in when the two annualSales are diffrent. and the monthly salary are the same
what numbers are you entering..I can;t help without that info
Customer: replied 3 years ago.

@Override

public double annualSalary(){
double commission = annualSales * 2/100;
if(commission > 20000){
commission = 20000;

}

return monthlySalary * YEAR + commission;


employees[1] = new Salesman("Isaak ", "Morales ", 60000, 1200000);


employees[2] = new Salesman("Cindy ", "Taylor ", 60000, 100000);

Isaak Morales Annual Salary is: 720000.0 dollars

Cindy Taylor Annual Salary is: 720000.0 dollars
If you would use my code you will see..

740000
and 722000...

I am not sure what you have changed in code..

Customer: replied 3 years ago.
I figured it out it was dumb thanks for everything
welcome
Customer: replied 3 years ago.
I had an extra n that was it. Lol
ok..

Related Homework Questions