22 lines
543 B
C++
22 lines
543 B
C++
|
// usestok0.cpp -- the client program
|
||
|
// compile with stock.cpp
|
||
|
#include <iostream>
|
||
|
#include "stock00.h"
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
Stock fluffy_the_cat;
|
||
|
fluffy_the_cat.acquire("NanoSmart", 20, 12.50);
|
||
|
fluffy_the_cat.show();
|
||
|
fluffy_the_cat.buy(15, 18.125);
|
||
|
fluffy_the_cat.show();
|
||
|
fluffy_the_cat.sell(400, 20.00);
|
||
|
fluffy_the_cat.show();
|
||
|
fluffy_the_cat.buy(300000,40.125);
|
||
|
fluffy_the_cat.show();
|
||
|
fluffy_the_cat.sell(300000,0.125);
|
||
|
fluffy_the_cat.show();
|
||
|
// std::cin.get();
|
||
|
return 0;
|
||
|
}
|