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: 8522
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
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: 11 months ago.
Category: Homework
Expert:  ATLProg replied 11 months ago.
Hello welcome i can assist you
Expert:  ATLProg replied 11 months 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 11 months ago.
I didnt get an answer back
Expert:  ATLProg replied 11 months 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 11 months 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 11 months 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 11 months 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 11 months ago.
Dont have any there.
Expert:  ATLProg replied 11 months ago.
ok i will keep you posted
Customer: replied 11 months ago.
can i put the code i have so far here
Expert:  ATLProg replied 11 months 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 11 months ago.
http://wikisend.com/download/375926/EmpolyeeProject.java
Customer: replied 11 months ago.
http://wikisend.com/download/822566/Employee.java
these are the two classes i have so far
Expert:  ATLProg replied 11 months ago.
ok got it
Customer: replied 11 months ago.
Morning going to work. When you think I can get the response
Customer: replied 11 months ago.
U there
Expert:  ATLProg replied 11 months ago.
Yes, Sometime in evening this should eb ready
Customer: replied 11 months ago.
Great thanks
Expert:  ATLProg replied 11 months ago.
welcome
Customer: replied 11 months ago.
How's everything going
Expert:  ATLProg replied 11 months ago.
Everyhting is goign welll..give me another hour or so pls
Customer: replied 11 months ago.
No problem take ur time. I have to go to class tonight anyway. Thanks for the help.
Customer: replied 11 months ago.
Need a superclass employee
Expert:  ATLProg replied 11 months ago.
ok..
Customer: replied 11 months ago.
U knew
Expert:  ATLProg replied 11 months ago.
yes
Customer: replied 11 months ago.
How's it going?
Expert:  ATLProg replied 11 months ago.
good, will send a better update in 45 mins or so..thanks
Customer: replied 11 months ago.
Update?
Customer: replied 11 months ago.
So any news bean more than 45 min
Expert:  ATLProg replied 11 months ago.
Yes, Finishing it up...testuing it out..check in another 20 mins
Customer: replied 11 months ago.
Cool beans
Expert:  ATLProg replied 11 months ago.
try this link ou t... Download Answer Link
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 8522
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
ATLProg and 10 other Homework Specialists are ready to help you
Customer: replied 11 months ago.
I'm going to sleep can I check it tommorow
Expert:  ATLProg replied 11 months ago.
Sure ! Thats fine.
Expert:  ATLProg replied 11 months ago.
Were you able to download and review answer I provided above ?
Customer: replied 11 months ago.
I'm at work can't review it till 5 est. is that ok
Expert:  ATLProg replied 11 months ago.
ok..
Customer: replied 11 months 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 11 months ago.
and I can change all that juat wanted your opinon.
Expert:  ATLProg replied 11 months ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
Customer: replied 11 months ago.
Also he wanted the variable private
Expert:  ATLProg replied 11 months 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 11 months 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 11 months 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 11 months ago.
Cool beans thanks
Expert:  ATLProg replied 11 months 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 11 months ago.
question needed doubles because he wanted cents. How do i get it to have just two decimal points
Expert:  ATLProg replied 11 months ago.
which field needs cents ?
Customer: replied 11 months ago.
the output for the annual salary
just need to make it two places not 80
Expert:  ATLProg replied 11 months ago.
Do something like this... Math.round(number*100.0)/100.0;
Customer: replied 11 months 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 11 months 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 11 months ago.
ok, what do you want me to review in specific here ?
Customer: replied 11 months 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 11 months 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 11 months 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 11 months ago.
what numbers are you entering..I can;t help without that info
Customer: replied 11 months 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, XXXXXXX);


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 11 months 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 11 months ago.
I figured it out it was dumb thanks for everything
Expert:  ATLProg replied 11 months ago.
welcome
Customer: replied 11 months ago.
I had an extra n that was it. Lol
Expert:  ATLProg replied 11 months 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's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

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

    4514
    More than 5000 online tutoring sessions.
  • 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:

    3099
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2453
    Registered Nurse, Internet Researcher, Private Tutor
  • 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:

    2258
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    2193
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

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

    1865
    Bachelors Degree and CPA with Accounting work experience