Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. design pattern

design pattern

Scheduled Pinned Locked Moved C / C++ / MFC
designalgorithmsregexarchitecturetutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Krishnatv
    wrote on last edited by
    #1

    I have faced this question in an interview, Design algorithm for elevators using any design pattern. please guide me regarding this. krishna

    N 1 Reply Last reply
    0
    • K Krishnatv

      I have faced this question in an interview, Design algorithm for elevators using any design pattern. please guide me regarding this. krishna

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      Well I can give a brief description :-D When they go up they keep going up processing the requests on the way. and When they come down they keep coming down processing the requests on the way. They don't change direction in between unless they have processed all requests in that direction and BTW if anybody gives another request before it changes direction it processes that too. This is called the elevator algorithm. :-D


      Nibu thomas Software Developer

      K 1 Reply Last reply
      0
      • N Nibu babu thomas

        Well I can give a brief description :-D When they go up they keep going up processing the requests on the way. and When they come down they keep coming down processing the requests on the way. They don't change direction in between unless they have processed all requests in that direction and BTW if anybody gives another request before it changes direction it processes that too. This is called the elevator algorithm. :-D


        Nibu thomas Software Developer

        K Offline
        K Offline
        Krishnatv
        wrote on last edited by
        #3

        hai, can u elaborate this , just like what r the abstract base class we r designing for this and derived classes and some importnt methods.

        R 1 Reply Last reply
        0
        • K Krishnatv

          hai, can u elaborate this , just like what r the abstract base class we r designing for this and derived classes and some importnt methods.

          R Offline
          R Offline
          Rahim Rattani
          wrote on last edited by
          #4

          Composite Pattern - For the structure, components and movement of the elevator (e.g. doors, switches, lightsource etc.). Iterator Pattern - For the list of floors. Observer Pattern - To identify on which floor to stop. Rahim Rattani Software Engineer, Matrix Systems (Pvt) Ltd., Karachi - Pakistan

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups