Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please code in C++ NOTE: Minimum requirement to qualify for grading: 1) Code must be properly indented, modularized and follows the best practices. Account Project

Please code in C++

NOTE: Minimum requirement to qualify for grading: 1) Code must be properly indented, modularized and follows the best practices. Account Project (A bank account has methods to deposit, withdraw, and check the balance.) (100 points) 1. The program contains 3 main variables called accountBalance, accountName and accountNum. Choose appropriate data types for these variables 2. initializes the accountName with the parameter specified. The member variables accountBalance and accountNum are assigned some random value (No need to use rand function). 3. The program will contain member functions named menu, withdraw, and deposit The withdraw function checks to see if balance is sufficient for withdrawal. If so, decrements balance by amount; if not, prints an appropriate message indicating insufficient funds and displays the current balance. The deposit function adds deposit amount to balance and displays new balance The menu function will contain the following menu options: 1. Check Balance, 2. Deposit Amount, 3. Withdraw Amount, 4. Exit. Use appropriate messages for each option selected and then call the correct function to perform the task. Output: Welcome to the Bank Account program Here is your Initial Account Information: Account for: Helen Account #: 123456 Balance: $187.5 ************************ Menu ************************ 1. Check Balance 2. Deposit Amount 3. Withdraw Amount 4. Exit Please make a selection: 8 ERROR: Invalid choice. Please try again !!! ************************ Menu ************************ 1. Check Balance 2. Deposit Amount 3. Withdraw Amount 4. Exit Please make a selection: 1 Here is the account Information: Account for: Helen Account #: 123456 Balance: $187.5 ************************ Menu ************************ 1. Check Balance 2. Deposit Amount 3. Withdraw Amount 4. Exit Please make a selection: 2 Enter the amount you want to deposit: 50 Depositing $50 to Acc# 123456 Your new balance is now $237.5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions

Question

How was their resistance overcome?

Answered: 1 week ago

Question

What attracts you about this role?

Answered: 1 week ago

Question

How many states in India?

Answered: 1 week ago

Question

HOW IS MARKETING CHANGING WITH ARTIFITIAL INTELIGENCE

Answered: 1 week ago

Question

Different types of Grading?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago