Results 1 to 4 of 4
- 10-26-2008, 08:59 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 1
- Rep Power
- 0
Implement a class Employee-Help due tmrw!
I have absolutely no idea how to do this..
Implement a class Employee.
public Employee(String employeeName, double currentSalary)
and methods
public String getName()
public double getSalary()
public void raiseSalary(double by Percent)
Also supply an EmployeeTester class that tests all methods
I tried to start but have no idea and got all compiler messages..
public class Employee
{
String name;
double currentSalary;
public Employee(String name, double currentSalary);
{
public String getName()
{
return name;
}
public double getSalary()
{
return salary;
}
}
}
Can anyone help?
-
First the bitter truth: Our track record is not too good at helping those who "have absolutely no idea how to do this". Usually folks in this situation are much better off going to their instructor or a tutor to arrange intense one-on-one face to face tutoring. The problem is that we while we can answer straight-forward questions, we can't put concepts into your head if the rudiments aren't there to begin with.
-
So, now on to your problem:
1) Do you know how to make the most basic of classes? Can you create a class that has a few variables, methods, and a constructor? If so, why not try to create an Employee class right now, and then post what you have. You can't break your computer by trying.
Oh, and when you post your code, please use code tags so that your code retains its formatting and remains "readable". To do this, you will need to paste already formatted code into the forum, highlight this code, and then press the "code" button at the top of the forum Message editor prior to posting the message. Another way is to place the tag [code] at the top of your block of code and the tag [/code] at the bottom, like so:
Java Code:[code] // your code block goes here. // note the differences between the tag at the top vs the bottom. [/code]
- 10-27-2008, 01:37 AM #4
Similar Threads
-
Employee Database using an Array
By hajeer in forum AWT / SwingReplies: 2Last Post: 07-30-2008, 04:05 AM -
Jsp Project on Employee Details
By 82rathi.angara in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 06-16-2008, 03:12 PM -
Help to implement JTable
By adeeb in forum AWT / SwingReplies: 0Last Post: 06-04-2008, 06:26 PM -
How to implement HttpSessionListener in JSP
By Srikanth816 in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 04-16-2008, 09:22 AM -
How can we implement IPC in java
By samson in forum NetworkingReplies: 1Last Post: 04-04-2007, 06:38 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks