$24
Implement MyAccount4 class as specified in the UML diagram below.
Make sure you use the methods, arguments, and the return types exactly as specified in the UML.
Create a driver (a class with a main method) to create objects of MyAccount4 class and invokes its methods. You may name it MyAccount4Tester.
Make sure you document your class, methods, and code.
Attach (do not turn in any hardcopy) via BlazeView the following items:
A single typed page with your name, class, date, and program title. The report (named MyReport4) should include what you learned from the programming assignment, problems faced, skills learned, and your observations. Also, append to your report the following fill in self-evaluation:
Have you documented your MyAccount4 class: _____?
Have you documented its methods: _______?
Is your program well structured, aligned, indented, and easy to read: _____?
Does your class MyAccount4 compile without syntax errors: ___________?
Does your driver program run without runtime errors: ___________?
Does your program run without logical errors: ___________?
Even though I will use my own driver to test your MyAccount4, You need to submit you MyAccount4, MyAccount4Tester, and report.
Zip all your files into single one. Name it with your last name followed by the program#. For example, Fares4.
Implement the UML diagram below.
MyAccount4
Documentation
//Instance Variables (name followed by type)
-name: String
- accountNumber:long
-balance:double
-dateCreated:Date
Owner’s name
Account Number
Account Balance
Date of account created
//Constructors & methods (name followed by type)
+MyAccount4()
+MyAccount4(owner:String, accountNumber:long,
balance:double)
//Getters & Setters
+getName():String
+getAccountNumber():long
+getBalance():double
+setName(name:String):void
+deposit(amount:double):void
+withdraw(amount:double):void
+toString():String
The no-argument constructor assigns “Unknown” to name, 99999 to accountNumber, 0 to balance, and get the date from the system
The overloaded constructor assigns owner to name, account Number to accountNumber, balance to balance, and get the date from the system
Returns the owner’s name
Returns the account number
Returns the balance
Updates the name
Adds deposit amount to balance
Subtracts withdrawal from balance
Returns name, account number, balance, and date created. Make sure you include labels and print them on separate lines with appropriate indentions and alignment.