Created
May 7, 2012 13:40
-
-
Save meza/2627824 to your computer and use it in GitHub Desktop.
ValueObject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Book { | |
private String title; | |
private String author; | |
private int price; | |
public Book(String title, String author, int price) { | |
this.title = title; | |
this.author = author; | |
this.price = price; | |
} | |
public String title() { | |
return title; | |
} | |
public String author() { | |
return author; | |
} | |
public int price() { | |
return price | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment