Write a C++ program that asks the user to enter the dollar amount of the opening
ID: 3647306 • Letter: W
Question
Write a C++ program that asks the user to enter the dollar amount of the opening balance of an account. Then the program should ask the user to enter the dollar amount of deposits to the account. Use the += operator to add the deposit amount to the opening balance. Next, ask the user the dollar amount of withdrawals from the account. Use the -= operator to subtract this from the opening balance. The program should display the balance dollar amount after each transaction with two decimals in total width of 10. Declare appropriate variables for the program. Need three variables: one for opening balance, second for deposit amount, and third for withdrawal amount.Explanation / Answer
Program with filing //*************************************************************** // HEADER FILE USED IN PROJECT //**************************************************************** #include #include #include #include #include //*************************************************************** // CLASS USED IN PROJECT //**************************************************************** class account { int acno; char name[50]; int deposit; char type; public: void create_account(); //function to get data from user void show_account(); //function to show data on screen void modify(); //function to get new data from user void dep(int); //function to accept amount and add to balance amount void draw(int); //function to accept amount and subtract from balance amount void report(); //function to show data in tabular format int retacno(); //function to return account number int retdeposit(); //function to return balance amount char rettype(); //function to return type of account }; //class ends here void account::create_account() { coutacno; coutdeposit; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.