CS计算机代考程序代写 #define _CRT_SECURE_NO_WARNINGS

#define _CRT_SECURE_NO_WARNINGS
#include
#include “Account.h”

using namespace std;
namespace sdds {
void Account::setEmpty() {
m_number = -1;
m_balance = 0.0;
}
// New account
Account::Account() {
m_number = 0;
m_balance = 0.0;
}
Account::Account(int number, double balance ) {
setEmpty();
if (number >= 10000 && number <= 99999 && balance > 0) {
m_number = number;
m_balance = balance;
}
}
std::ostream& Account::display() const{
if (*this) {
cout << " "; cout << m_number; cout << " | "; cout.width(12); cout.precision(2); cout.setf(ios::right); cout.setf(ios::fixed); cout << m_balance; cout.unsetf(ios::right); cout << " "; } else if(~*this) { cout << " NEW | 0.00 "; } else { cout << " BAD | ACCOUNT "; } return cout; } }