Comment on Tutorial - Abstract classes in Java By Kamini



Comment Added by : Anonymous

Comment Added at : 2012-11-16 12:23:17

Comment on Tutorial : Abstract classes in Java By Kamini
/* File name : Employee.java */
public abstract class Employee
{
  private String name;
  private String address;
  private int number;
  public Employee(String name, String address, int number)
  {
     System.out.println(\"Constructing an Employee\");
     this.name = name;
     this.address = address;
     this.number = number;
  }
  public double computePay()
  {
    System.out.println(\"Inside Employee computePay\");
    return 0.0;
  }
  public void mailCheck()
  {
     System.out.println(\"Mailing a check to \" + this.name
      + \" \" + this.address);
  }
  public String toString()
  {
     return name + \" \" + address + \" \" + number;
  }
  public String getName()
  {
     return name;
  }
  public String getAddress()
  {
     return address;
  }
  public void setAddress(String newAddress)
 {
     address = newAddress;
 }
 public int getNumber()
 {
    return number;
 }
}

you can look at this example


View Tutorial



Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Just used InstallCert.java successfully so that my
View Tutorial          By: Anthony Pelosi at 2009-12-30 15:52:17

2. Hey guys it's working. If not then remove p.waitFo
View Tutorial          By: dileep at 2013-01-04 19:51:38

3. Hi Ramalak, I am suffering with the same error as
View Tutorial          By: Divya at 2008-11-06 22:46:12

4. i thnk exampleThread example is wrong - like billg
View Tutorial          By: oldman at 2011-09-24 12:32:33

5. hi please help me out.. how to use this card for r
View Tutorial          By: sasivarnan at 2011-04-27 15:01:12

6. You are good work ,an axplane is so gread

View Tutorial          By: chetan at 2009-06-08 11:58:51

7. Wow, Problem resolved ....
View Tutorial          By: Muhammad Farrukh at 2011-08-29 21:02:09

8. Hi I properly placed the Comm api settings,i have
View Tutorial          By: Muthumani at 2010-04-19 05:24:17

9. nice one.. i lik dis page... very informative for
View Tutorial          By: lokesh at 2013-01-10 09:06:22

10. This example is very clear. I cleared my concept o
View Tutorial          By: sukanta at 2009-10-20 06:08:50