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

Static data meber and const data meber, can we use const data member in sta...

can we use const data member in static. member function with example.

Linux driver and linux, Project Description: I´ve a need linux programmi...

Project Description: I´ve a need linux programming job. if you are interested, Skills required are C Programming, PCB Layout, Embedded Software, Python, Software Architecture

Describe, A: Use operator overloading to present a friend right-shift opera...

A: Use operator overloading to present a friend right-shift operator, operator>>. It is similar to the output operator, except the parameter doesn't contain a const: "Fred&" instea

Explain floating literal, Floating  literal They can be written in comm...

Floating  literal They can be written in common decimal as well as scientific notation (floating point representation). By default it is of type double. F, L is applied only to

Using only arrays, write c program to do the following : -fill 2 dimensiona...

write c program to do the following : -fill 2 dimensional array (square matrix array with size=4). -ask the user to enter any integer number and add this number to the diagonals -o

Pro, i need to do my home work

i need to do my home work

Integration, to find the area under the curve y = f(x) between x = a and x ...

to find the area under the curve y = f(x) between x = a and x = b

Oop, evolutio of object oriented programing

evolutio of object oriented programing

Explain the array types, Array types An array is a collection of object...

Array types An array is a collection of objects of a one data type. The individual objects are accessed by their position in the array. This way of accessing is known as indexi

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