when to use abstract classes - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

when to use abstract classes

gauravdrockergauravdrocker Posts: 2Member
Hello,
I am trying to develop a module for a bigger application. The module and application itself is quite simple. But they want me to use abstract classes in this.Please suggest some classes that can be made abstract for this application.
The application is :
An application for the employee salary distribution system needs to be made. An initial data base of 500 employees will suffice. It should contain the first name, last name, age, employee id, department, designation, salary and duration since first joined the company

Comments

  • azin1990azin1990 Posts: 3Member
    hi guys asking for help here.Got great business ideas but am not a programmer.got about three great ideas and i need someone good at programming to execute these.especialy web design cause or my ideas have to do with the web and you can make money from web(less piracy).am a young accounting student, initially i thought i would study programming myself but its a huge task and might miss the opportunity.If you are interested and want to find out more my email address [email protected] please get in touch
  • azin1990azin1990 Posts: 3Member
    hi guys asking for help here.Got great business ideas but am not a programmer.got about three great ideas and i need someone good at programming to execute these.especialy web design cause or my ideas have to do with the web and you can make money from web(less piracy).am a young accounting student, initially i thought i would study programming myself but its a huge task and might miss the opportunity.If you are interested and want to find out more my email address [email protected] please get in touch
  • azin1990azin1990 Posts: 3Member
    hi guys asking for help here.Got great business ideas but am not a programmer.got about three great ideas and i need someone good at programming to execute these.especialy web design cause or my ideas have to do with the web and you can make money from web(less piracy).am a young accounting student, initially i thought i would study programming myself but its a huge task and might miss the opportunity.If you are interested and want to find out more my email address [email protected] please get in touch
  • GouthamKumarGouthamKumar NellorePosts: 17Member

    Abstraction refers to the ability to make a class abstract in OOP. An abstract class is one that cannot be instantiated. All other functionality of the class still exists, and its fields, methods, and constructors are all accessed in the same manner. You just cannot create an instance of the abstract class.

    If a class is abstract and cannot be instantiated, the class does not have much use unless it is subclass. This is typically how abstract classes come about during the design phase. A parent class contains the common functionality of a collection of child classes, but the parent class itself is too abstract to be used on its own.

    For more details and practice programs please follow the links
    http://www.tutorialspoint.com/java/java_abstraction.htm
    http://java.meritcampus.com/t/118/Abstract-classes

  • manishamanisha Posts: 32Member

    Abstract class:

    Abstract class is a class which contains abstract methods i.e. methods are only declared not defined.
    It is used to achieve the method overriding in java.

    Use of abstract class in your application:

    You can have one Employee abstract class and you can derive different classes like Manager, Project Leader, Senior Manager, Production manager etc. You can define one abstract method in employee called getData() which takes the data from employee and enter in the database. You have to override this method in all the derived classes.

    For more Details Refer following link:
    http://java.meritcampus.com/t/118/Abstract-classes?tc=mm222

    http://java.meritcampus.com/t/119/Abstract-methods?tc=mm223

    I have written one blog on abstract class, refer it for more details:
    http://abstract-class.blogspot.in/2015/06/abstract-class-in-java.html

Sign In or Register to comment.