Skip to content

Instantly share code, notes, and snippets.

@meza
Created May 7, 2012 13:16
Show Gist options
  • Save meza/2627688 to your computer and use it in GitHub Desktop.
Save meza/2627688 to your computer and use it in GitHub Desktop.
global state antipattern
class Book {
private String title;
private String author;
private int price;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public int getPrice() {
return price
}
public void setPrice(int price) {
this.price = price;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment