Top Answer
User Avatar
Wiki User
Answered 2010-03-04 08:28:47

Abstract Class:

The class which contains the common features of components of several classes, but cannot it be instantiated by itself. It represents an abstract concept for which there is no actual existing expression. For instance, "Vegetation" is an abstract class - there is no such real, real thing as generic vegetation. Instead, there are only instances of vegetation, such as mango tree and rose plant, which are types of vegetation, and share common characteristics, such as having leaves and stem in at least part of the lifecycle.

SO in software engineering, an abstract class is a class in a nominative type system which is declared by the programmer, and which has the property that it contains members which are also members of some declared subtype. In many object oriented programming languages, abstract classes are known as abstract base classes, interfaces, traits, mixins, flavors, or roles. Note that these names refer to different language constructs which are (or may be) used to implement abstract types.

We can also say that abstract class is : -- A class which is used only as an ancestor and is never instantiated.

In other word a concrete definition will say that

A type of class with pure virtual member functions and one or more methods that are declared but not implemented, that behaves as a base class but prohibits the instantiation of any members of that class. i.e. It has a complete interface but only a partial implementation It is used to take advantage of inheritance yet prohibiting the generation of objects that are not completely defined. Concrete subclasses of an abstract class are required to flesh out the implementation by overriding the abstract methods.

User Avatar

Your Answer

Still Have Questions?

Related Questions

What are the features and purpose of an abstract method?

abstract means nothing to implement its responsible of implementation its implementation class

What is abstract in oop?

The keyword abstract can be used with both classes and methods in Java. An abstract class can never be instantiated. Its sole purpose or rather mission in life is to be extended (subclassed). An abstract method is a method that's been declared as abstract but not implemented. In other words, the method contains no code. You mark a method abstract when you want to force subclasses to provide the implementation.

How do you use an abstract method?

Abstract method has no body(only declare). To use an abstract method you have to override it .

Differences between declaring a method and calling a method?

Declaring a method is when you code for what the method will perform. When you call a method, you are using the method you have written in another part of the program, (or inside the method if it is recursive).

What is an abstract method?

An abstract method is a method, in object-oriented software, of an abstract class which has to be implemented by all subtyping classes.

What is abstract class in Java?

a abstract class is class which has a abstract method which means a method does not its own body.

When do you declare a method or class abstract?

public abstract class class_namne{ public abstract void method() {} }

Can you declare final method in abstract class?

Yes, you can declare a final method in an abstract class. However, that method cannot be abstract itself.

What is declaring method in java?

Declaring a method means - creating a method but with only the method declaration and no method definition. That is, the method will not contain any code or logic inside it. Ex: public String getName(){} The above is a method declaration.

What is abstract class and abstract method?

An Abstract method is one that has only a method declaration and no method definition. Similarly an abstract class is one that has one or more abstract methods. You can declare an abstract class or methods by using the keyword abstract in the class definition. Ex: public abstract class TestAbsClass { abstract void method1(); } Any class that extends this abstract class must provide implementation to the method "method1" or else it would have to be abstract as well.

What is abstract methods?

Simply, Abstract method is a method that is declared without or containing no implementation. It has a method signature

Does abstract class contain the definition of non abstract method in java?

yes,abstract class can have non abstract methods,even it can have all non abstract method

What is the concrete method in java?

A method which is not abstract i.e. if a methods definition is given in the same class its declared is called concrete. where as abstract method would have no definition till the deep down of the hierarchy of class structure but ll ve a declaration in all the subclasses and definition in one subclass after which it need not be declared in the further subclasses. By the way defining the abstract method in a subclass would end the carrying of the declaration till down, but defining it is not mandatory where declaring is mandatory.

How do you write concrete method inside abstract class?

There is no difference with method declaration and implementation between abstract and non-abstract classes. You do the exact same thing when writing a concrete method in either an abstract or non-abstract class.

What is abstract data type in?

Abstract is the data type which can be used at method and class level... The abstract keyword which we used at method level makes that method as abstract means not giving implementation for that method.. the abstract keyword which used at the class level , restrict developers not to create the object of that class.

How do you write the abstract for a science fair project?

An abstract for a science experiment is a short paragraph that summarizes the purpose of the experiment (including the hypothesis), the method used to perform it, the results and your conclusions.

Can abstract method be declared as final in java?

No. An abstract method must be overriden in an subclass. If the method is final then it can't be edited.

When do you declare a method or class abstract in java?

when overriding of a class or a method is necessary, they can be declared as abstract

Is the word method an abstract noun?

Yes, the noun method is an abstract noun, a word for a concept.

What is an abstract for a scientific experiment?

An abstract for a science experiment is a short paragraph that summarizes the purpose of the experiment (including the hypothesis), the method used to perform it, the results and the conclusions. (see related link)

What are abstract method in java?

An abstract method is a method that is declared without an implementation (without braces, and followed by a semicolon), like this: abstract void add(double X, double Y);If a class includes abstract methods, the class itself must be declared abstract

What are the difference between abstract method and normal method in java?

An abstract method is one that is declared, but not implemented. That is, you have an empty method, without the details (the commands in the method). It is meant to be completed in a derived class.

Why cannot abstract classes be instantiated?

abstract class in java is mainly designed for giving abstract method i.e declarations alone, Instantiation is a process by which jvm allocates memory for that. But only with the method declaration jvm will not know how much memory should give for the abstract method. So abstract classes are no need to instantiate before the method implementation, The concrete class which extends the abstract class, will provide method implementation at that time only abstract class constructor will run

What is the purpose for an abstract?

The purpose of an abstract is to give the reader a synopsis of what they are about to read. The abstract generally provides the details of the research including how the research was conducted.

Still have questions?

Trending Questions
How old is Danielle cohn? Asked By Wiki User
How many tens make 600? Asked By Wiki User
Previously Viewed
Unanswered Questions
Why we require Microsoft paint? Asked By Wiki User