Explain abstract classes, C/C++ Programming

Assignment Help:

Abstract Classes

Abstract classes are the classes, which are written just to act as base classes. Consider the following classes.

                class base

                 {

                                :

                                :

                 };

 

class  Aclass : public base

                 {

                                :

                                :

                 };

 

                class  Bclass : public base

                 {

                                :

                                :

                 };

                class  Cclass : public base

                 {

                                :

                                :

                 };

                void main()

                 {

                   Aclass objA;

                   Bclass objB;

                   Cclass objC;

 

                                :

                                :

                }

There are three classes - Aclass, Bclass, Cclass - each of which is derived from the class base. The main () function declares three objects of each of these three classes. Though, it does not declare any object of the class base. This class is a general class whose sole purpose is to serve as a base class for the other three. Classes used only for the purpose of deriving other classes from them are known as abstract classes. They simply serve as base class, and no objects for such classes are created

 


Related Discussions:- Explain abstract classes

I want rss feed from emails, Project Description: I am trading binary op...

Project Description: I am trading binary options and need my signals that are sent to me via email to be sent to my followers via an RSS feed I have no idea how rss feeds imp

PEBBLE MERCHANT, There is a pebble merchant. He sells the pebbles, that are...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

Board coloring, programing code on board coloring in clanguage

programing code on board coloring in clanguage

Converting base type to class type (char to string), Converting Base Type t...

Converting Base Type to Class Type (char to string)   class String { char *name; int length; public: String(void) {length =0; name = new char[length+1];

Pro, i need to do my home work

i need to do my home work

Command-line arguments, Command-line arguments are passed into programs usi...

Command-line arguments are passed into programs using the arguments of main(). Here's a quick example, for a program called by typing "progname file.txt 1 2.7": #include #incl

Metric number, how are metric numer change the number of metric

how are metric numer change the number of metric

Explain function overloading, Function Overloading Function overloading...

Function Overloading Function overloading is a form of polymorphism. Function overloading facilitates explaining one function having many forms. In other words it facilitates e

Using substitution model write corresponding constructor, (a) Pairs may be ...

(a) Pairs may be represented using a lambda. Using only lambdas, create a procedure (triple x y z) that constructs a triplet. You may NOT use car, cons or cdr in the triplet proced

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd