📄 cashregisterimp.cpp
字号:
//Implementation file cashRegisterImp.cpp
//This file contains the definitions of the functions to
//implement the operations of the class cashRegister
#include <iostream>
#include "cashRegister.h"
using namespace std;
int cashRegister::getCurrentBalance() const
{
return cashOnHand;
}
void cashRegister::acceptAmount(int amountIn)
{
cashOnHand = cashOnHand + amountIn;
}
cashRegister::cashRegister(int cashIn)
{
if (cashIn >= 0)
cashOnHand = cashIn;
else
cashOnHand = 500;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -