This is a program in c++ which is implemented using some of the concepts of oops.Anyhow, it is not predicting the proper output.Hence, check whether there are some bugs and if you find any bugs clear it and repost the code with explanation.
There are some bugs in the basic concepts of oops.Identify it and clear it.
Attachment your code here.
debug.txt (Size: 606 bytes / Downloads: 64)
Fear is a reaction,but courage is a destination