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: 8788
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

Customer Question

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.
Submitted: 1 year ago.
Category: Homework
Expert:  ATLProg replied 1 year ago.
Hello welcome i can assist you
Expert:  ATLProg replied 1 year ago.
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 1 year ago.
I didnt get an answer back
Expert:  ATLProg replied 1 year ago.
I havent provided one yet. I have to understand the requirement and would like to know how soon you need this done
Customer: replied 1 year 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 1 year 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.

Expert:  ATLProg replied 1 year ago.
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 1 year ago.
Dont have any there.
Expert:  ATLProg replied 1 year ago.
ok i will keep you posted
Customer: replied 1 year ago.
can i put the code i have so far here
Expert:  ATLProg replied 1 year ago.
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 1 year ago.
http://wikisend.com/download/375926/EmpolyeeProject.java
Customer: replied 1 year ago.
http://wikisend.com/download/822566/Employee.java
these are the two classes i have so far
Expert:  ATLProg replied 1 year ago.
ok got it
Customer: replied 1 year ago.
Morning going to work. When you think I can get the response
Customer: replied 1 year ago.
U there
Expert:  ATLProg replied 1 year ago.
Yes, Sometime in evening this should eb ready
Customer: replied 1 year ago.
Great thanks
Expert:  ATLProg replied 1 year ago.
welcome
Customer: replied 1 year ago.
How's everything going
Expert:  ATLProg replied 1 year ago.
Everyhting is goign welll..give me another hour or so pls
Customer: replied 1 year ago.
No problem take ur time. I have to go to class tonight anyway. Thanks for the help.
Customer: replied 1 year ago.
Need a superclass employee
Expert:  ATLProg replied 1 year ago.
ok..
Customer: replied 1 year ago.
U knew
Expert:  ATLProg replied 1 year ago.
yes
Customer: replied 1 year ago.
How's it going?
Expert:  ATLProg replied 1 year ago.
good, will send a better update in 45 mins or so..thanks
Customer: replied 1 year ago.
Update?
Customer: replied 1 year ago.
So any news bean more than 45 min
Expert:  ATLProg replied 1 year ago.
Yes, Finishing it up...testuing it out..check in another 20 mins
Customer: replied 1 year ago.
Cool beans
Expert:  ATLProg replied 1 year ago.
try this link ou t... Download Answer Link
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 8788
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
ATLProg and 7 other Homework Specialists are ready to help you
Customer: replied 1 year ago.
I'm going to sleep can I check it tommorow
Expert:  ATLProg replied 1 year ago.
Sure ! Thats fine.
Expert:  ATLProg replied 1 year ago.
Were you able to download and review answer I provided above ?
Customer: replied 1 year ago.
I'm at work can't review it till 5 est. is that ok
Expert:  ATLProg replied 1 year ago.
ok..
Customer: replied 1 year 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 1 year ago.
and I can change all that juat wanted your opinon.
Expert:  ATLProg replied 1 year ago.
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
Customer: replied 1 year ago.
Also he wanted the variable private
Expert:  ATLProg replied 1 year ago.
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 1 year ago.
It's ok I figured it out now u gave me a great outline I can make the few changes. Thanks again
Expert:  ATLProg replied 1 year ago.
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 1 year ago.
Cool beans thanks
Expert:  ATLProg replied 1 year ago.

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 1 year ago.
question needed doubles because he wanted cents. How do i get it to have just two decimal points
Expert:  ATLProg replied 1 year ago.
which field needs cents ?
Customer: replied 1 year ago.
the output for the annual salary
just need to make it two places not 80
Expert:  ATLProg replied 1 year ago.
Do something like this... Math.round(number*100.0)/100.0;
Customer: replied 1 year 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 1 year 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
Expert:  ATLProg replied 1 year ago.
ok, what do you want me to review in specific here ?
Customer: replied 1 year 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
Expert:  ATLProg replied 1 year ago.
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 1 year 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
Expert:  ATLProg replied 1 year ago.
what numbers are you entering..I can;t help without that info
Customer: replied 1 year 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
Expert:  ATLProg replied 1 year ago.
If you would use my code you will see..

740000
and 722000...

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

Customer: replied 1 year ago.
I figured it out it was dumb thanks for everything
Expert:  ATLProg replied 1 year ago.
welcome
Customer: replied 1 year ago.
I had an extra n that was it. Lol
Expert:  ATLProg replied 1 year ago.
ok..

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3458
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3124
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2385
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1988
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1876
    Bachelors Degree and CPA with Accounting work experience
  • http://ww2.justanswer.com/uploads/avremote/photoa.jpg Seanna's Avatar

    Seanna

    Tutor

    Satisfied Customers:

    1781
    3,000+ satisfied customers, all topics, A+ work
 
 
 

Related Homework Questions

Chat Now With A Tutor
ATLProg
ATLProg
Sr Software Engineer
1216 Satisfied Customers
Expert in Java C++ C C# VB Javascript Design SQL HTML