Results 1 to 2 of 2
  1. #1
    mhadjis is offline Member
    Join Date
    Aug 2013
    Rep Power

    Default design pattern for Switching Operation Modes

    I'm trying to create an application that has three operational modes (training, exercise production).
    I desire to know what design pattern I should use to optimize it.
    The logic is simple, the user must log in and then must choose which mode it wants to use.
    According to the selected mode, the business will be different.
    thank you in advance for your help

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power

    Default Re: design pattern for Switching Operation Modes

    You already said it yourself:

    Java Code:
    public interface OperationalMode { ... }
    public class Training implements OperationalMode { ... }
    public class Exercise implements OperationalMode { ... }
    public class Production implements OperationalMode { ... }
    Maybe you want a Factory too that creates the wanted OperationalMode object.

    kind regards,

    Build a wall around Donald Trump; I'll pay for it.

Similar Threads

  1. Replies: 5
    Last Post: 08-16-2012, 07:02 AM
  2. Design pattern question
    By garnaout in forum Advanced Java
    Replies: 2
    Last Post: 06-06-2012, 08:03 PM
  3. What's the design pattern(s) that describes...
    By starbuck in forum Advanced Java
    Replies: 3
    Last Post: 03-31-2012, 08:28 PM
  4. Need design pattern for ETL components
    By starbuck in forum Advanced Java
    Replies: 0
    Last Post: 03-23-2012, 12:52 PM
  5. Unknown design pattern
    By Steve11235 in forum Advanced Java
    Replies: 4
    Last Post: 07-02-2009, 12:40 PM

Posting Permissions

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