Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

programming 2 (C++) please write the codes CLEARLY, with the input/output The class Medicine has the private data members name, disease of type string, dosage

programming 2 (C++)
please write the codes CLEARLY, with the input/output
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 main0 \{ Medicine mQng. mTwe; mQueseto; mQneprinto: mTwe = mane extraMedicine ; mive.printo; return 0 3 Sample input/output: Enter the name of the medicine: Panadol Enter the disease name: Headache Enter the dosage: 10 Enter the price: 13 The name of the medicine is: Panadol The disease name is: Headache The dosage is: 10 The price is: 13 The name of the medicine is: PanadolExtra The disease name is: 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_2

Step: 3

blur-text-image_3

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

write in c programming

Answered: 1 week ago

Question

The Nature of Nonverbal Communication

Answered: 1 week ago

Question

Functions of Nonverbal Communication

Answered: 1 week ago

Question

Nonverbal Communication Codes

Answered: 1 week ago