![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 06.06.2020 07:00, am561740
Convert the follwoing code into a object-oriented programming (OOP) application using secure and efficient C++ code.
#include
#include
using namespace std;
int main()
{
float inital_Inv;
float month_Dep;
float annual_Int;
float num_Years;
float total_Ammt;
float int_Amunt;
float year_Inest;
try {
cout << "" << endl;
cout << "Data Input" << endl;
cout << "Initial Investment Amount: $ ";
cin >> inital_Inv;
cout << "Monthly Deposit: $ ";
cin >> month_Dep;
cout << "Annual Interest: % ";
cin >> annual_Int;
cout << "Number of years: ";
cin >> num_Years;
}
catch (float x) {
}
total_Ammt = inital_Inv;
cout << "\tBalance and Interest Without Additional Monthly Deposits" << endl;
cout << "" << endl;
cout << "Year\t\tYear End Balance\tYear End Earned Interest" << endl;
cout << "" << endl;
for (int i = 0; i < num_Years; i++) {
int_Amunt = (total_Ammt) * ((annual_Int / 100));
total_Ammt = total_Ammt + int_Amunt;
cout << (i + 1) << "\t\t" << fixed << setprecision(2) << "$" << total_Ammt << "\t\t\t\t" << "$" << int_Amunt << "\n";
}
total_Ammt = inital_Inv;
cout << "\n\n\tBalance and Interest With Additional Monthly Deposits\n";
cout << "\n";
cout << "Year\t\tYear End Balance\tYear End Earned Interest\n";
cout << "\n";
for (int i = 0; i < num_Years; i++) {
year_Inest = 0;
for (int j = 0; j < 12; j++) {
int_Amunt = (total_Ammt + month_Dep) * ((annual_Int / 100) / 12);
year_Inest = year_Inest + int_Amunt;
total_Ammt = total_Ammt + month_Dep + int_Amunt;
}
cout << (i + 1) << "\t\t" << fixed << setprecision(2) << total_Ammt << "\t\t\t\t" << year_Inest << "\n";
}
return 0;
}
![answer](/tpl/images/cats/otvet.png)
Answers: 3
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 22:00, robert7248
Competent nonverbal communication involves interacting with others in a manner that is appropriate for which of the following? select all that apply. situation task individuals
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 11:00, swelch2010
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 21:30, jayybrain6337
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
Do you know the correct answer?
Convert the follwoing code into a object-oriented programming (OOP) application using secure and eff...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/informatica.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/ekonomika.png)