Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON Question. Design a class named Account that contains: - A private data field named id, balance, annual_interest_rate for the account (default is 0 ).
PYTHON Question.
Design a class named Account that contains: - A private data field named id, balance, annual_interest_rate for the account (default is 0 ). - Assume all accounts have the same interest rate. (one variable shared by all instances of this class) - A private Date data field named date_created that stores the date when the account was created. - A constructor that creates an account with the specified id, initial balance (default is 0 ) and date_created (default is current date). - The accessor/get and mutator/set methods for id, balance, and annual_interest_rate. - The accessor/get method for date_created. - A method named get_monthly_interest_rate() that returns the monthly interest rate. (just annual interest rate divided by 12 ) - A method named get_monthly_Interest() that returns the monthly interest. - A method named withdraw that withdraws a specified amount from the account. - A method named deposit that deposits a specified amount to the account. - _-_str_ method to print the string representation of the class Write a test program that creates an Account object with an account ID of 1122, a balance of $20,000, and an annual interest rate of 4.5%. Use the withdraw method to withdraw $2,500, use the deposit method to deposit $3,000, and print the balance, the monthly interest, and the date when this account was createdStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started