What does this mean: This does not handle the end of month processing correctly. The monthly fee should only be deducted if the balance is below the minimum. Similarly, the interest should only be added if the balance is above the minimum. And it is a c++ assignment not a Java assignment

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
What does this mean: This does not handle the end of month processing correctly. The monthly fee should only be deducted if the balance is below the minimum. Similarly, the interest should only be added if the balance is above the minimum. And it is a c++ assignment not a Java assignment
12:09 a M
63%
= bartleby
E Q&A A 8
Engineering / Computer Engineeri... / Q&A Library / A
Absolute Requirements The Accoun...
ctith an initial ut FEtatacnt 1]ptanca rdl:
ie L (aperatsanty ste"H
Set 4:
Sat po
Sefie i
farant etatalkocant,
lid kece r ntla
out pited sont" into cet rindl:
Sat ;
doube anourt;
int p
Safie
baol tifaundfae;
Sfcne tr;
ceants (1)ithdrefemunt):
le sicea er
A i t t ePlera
c peratiant "lace"
intie
ST pa
baol tafend-falu
ant ttetelkece t
Dout"Carra balance in cent d la Erts piatance)na:
cat vle sucet r edi
(eraniat "clese
caut ind of novtt prececetrg corgleto"ordl;
tant 1etalkecant
islisihe
L ernt E
dart Sltatalsca, l-
accoanta1] stringt) ed
caut
RC engriet omend
npertientyp
string ie
t le, an
Saring
ther
Chinge . .H
500.0
Eelen
11 Mthim
ad ta
Output:
tas atd
II
Transcribed Image Text:12:09 a M 63% = bartleby E Q&A A 8 Engineering / Computer Engineeri... / Q&A Library / A Absolute Requirements The Accoun... ctith an initial ut FEtatacnt 1]ptanca rdl: ie L (aperatsanty ste"H Set 4: Sat po Sefie i farant etatalkocant, lid kece r ntla out pited sont" into cet rindl: Sat ; doube anourt; int p Safie baol tifaundfae; Sfcne tr; ceants (1)ithdrefemunt): le sicea er A i t t ePlera c peratiant "lace" intie ST pa baol tafend-falu ant ttetelkece t Dout"Carra balance in cent d la Erts piatance)na: cat vle sucet r edi (eraniat "clese caut ind of novtt prececetrg corgleto"ordl; tant 1etalkecant islisihe L ernt E dart Sltatalsca, l- accoanta1] stringt) ed caut RC engriet omend npertientyp string ie t le, an Saring ther Chinge . .H 500.0 Eelen 11 Mthim ad ta Output: tas atd II
M eting nuelinteresttate),
ww MS
men p w
Woclude dostream
2include fstrean
3 includecstring
4 using nanespace std;
6 class Account (
int id;
double balance
publies
Account ()
1d-0
balance-.0
21
12
14
Account (int newID, double initie1Balance){
id new10,
balance initialBalance,
15
16
17
18
19
20
21
veid set10(int neu0)(
id - newID:
void settalance(double initiallalance){
balance initialelance;
24
25
int get10)
return 1d:
26
27
28
29
deuble getsaiance()
return balance;
void withdraw(double amount)
balance balance ount;
32
34
35
void deposit(eouble aount)
balance - belance mount,
36
17
38
39
virtual void elosetonth()
virtual string accountstring() -
41
43 ).
44 class Savings publie Account{
double interest;
double inBalance;
46
47
48
public:
Savings()
49
se
void eloselenth()
double pre getalance():
52
$3
double nevalance - pre ((pre (interest/100.0))/12.0);
54
setsalance(newBalance);
56
string accountstring()
57
return "Saving accountr
to string(geti0())
has balance of ste string(getsalance());
void setInterest(double interest}{
thisinterest-interest;
64
void setMintalance(double wiHBalance)(
this mintalanceminsalance;
65
69 class Checking public Account{
double winBalance;
double monthlyree:
71
72 public:
73
Checking(){
74
void closekonth()
double nealance getalance()
setsalance(newialance);
76
77
sonthiyfe;
string accountsering()
81
82
83
return "Checking account + to string(getID()) +" has balance of s-to string(erttalance());
;
84
veid settonthlyFee(double monthlyFee){
this nonthlyFeenonthlyfee,
85
85
87
void settinalance(double sinielance){
this-intalance minsalance;
88
89
91
92
94 int main()(
Account ccounts = new Account [10];
ifstrean infile;
infile.open("bank2.txt"):
i( antile)
cerr "File cannont be opened « endl;
else
cout "File Opened"endl;
string aperationType,
int tetalaccount-
hile(infile operationType)
95
96
97
86
98
99
100
101
182
184
105
it(operationtype "Savings"H
int id;
double initialbalance,ininualance annualInterestRate
infile id initialBalance
186
107
108
minimunsalance annualInterestRate;
109
Savings "savingACCount
sevingiccount setinterest(ennualinteresttate),
savingke count-setNinbalance(minimunialance);
accounts(totalAccount) - savingaccount;
accounts(totalAccount)-setID(ie);
accounts(totalAccount] settalance(initialBalance),
tetalaccounti
cout eSaving account nunber "totalccount e created"cendl;
coutwith an initial balance of Saccounts(totalAccount 1)-getBalance()endl.
110
new Savings().
113
114
116
117
118
119
120
121
else (operationType == "Checking"){
int id:
double initial8alance,inimuntalance, monthlyfees;
infile ie initialsalance s inimualance onthlyFees:
Checking checkingaccount = new Checking().
checkingaccountsetkonthlyfee(eonthiyfees),
checkingiccountsetkinbalance(sinimunbalance),
accounte(tetalaccount) checkingaccount;
accounts(totalAccount]-setID(ie):
accounts(totalAccount) setsalance(initialBalance):
totalaccount
122
123
124
125
126
127
128
129
130
132
133
Cout e"Checking account nunber "ctotalAccount « created"<cendl;
coutewith an initial balance of saccounts(totalAccount-1)-gettalance()endl;
Transcribed Image Text:M eting nuelinteresttate), ww MS men p w Woclude dostream 2include fstrean 3 includecstring 4 using nanespace std; 6 class Account ( int id; double balance publies Account () 1d-0 balance-.0 21 12 14 Account (int newID, double initie1Balance){ id new10, balance initialBalance, 15 16 17 18 19 20 21 veid set10(int neu0)( id - newID: void settalance(double initiallalance){ balance initialelance; 24 25 int get10) return 1d: 26 27 28 29 deuble getsaiance() return balance; void withdraw(double amount) balance balance ount; 32 34 35 void deposit(eouble aount) balance - belance mount, 36 17 38 39 virtual void elosetonth() virtual string accountstring() - 41 43 ). 44 class Savings publie Account{ double interest; double inBalance; 46 47 48 public: Savings() 49 se void eloselenth() double pre getalance(): 52 $3 double nevalance - pre ((pre (interest/100.0))/12.0); 54 setsalance(newBalance); 56 string accountstring() 57 return "Saving accountr to string(geti0()) has balance of ste string(getsalance()); void setInterest(double interest}{ thisinterest-interest; 64 void setMintalance(double wiHBalance)( this mintalanceminsalance; 65 69 class Checking public Account{ double winBalance; double monthlyree: 71 72 public: 73 Checking(){ 74 void closekonth() double nealance getalance() setsalance(newialance); 76 77 sonthiyfe; string accountsering() 81 82 83 return "Checking account + to string(getID()) +" has balance of s-to string(erttalance()); ; 84 veid settonthlyFee(double monthlyFee){ this nonthlyFeenonthlyfee, 85 85 87 void settinalance(double sinielance){ this-intalance minsalance; 88 89 91 92 94 int main()( Account ccounts = new Account [10]; ifstrean infile; infile.open("bank2.txt"): i( antile) cerr "File cannont be opened « endl; else cout "File Opened"endl; string aperationType, int tetalaccount- hile(infile operationType) 95 96 97 86 98 99 100 101 182 184 105 it(operationtype "Savings"H int id; double initialbalance,ininualance annualInterestRate infile id initialBalance 186 107 108 minimunsalance annualInterestRate; 109 Savings "savingACCount sevingiccount setinterest(ennualinteresttate), savingke count-setNinbalance(minimunialance); accounts(totalAccount) - savingaccount; accounts(totalAccount)-setID(ie); accounts(totalAccount] settalance(initialBalance), tetalaccounti cout eSaving account nunber "totalccount e created"cendl; coutwith an initial balance of Saccounts(totalAccount 1)-getBalance()endl. 110 new Savings(). 113 114 116 117 118 119 120 121 else (operationType == "Checking"){ int id: double initial8alance,inimuntalance, monthlyfees; infile ie initialsalance s inimualance onthlyFees: Checking checkingaccount = new Checking(). checkingaccountsetkonthlyfee(eonthiyfees), checkingiccountsetkinbalance(sinimunbalance), accounte(tetalaccount) checkingaccount; accounts(totalAccount]-setID(ie): accounts(totalAccount) setsalance(initialBalance): totalaccount 122 123 124 125 126 127 128 129 130 132 133 Cout e"Checking account nunber "ctotalAccount « created"<cendl; coutewith an initial balance of saccounts(totalAccount-1)-gettalance()endl;
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY