| | |
need help with java
![]() |
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
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
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.
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).
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).
![]() |
Similar Threads
- FT Junior Java Developer Needed for Major Media firm in NYC (Software Development Job Offers)
- Java/J2EE Senior Software Engineer (Software Development Job Offers)
- Front-end Java Software Engineer for Digital Video/Media Market Leader (Software Development Job Offers)
- Senior Software Engineer (Java) (Web Development Job Offers)
- Java Software Engineer (Software Development Job Offers)
- Java Front-end Developer Engineer for Stealth Media Start-up (Software Development Job Offers)
- Java Developer Required (Software Development Job Offers)
Other Threads in the Java Forum
- Previous Thread: Problem altering "Hidden" Variable
- Next Thread: Printing
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary block bluetooth character chat class client code component consumer csv database desktop developmenthelp eclipse error fractal ftp game gameprogramming givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list loops mac map method methods mobile netbeans newbie number objects online oriented panel printf problem program programming project projects properties recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing test textfields threads time title tree tutorial-sample ubuntu update windows working






