Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use C++. use the following to save date as an int number #include time_t t = time(NULL); struct tm now; localtimes (&now, &t); int

Please use C++.

image text in transcribedimage text in transcribedimage text in transcribed

use the following to save date as an int number #include time_t t = time(NULL); struct tm now; localtimes (&now, &t); int today (now.tm-year + 1900) * 10000 + (now.tn_mon + 1) * 100 + (now .tn_mday); if you are coding in xcode use the following instead #include time > time_t t time (e); struct tm* nowlocaltime (&t); int today (now->tm_year + 1900) * 10000 + (now->tm mon + 1) * 100 + (now-tm-mday): * Create a class that will store your back account balance information * Your class should have the following member variables (class data) 1. balance - to store the amount of money you have in your account 2. interestRate - to store the rate you get interest 3. lastInterestDate - to store the last date you have got your interest - handle as you think would work for vouu * real date as string, a number 20190101, * your class should have the following member functions (method) 1. setBalance - gets a double argument as the balance 2. increaseBalanceBy - gets a double argument and adds it to the balance 3. setInterestRate - gets a double argument and sets the interest rate to it It should be between O and 1 4. addInterest - calculates the amount of interest and adds it to balance .Consider the last interest - You should pay interest only once in each month (30 days) * If you end up paying interest, update lastInterestDate 5. getBalance - returns the balance amount 6. getInterestRate - returns the interest rate 7. getLastInterestDate - returns the lastlnterestDate 8. info - prints the information of the account Balance: $0000.0 Interest Rate: %0 Last Interest Payed on: MM/DD/YYYY Or any other format that you like - . - - ** your class should have the following constructors: 5. default constructor 6. one that gets input for balance and interest rate o default value for class data should be: balance -0.0 interestRate-0.0 lastInterestDate 0, 000/00/00, Depends on what you decide as the type * write a program that uses this class o create an account using default constructor o print the account information o add balance and interestRate to it o print the account information o add interest to the account o print the account information o try to add interest one more time o print the account information o create an account using general constructor with balance and interest rate o print the account information

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 And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions