Skip to content

Instantly share code, notes, and snippets.

@kudapara
Created April 18, 2018 19:50
Show Gist options
  • Save kudapara/71c9089275461270caeaab0f4c60654d to your computer and use it in GitHub Desktop.
Save kudapara/71c9089275461270caeaab0f4c60654d to your computer and use it in GitHub Desktop.
Code that adheres to ISP
class Shape {
constructor () {}
area () {}
}
class SolidShape {
constructor () {}
volume () {}
}
const triangle = new Shape()
const cube = new SolidShape()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment