in java Write the Account class. The UML diagram of the class is represented below Requirements :a. Implement the class strictly according to its UML one-to-one (do not include anything extra, do not miss any data fields or methods) b. Add comments to your program (mark where data fields, constructors, getters, setters and toString() are) c. You can use the automatic generation approach for Getters, setters and toString() inEclipse. d. In getMonthlyInterestRate(), please return the monthly interest rate. DO NOT leave this method body blank! e. In getMonthlyInterest(), please returns the monthly interest (NOT THE INTEREST RATE), DO NOT leave this method body blank! f. In deposit() method, please deposit a specified amount to the account (Hint: balance += depositAmount). DO NOT leave this method body blank! g. In withdraw() method, please withdraw a specified amount from the account (Hint: balance -= withdrawAmount). DO NOT leave this method body blank! h. Please use decimal to represent the annual interest rate. Example: if the annual interest rate is 2%, please use 0.02 in the annualInterestRate data field.   HINT: a. Monthly interest is balance * Monthly Interest Rate. b. Monthly Interest Rate is Annual Interest Rate / 12. c. Example, if the balance is $1,000 and the annual interest rate is 0.02, the monthly interest rate is 0.02 / 12 = 0.001666666666667 and the monthly interest is 1000 * 0.02 / 12 = 1.666666666666667. d. When create dataCreated, use: private java.util.Date dateCreated = new java.util.Date(); 3. : create a AccountTest class in another .jave file to test the class Account you just created  Requirements: a. Create an object of Account class with an account ID of 1122, a balance of $20,000, object name is Account1. b. Set the annualInterestRate to 0.045 using the setter of annualInterestRate. c. Use the withdraw() method to withdraw $2,500 d. Print the balance, the monthly interest, and the date.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

in java

Write the Account class. The UML diagram of the class is represented below

Requirements

:a. Implement the class strictly according to its UML one-to-one (do not include anything extra, do not miss any data fields or methods)

b. Add comments to your program (mark where data fields, constructors, getters, setters
and toString() are)
c. You can use the automatic generation approach for Getters, setters and toString() inEclipse.
d. In getMonthlyInterestRate(), please return the monthly interest rate. DO NOT leave this
method body blank!
e. In getMonthlyInterest(), please returns the monthly interest (NOT THE INTEREST RATE),
DO NOT leave this method body blank!
f. In deposit() method, please deposit a specified amount to the account (Hint: balance +=
depositAmount). DO NOT leave this method body blank!
g. In withdraw() method, please withdraw a specified amount from the account (Hint:
balance -= withdrawAmount). DO NOT leave this method body blank!
h. Please use decimal to represent the annual interest rate. Example: if the annual interest
rate is 2%, please use 0.02 in the annualInterestRate data field.  
HINT:
a. Monthly interest is balance * Monthly Interest Rate.
b. Monthly Interest Rate is Annual Interest Rate / 12.
c. Example, if the balance is $1,000 and the annual interest rate is 0.02, the monthly
interest rate is 0.02 / 12 = 0.001666666666667 and the monthly interest is 1000 * 0.02 /
12 = 1.666666666666667.
d. When create dataCreated, use: private java.util.Date dateCreated = new
java.util.Date();


3. : create a AccountTest class in another .jave file to test the class Account
you just created 

Requirements:
a. Create an object of Account class with an account ID of 1122, a balance of $20,000,
object name is Account1.
b. Set the annualInterestRate to 0.045 using the setter of annualInterestRate.
c. Use the withdraw() method to withdraw $2,500
d. Print the balance, the monthly interest, and the date.

Untitled document - Google Doc x
← → C
Help
K
39°F
Cloudy
Assignment 3: Classes and Object x b My Questions | bartleby
kean.instructure.com/courses/12224/assignments/56661
< Previous
Account
- id: int = 0
- balance: double = 0
- annualInterestRate: double = 0.02
- dateCreated: java.util.Date
+ Account()
+ Account(id: int, balance: double)
+ getId(): int
+ setId(newId: int): void
+ getBalance(): double
+ setBalance(newBalance: double): void
+ getAnnualInterestRate(): double
+ setAnnualInterestRate(newRate: double): void
+ toString(): String
+ getDataCreated: java.util.Date
+ getMonthlyInterestRate(): double
+ getMonthlyInterest(): double
+ deposit(depositAmount: double): void
+ withdraw(withdrawAmount: double): void
▬▬▬
▬▬▬
O Search
X
a
C Provide answers to the following x +
Aa
G✩
R
Submit Assignment
1x O
Next >
9:36 PM
2/22/2023
X
:
Transcribed Image Text:Untitled document - Google Doc x ← → C Help K 39°F Cloudy Assignment 3: Classes and Object x b My Questions | bartleby kean.instructure.com/courses/12224/assignments/56661 < Previous Account - id: int = 0 - balance: double = 0 - annualInterestRate: double = 0.02 - dateCreated: java.util.Date + Account() + Account(id: int, balance: double) + getId(): int + setId(newId: int): void + getBalance(): double + setBalance(newBalance: double): void + getAnnualInterestRate(): double + setAnnualInterestRate(newRate: double): void + toString(): String + getDataCreated: java.util.Date + getMonthlyInterestRate(): double + getMonthlyInterest(): double + deposit(depositAmount: double): void + withdraw(withdrawAmount: double): void ▬▬▬ ▬▬▬ O Search X a C Provide answers to the following x + Aa G✩ R Submit Assignment 1x O Next > 9:36 PM 2/22/2023 X :
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Development strategies
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education