mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
44 lines
806 B
Java
44 lines
806 B
Java
package com.gildedrose;
|
|
|
|
public class Item {
|
|
|
|
private String name;
|
|
|
|
private int sellIn;
|
|
|
|
private int quality;
|
|
|
|
public Item(String name, int sellIn, int quality) {
|
|
this.name = name;
|
|
this.sellIn = sellIn;
|
|
this.quality = quality;
|
|
}
|
|
|
|
public String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
// No setter for Name because it is not necessary yet
|
|
|
|
public int getSellIn() {
|
|
return this.sellIn;
|
|
}
|
|
|
|
public void setSellIn(int sellIn) {
|
|
this.sellIn = sellIn;
|
|
}
|
|
|
|
public int getQuality() {
|
|
return this.quality;
|
|
}
|
|
|
|
public void setQuality(int quality) {
|
|
this.quality = quality;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return this.name + ", " + this.sellIn + ", " + this.quality;
|
|
}
|
|
}
|