• Post Reply Bookmark Topic Watch Topic
  • New Topic

java coding for employee  RSS feed

 
miss chikin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had a trouble making this coding.

1)construct a class definition taht can be used to represent an employee of a company.Each employee is defined by an integer ID number, a floating-point pay rate and the maximun number of hours the employee should work each week. The service provided by the class should be the ability to enter data for a new emlopyee, the ability tochange data for a new employee and the ability to display the existing data for a new employee.

2)create a new class with main() method (so that program can be executed) that ask the user to enter data for three employees and display the entered data. For this purpose, you need to "make use" above class.

3)Modify the program written in (2) to include a menu that offers the user the following choices 1)Add emlployee 2)modify employee 3) Delete employee 4)exit menu

in response to a choice, the program should initiate appropriate action to implement the choice.

Please help me!
 
Zeeshan Sheikh
Ranch Hand
Posts: 144
Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok that's where you have to think like everything is an object. Employee is an Object. All employee have attributes (e.g. ID, pay rate) & behaviors. Once all those are identified then convert them into a class. It seems like your first OOP assignment so please show some effort start by writing your program and if you get stuck somewhere we will definitely help you.
 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You have had some good advice there.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!