need help with java

Reply

Join Date: Nov 2004
Posts: 257
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

need help with java

 
0
  #1
Nov 25th, 2004
hi

i have been given this cwk for java programming. and i need help getting started. i dont want u to do it all but if u can help to get me started i would really appreciate it thank u. this is the task:

A large car dealing company wants to write a computer system to store information about its staff and to perform routine payroll tasks. For each member of staff, the following information needs to be provided: the name, an employee works number (this is a unique 6-digit number) together with an operation to calculate the employee's monthly salary.

The company employs both full-time and part-time staff where the part-time staff work for a specified number of hours per week. Full-time staff are assumed to work for 40 hours per week and part-time staff are paid pro rata, so for example if a part-time employee works for 15 hours per week, s/he will recieve three eights (15/40) of the monthly salary of a full-time employee on the same grade. These staff are paid on a 5-point salary scale (which include all on-costs such as income tax, national insurance and pension contributions) and is shown below.




Spine Point
Monthly Salary

1
£1,600

2
£1,750

3
£1,900

4
£2,100

5
£2,300





The company also employs commissioned people (car salesmen and saleswomen) whose monthly salary is made up of a basic flat rate minimum of £1,200 plus a percentage their total sales for that month. The rate of commission for sales up to but not exceeding £20,000 is 10% while for sales exceeding £20,000, the commission rate is 15%.



Define a hierarchy of Java classes that meets the above requirements


Define a class EmployeeList to represent a directory (i.e. list) of employees that can be used to store the details of all the company's employees. Your staff list class needs to include a container object as one of its instance variables - this could be an array, a Vector, or a Collections object. Think carefully about the type of objects the directory should store and the interface it provides


Write a short main program that does the following:


reads a list of employee details from the comma delimited data file "staff04.dat" (which can be copied across from here) and places them into the directory
calculates the salaries of all staff in the company
prints out, in tabular form, the details and salaries of all staff in the company, with names in alphabetical order
prints out the total monthly salary bill
Your main program should include a method void doPayroll ( ... ) that takes a list of staff, calculates their monthly salary and writes their details and individual salaries, appropriately formatted, to the standard output.

The data file includes the following codes:


Code
Type of Employee

FT
Full-time Salaried

PT
Part-time Salaried

CO
Commissioned (Salesperson)



Typical data entries for a full-time, part-time and a commissioned employee respectivley, take the forms below, where each field is separated by a comma with no white space:

FT,name,works-number,grade
PT,name,works-number,grade,hours-worked
CO,name,works-number,monthly-sales-total

with typical entries shown below

FT,DICKENS Charles,234567,4
PT,AUSTEN Jane,111222,5,10.5
CO,HARDY Thomas,777333,6500
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 1,749
Reputation: nanosani is an unknown quantity at this point 
Solved Threads: 55
Team Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Re: need help with java

 
0
  #2
Nov 25th, 2004
Who would take the headache of reading your query ??? you would have atleast showed some effort in solving the problem. Please try to solve it yourself .. and where you are stuck ... ask here then.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 257
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: need help with java

 
0
  #3
Nov 26th, 2004
give me at least some ideas of how to do it plz!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: need help with java

 
0
  #4
Nov 26th, 2004
learn to read, that usually helps.
Don't start coding, start thinking. That helps even more though it requires you can read...
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 1,749
Reputation: nanosani is an unknown quantity at this point 
Solved Threads: 55
Team Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Re: need help with java

 
0
  #5
Nov 26th, 2004
First find out what you have for your program .. the variables .. n methods ... and how many classes you'll need to solve your problem

then see what are the inputs of your program .. and then what your program needs to output ..

and then start making a visual picture of what your program will be .....

and if you dont understand what to do ... atleast take your pen in your hands and start writing something ... it'll give you a boost ( if you successfully do it ... I assure half your work will be solved).
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 257
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: need help with java

 
0
  #6
Nov 27th, 2004
thank you nanosani i really appreciate ur help!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC