Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please follow all steps: PLEASE PUT THE CODE TO COPY In this assignment, you will need to implement a base class Account and derived

C++ please follow all steps: PLEASE PUT THE CODE TO COPY

In this assignment, you will need to implement a base class Account and derived classes Savings and Checking. In the base class, provide member functions deposit, withdraw and daily_interest that computes and adds the daily interest to the balance. For calculations, assume that every month has 30 days. Checking accounts yield interest of 3 percent monthly on balances over $1,000. Savings accounts yield interest of 6 percent monthly on the balance.

Write a test program (main()) that makes a months worth of deposits and withdrawals and adds interest every day. To be specific, your test program must meet the following requirements.

- Create one checking and one saving account with dynamic memory allocation and delete them when they are not used any more. Note that a bank account is created with an initial balance.

- Use a random number generator to generate an amount for daily deposit or withdrawal. The amount should be ranged from $1 to $5000, both inclusive. Do not forget seeding the random number generator with the current system time.

- Update the balances of the two accounts by applying their respective daily interest.

- After a month of 30 days, display the balances of each account.

- Display the number of accounts that have been created.

- Comment on each logical block in the main(), so the reader of your program can quickly follow your program.

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

1. What are your creative strengths?

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago