Prg420 Java Programming I

Topics: Mutator method, Object-oriented programming, Subroutine Pages: 2 (372 words) Published: September 30, 2012
* You are a bank manager and you are helping a new bank teller understand the kind of *
* accounts the bank offers. If a customer comes in asking to open a new savings account, the *
* teller needs to ask what kind of account—passbook savings or certificate of deposit—the *
* customer would like to open. Remind the customer that all accounts with our bank are *
* insured by the FDIC. You should explain that all accounts earn some interest; a savings *
* account’s interest is compounded monthly. You should assign a unique account number after *
* accepting the customer’s initial deposit. If the customer chooses to receive statements *
* electronically, the system will send an e-mail with a monthly statement; if the customer *
* chooses not to, then a paper statement will be sent by mail quarterly.

* If savings account is a class, give an example of each of the following as it relates to that *
* savings account. Explain your reasoning behind your example. *
Instance (object)

Superclass – Savings Account can be a super class. It can be used to hold the generic attributes of a savings account like account number, insured by FDIC flag etc. *
Subclass – Passbook Savings and Certificate Of Deposit can be specialized subclasses of Savings Account. A subclass inherits the capabilities of superclass and can add specialized behavior as needed. A Passbook Savings class can override the way interest is calculated if needed. A Certificate Of Deposit can add attribute for early termination fee. *

Attribute – account Number, interest Rate, electronic Statement, email Address etc. are examples of attributes present in Savings Account class *
Method – calculate Interest, send Statement, deposit, withdraw etc. are example of methods present in savings account class. *
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • JAVA Essay
  • Essay about Java Programming I Exam
  • Java Programming Essay
  • Java Programming- Chinmay Essay
  • Java Programming Essay
  • Essay on Java Programming
  • Java Essay

Become a StudyMode Member

Sign Up - It's Free