forked from Syntax-Error/TradeSim
Added Currency class
This commit is contained in:
parent
5d8763c10c
commit
08e2a8568a
2 changed files with 27 additions and 0 deletions
11
src/Currency.cpp
Normal file
11
src/Currency.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include "Currency.h"
|
||||
|
||||
const std::string &Currency::getName() const {
|
||||
return name;
|
||||
}
|
||||
|
||||
const std::string &Currency::getSymbol() const {
|
||||
return symbol;
|
||||
}
|
||||
|
||||
Currency::Currency(const std::string &name, const std::string &symbol) : name(name), symbol(symbol) {}
|
16
src/Currency.h
Normal file
16
src/Currency.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef TRADESIM_CURRENCY_H
|
||||
#define TRADESIM_CURRENCY_H
|
||||
#include <string>
|
||||
|
||||
class Currency {
|
||||
std::string name;
|
||||
std::string symbol;
|
||||
public:
|
||||
const std::string &getName() const;
|
||||
const std::string &getSymbol() const;
|
||||
|
||||
Currency(const std::string &name, const std::string &symbol);
|
||||
};
|
||||
|
||||
|
||||
#endif //TRADESIM_CURRENCY_H
|
Loading…
Reference in a new issue