The Artima Developer Community
Sponsored Link

Java Answers Forum
record class - class questions

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Casey Langworthy

Posts: 1
Nickname: caseyrocks
Registered: Mar, 2003

record class - class questions Posted: Mar 16, 2003 6:01 PM
Reply to this message Reply
Advertisement
hi. i'm hoping there is someone who can help me with my assignment. the basic gist is a payroll program. there are 5 employees. i have to get the raw data (payrate, name, hours, etc.) and calculate fed taxes, state taxes, gross and net. then i need to print them out to a file in a summary report where i'll also display the totals for all the employees (total gross, total fed tax, etc.). simple enough?

so there is a simpler way to do it (where i would use an Employee class to hold each employee's data and an Employees class to contain all the Employees, calculate totals and sort the employees by last name - i'm still a bit fuzzy on the specifics of even the simpler method) and there's a more complex way that makes a little more sense. my problem is that i am unsure how to implement this second method. it would involve an EmployeeRecord class where all the data for each employee would be public and i would be able to "get" all the data in one get statement (ie getEmployeeRecord) rather than multiple (ie: getfirstname(), getfedtax(), etc.). my problem is that i have no idea how to implement that record class. my teacher has talked about java record classes being just like C structs. that makes sense in theory, but i don't know what the calls to that class look like; i don't know what the data looks like when i get an entire EmployeeRecord and i don't know how i would do something like calculate the totals of all the employees' gross income after i "get" the EmployeeRecord.

this is my first exposure to object oriented programming and my first to java as well. if you know what i'm trying to do and can send me some code or some tips or some links that might be helpful, i would just love it. my AIM name is "laceycans" and i'll probably be online all day on sunday the 16th.

thanks!
casey

Topic: How to make java programme  into a stand alone exe file? Previous Topic   Next Topic Topic: Java resolve symbol  error

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use