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.
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
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.
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.
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.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education