Problem: Create the class on the UML class diagram. Account + balance: double interest: double + owner: String +id:int + withdrawal(double amount): double + deposit(double amount): double + calculateNextAmount():double While creating your class: 1) Write the class according to the UML class digram. 2) Encapsulate balance,interest, owner and id values. 3) Create getter, setters for balance and interest. Not for id and customer. So, owner and id will only be obtained while creating the objects.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%
Problem: Create the class on the UML class diagram.
Account
+ balance: double
+ interest: double
+ owner: String
+id:int
+ withdrawal(double amount): double
+ deposit(double amount): double
+ calculateNextAmount():double
While creating your class:
1) Write the class according to the UML class digram.
2) Encapsulate balance,interest, owner and id values.
3) Create getter, setters for balance and interest. Not for id and customer. So, owner and
id will only be obtained while creating the objects.
4) Create constructor for the class.
In your main program:
5) Create 5 account objects.
6) Withdraw some amount of Money from the accounts and inform the user about the
new amount. If there is no enough Money, user should be informed. (Make validation)
7) Deposit some amount of Money to the accounts. Inform the user about new amount.
8) Calculate new amount of Money for the accounts one year later and write to console.
Transcribed Image Text:Problem: Create the class on the UML class diagram. Account + balance: double + interest: double + owner: String +id:int + withdrawal(double amount): double + deposit(double amount): double + calculateNextAmount():double While creating your class: 1) Write the class according to the UML class digram. 2) Encapsulate balance,interest, owner and id values. 3) Create getter, setters for balance and interest. Not for id and customer. So, owner and id will only be obtained while creating the objects. 4) Create constructor for the class. In your main program: 5) Create 5 account objects. 6) Withdraw some amount of Money from the accounts and inform the user about the new amount. If there is no enough Money, user should be informed. (Make validation) 7) Deposit some amount of Money to the accounts. Inform the user about new amount. 8) Calculate new amount of Money for the accounts one year later and write to console.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY