Question
Python programming private int data field named id for the account. private float data field balance private float data field annualInterestRate that stores the current
Python programming
private int data field named id for the account.
private float data field balance
private float data field annualInterestRate that stores the current interest rate
a constructor that creates an account with the specified id (default 0), initial balance (default 100), and an annual interest rate (default 0)
the accessor and mutator methods for id, balance, and annualInterestRate
a method named getMonthlyInterestRate() that returns the monthly interest rate
a method named getMonthlyInterest() that returns the monthly interest
a method name withdraw that withdraws a specified amount from the account
a method named deposit that deposits a specified amount to the account
draw the uml diagram for the class, and then impelement 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 of withdraw $2,500, use the deposit method to deposit $3,000, and print the id, balance, monthly interest rate, and monthly interest.
Step 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