Create an addition operator for the compound class so that


Question: Consider a specific type of chemical reaction that takes in two compounds and returns a new compound. Design a class called Compound with fields for the name of the compound (such as hydrochloric acid) and chemical formula of the compound (HCl). Create an addition operator for the compound class so that when you add two compounds, you get a new one. In the operator function, just print a string indicating the two compounds being added.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create an addition operator for the compound class so that
Reference No:- TGS02478828

Now Priced at $15 (50% Discount)

Recommended (96%)

Rated (4.8/5)