Define a class ‘merchant’ for handling merchant-like objects. The class should
have a public interface with the following members.
merchant — a parameterless constructor initializing to 1000 the number
of items each merchant possesses.
sell — a two-parameter function transferring a specified number of items
to a specified merchant. The function should not put any restriction on
the order of its input values.
buy — a two-parameter function transferring a specified number of items
from a specified merchant. The function should not put any restriction on
the order of its input values.
balance — a parameterless function which writes out the number of items
in the possession of its merchant.
Notes.
Submit your source file ‘merchant.cpp’ with the ‘submit c230aa lab4merchant.cpp’ command.
Use the following function in the submitted program.
int main(){ merchant a, b, c; a.sell(50,b); a.sell(c,50); c.buy(70,b); a.balance(); b.balance(); c.balance(); reurn 0; }