Results 1 to 2 of 2
  1. #1
    infernocy is offline Member
    Join Date
    Apr 2012
    Posts
    15
    Rep Power
    0

    Default what does this mean ?

    hallo people
    i have an interface called Rentable and the following explanation
    /** When an item is loaned its return date should be set and a flag set to show that it is on loan.
    * It should only be loaned if it is not already on loan
    */

    i dont understand the meaning of setting a flag to show its on loan?
    Last edited by infernocy; 04-12-2012 at 02:10 PM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,446
    Rep Power
    18

    Default Re: what does this mean ?

    Flags are things used to indicate a state.
    They can be enums (if there's lots of states) or simply a boolean (if there's only two).
    In your case a boolean called onLoan would probably do. If it's true then it's on loan, if false then it's available to rent.
    Please do not ask for code as refusal often offends.

Posting Permissions

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