Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

Requirement:

  • A private int data field named accountNum for the account (default 0).
  • A private string data field named accountName for the account (default "none").
  • A private double data field named balance for the account (default 0).
  • A private int data field named numTransactions that will count the number of deposit and withdraw transactions made to an account.
  • A private Date data field named dateCreated that stores the date when the account was created.
  • A no-arg constructor that creates a default account.
  • A constructor that creates an account with the specified account number and name.
  • The accessor and mutator methods for account number, name. 
  • The accessor method for balance and dateCreated. 
  • A method named withdraw that withdraws a specified amount from the account.
  • A method named deposit that deposits a specified amount to the account.
  • A method named displayAccountInfo that displays all the information in the Account object.
  • A method named combine that takes another Account object as an argument and adds up balances and number of transactions to current Account object.

"Test.java" and below output is expected:

Account num: 1122
Account name: my checking account
Balance: 1100.0 USD
4 transactions since created at Thu Jul 06 12:55:20 PDT 2023

Account num: 1133
Account name: my savings account
Balance: 12000.0 USD
2 transactions since created at Thu Jul 06 12:55:21 PDT 2023

Account num: 1190
Account name: my all money at the bank
Balance: 13100.0 USD
6 transactions since created at Thu Jul 06 12:55:20 PDT 2023
 
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education