Results 1 to 11 of 11
  1. #1
    jganer is offline Member
    Join Date
    Sep 2013
    Posts
    2
    Rep Power
    0

    Default Need help with object Terminology

    I'm teaching myself Java and I'm totally stumped and lost with one of the questions in the book. I'll list the question below:

    "You are a teller at a bank. A customer has come in asking to open a savings
    account ó just one of the many kinds of accounts that you handle. After determining that the customer wants a passbook savings rather than a certificate of
    deposit, you remind the customer that all accounts are FDIC insured. You assign
    a unique account number and accept the customerís initial deposit. You explain
    that while all accounts earn some form of interest, this specific savings account is
    compounded quarterly. The interest will appear automatically on the monthly
    statement. The customer now can deposit and withdraw from the account."

    Now after reading the above statement, it wants my to answer the following questions.

    If savings account is the object, give an example of each of the following as it
    relates to that savings account.

    1. superclass-
    2. subclass -
    3. attribute-
    4. method -
    5. instance-
    6. trigger-
    7. event-
    8. inheritance-
    9. encapsulation -
    10. polymorphism-

    so far I've nothing can somebody help me?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default Re: Need help with object Terminology

    You have to be a bit of a 'language lawyer'; a bank deals with Accounts (they don't sell bananas); the Account class (or probably it's an interface) is the 'mother of all classes' w.r.t. accounts; it's a super class for several other classes. The story says that "this particular savings account etc."; it means that there are also other types of saving accounts and there are (most likely non-saving account).

    So far we have this class hierarchy:

    Java Code:
    public class (interface?) Account { ... }
    public class NormalAccount extends Account { ... }
    public class SavingsAccountt extends Account { ... }
    public class PassbookSavingsAccountt extends SavingsAccount { ... }
    Except for the first class, all the other classes are (in)direct sub classes thereof (see the last class). I leave it to you to fill in the dots ( ... ) but this should get you started.

    kind regards,

    Jos
    Last edited by JosAH; 09-04-2013 at 10:57 AM.
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,848
    Rep Power
    5

    Default Re: Need help with object Terminology

    you can copy/paste the url of the edit link into the browser to get to the edit page.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default Re: Need help with object Terminology

    @gimbal2: how do I copy/paste that url? It only shows up in a tool tip box in the lower left corner of my screen and it plays hide and seek when I dare to move my mouse cursor to that position ... that entire http protocol stinks big times ... of course I can manually type it in, but me being lazy to the bone and yadda, yadda, yadda ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,848
    Rep Power
    5

    Default Re: Need help with object Terminology

    weird. On Firefox it behaves like a regular link for me, so I can just right-click and copy the url.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default Re: Need help with object Terminology

    Quote Originally Posted by gimbal2 View Post
    weird. On Firefox it behaves like a regular link for me, so I can just right-click and copy the url.
    Ah, yes of course; it works the same in IE; my old mum always used to tell me that I was a clumsy oaf ... I need another espresso ...

    kind regards,

    Jos

    ps. See? I can quote again ...
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,848
    Rep Power
    5

    Default Re: Need help with object Terminology

    Probably not 'again', just this one time :)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  8. #8
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Need help with object Terminology

    Quote Originally Posted by gimbal2 View Post
    Probably not 'again', just this one time :)
    YOu can copy-paste the "Reply With Quote" link too ...
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  9. #9
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,848
    Rep Power
    5

    Default Re: Need help with object Terminology

    DOH! I really am dumb.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default Re: Need help with object Terminology

    Quote Originally Posted by gimbal2 View Post
    DOH! I really am dumb.
    You said it first, we're all completely innocent.

    kindest regards,

    Jos (<--- puts on his angel face with the bambi eyes)
    cenosillicaphobia: the fear for an empty beer glass

  11. #11
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,848
    Rep Power
    5

    Default Re: Need help with object Terminology

    At least I don't make excuses about needing espresso :p
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 3
    Last Post: 12-29-2012, 12:21 AM
  2. Replies: 1
    Last Post: 02-02-2011, 06:11 PM
  3. Replies: 2
    Last Post: 06-22-2010, 04:29 AM
  4. Replies: 1
    Last Post: 03-04-2009, 06:14 PM
  5. Java Terminology
    By kewlgeye in forum New To Java
    Replies: 2
    Last Post: 05-25-2008, 07:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •