Write a program of constructors and destructors, C/C++ Programming

Assignment Help:

Write a program of constructors and destructors

Make a class drugs having encapsulated data for medicine name, whether solid or liquid, price and purpose of use. From this class derive two classes, Ayurvedic and Allopathic. The class Ayurvedic should additionally store data on the herbs used, association to be used (whether honey or water). The class Allopathic should additionally include data on the chemicals used and the weight in milligrams. The classes should have constructors and destructors. They should contain functions to accept data and display the data. The main () should test the derived classes.

 


Related Discussions:- Write a program of constructors and destructors

Create complex number using constructor , Create Complex number using const...

Create Complex number using constructor: class complex                                 {                                                   private:

Overloading unary operators, Overloading Unary Operators class sign ...

Overloading Unary Operators class sign {int a,b,c; public: sign(){}; sign(int,int,int); void putdata(void); void operator-(); }; void sign::operator-() {a=

C program to demonstrate pointer to array, C program to demonstrate Pointer...

C program to demonstrate Pointer to array: void p2a(int *); void main() {                 int x=10, *a,**b;                 int arr[5];                 a=&x;//po

Advanced features of c, We are now quite happy to use the basic mathematica...

We are now quite happy to use the basic mathematical expressions, however in engineering we use scientific functions i.e Sin , Cos  , ln etc . Within C we have the following functi

Write a program that finds the minimum total number of she., Write a progra...

Write a program that finds the minimum total number of shelv, C/C++ Programming

Iteration problem, my program does not run more than 9 iterations when ever...

my program does not run more than 9 iterations when ever i want to iterate more than 100 iterations. what is the reason and how to tackle?

Write a program read words from file, Write a program IdentyfyWordsMain.jav...

Write a program IdentyfyWordsMain.java reading a fi le (like HistoryOfProgramming) and divide the text into a sequence of words (word=sequence of letters). Save the result in a new

Program that calculates bowling scores, Homework – Chapter 5 – Bowling Scor...

Homework – Chapter 5 – Bowling Scores 33. Write a complete C++ program to do the following: The main program reads in and prints three bowling scores, score1, score2, and score

Explain multilevel inheritance, Multilevel Inheritance In multilevel in...

Multilevel Inheritance In multilevel inheritance there is a parent class , from whom we derive another class . now from this derived class we can derive another class and so on

Stack, flow chart for push operation in stack

flow chart for push operation in stack

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