Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming 2 (C++) Please write the code clearly from the compilre The class Medicine has the private data members name, disease of type string, dosage

Programming 2 (C++)
Please write the code clearly from the compilre
image text in transcribed
The class Medicine has the private data members name, disease of type string, dosage of type integer, and price of type float. The class also has the following public member functions: Implement the class and its member functions. Use the following main program: int main( Medicine mOne, mTwo; mOne.set(); mOne.print () ; m Two =mOne.extraMedicine(); mTwo.print O; return 0 ; Sample input / output: Enter the nane of the medicine:-Panadol Enter the disease name: Headache Enter the dosage: 1e Enter the price: 13 The name of the medicine is: Panadol The disease name is: Headache The dosage 1s: 16 The price is; 13 The name of the medicine is: Panadolfxtra The disease nane Ist Headache. The dosage is: 13 The price is: 16.25

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

Was there an effort to involve the appropriate people?

Answered: 1 week ago

Question

18. If you have power, then people will dislike and fear you.

Answered: 1 week ago