uni

University stuff
git clone git://git.margiolis.net/uni.git
Log | Files | Refs | README | LICENSE

Album.java (616B)


      1 class Album {
      2 	private String title;
      3 	private String artist;
      4 	private Integer year;
      5 	private Float price;
      6 
      7 	Album(String title, String artist, Integer year, Float price) {
      8 		this.title = title;
      9 		this.artist = artist;
     10 		this.year = year;
     11 		this.price = price;
     12 	}
     13 
     14 	public String get_title() {
     15 		return title;
     16 	}
     17 
     18 	public String get_artist() {
     19 		return artist;
     20 	}
     21 
     22 	public Integer get_year() {
     23 		return year;
     24 	}
     25 
     26 	public Float get_price() {
     27 		return price;
     28 	}
     29 
     30 	@Override
     31 	public String toString () {
     32 		return String.format("%-40s\t", title) +
     33 		    String.format("%-30s\t", artist) +
     34 		    year + "\t" + price;
     35 	}
     36 }