Results 1 to 6 of 6

Thread: Use of abstract classes

  1. #1
    Join Date
    Dec 2009
    Posts
    68

    Use of abstract classes

    Hi All,

    I am IT student with few confusion about some concepts of the object oriented programming. I need your help to be aware about the use of abstract classes. I know that abstract class doesn't comprises any content. But didn't get the intention behind this methodology. If you know something about the use of abstract classes, then please let know the same. I am waiting for your reply.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Use of abstract classes

    Abstract class in an Object Oriented Programming used to enforce some rules to the classes which implements. Class which derived from super class must comprises common properties.Providing the Abstract functionality to object is one of the powerful concepts by java. In addition to this concept the derive class can have its own methods like "Swim()".Abstract classes cannot be instantiated; they must be sub classed, and actual implementations must be provided for the abstract methods.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Use of abstract classes

    The abstract class is a hybrid between a class and a conventional interface. It provides a generic implementation to subclasses and also asks them to implement certain things for which the abstract class can not decide. An abstract class is a class whose methods are abstract security hole when we declare an abstract method automatically you must define the class "abstract" and is generally used when other classes will inherit from this class and they are same method as the super class have therefore written to not repeat the same methods each time in these classes.

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Use of abstract classes

    Abstract classes are very useful to develop methods that depend on other methods that are not specified. In C + +A class is abstract if it contains at least one pure virtual method declared, that is to say, beginning with virtual and terminated = 0. This type of class is not instantiable. You can still create pointers or references to the type of abstract class that will point or reference objects of a class derived non-abstract. A pure virtual function should be reasserted explicitly defined or pure virtual. A subclass of an abstract class is abstract if it still does not define all abstract methods it inherits.

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Use of abstract classes

    abstract class modifier used when declaring a class or method. We then say that the class or method is abstract. An abstract method has its prototype, that is to say, its return type followed by its name, followed by the list of parameters between parentheses, followed by a semicolon. An abstract method can not be declared static or private or Final. Once a class has one abstract method, it must also be declared abstract. An abstract class can not be instantiated. It will extend and define all the abstract methods in it to use it.

  6. #6
    Join Date
    May 2008
    Posts
    2,012

    Re: Use of abstract classes

    In case of Interface the derived class can implement any number of interface but restricted to extend single abstract class. It makes pointers or references to the type of abstract class that will point or reference objects of a class derived non-abstract. Providing the Abstract functionality to object is one of the powerful concepts by java. Abstract classes are used to enforce some rules to the classes which implements. In case of Abstract class we can define COMMON functionality in super class and those can be used in the derived class where as in Interface we cant do that.

Similar Threads

  1. Difference between Abstract classes and Interfaces in C#
    By Gallard in forum Software Development
    Replies: 8
    Last Post: 21-05-2012, 11:58 AM
  2. Table and abstract classes
    By TechGate in forum Software Development
    Replies: 5
    Last Post: 03-03-2010, 10:49 AM
  3. What is Abstract methods?
    By ScarFace 01 in forum Software Development
    Replies: 5
    Last Post: 09-02-2010, 11:59 AM
  4. Abstract Classes in PHP5
    By nonose in forum Software Development
    Replies: 2
    Last Post: 16-06-2009, 02:33 PM
  5. Abstract class and Interface in .net
    By RogerFielden in forum Software Development
    Replies: 3
    Last Post: 04-05-2009, 06:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,272,088.83818 seconds with 17 queries