User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 391,738 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,266 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 1716 | Replies: 5
Reply
Join Date: Nov 2004
Posts: 229
Reputation: sam1 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

need help with java

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2004
Location: Pakistan
Posts: 1,673
Reputation: nanosani is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 50
Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Re: need help with java

  #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  
Join Date: Nov 2004
Posts: 229
Reputation: sam1 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: need help with java

  #3  
Nov 26th, 2004
give me at least some ideas of how to do it plz!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,646
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 191
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: need help with java

  #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  
Join Date: Jul 2004
Location: Pakistan
Posts: 1,673
Reputation: nanosani is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 50
Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Re: need help with java

  #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  
Join Date: Nov 2004
Posts: 229
Reputation: sam1 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: need help with java

  #6  
Nov 27th, 2004
thank you nanosani i really appreciate ur help!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Java Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 3:59 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC