tinggal ditambahin variabel utk pengurangan jumlah totalnya int tot = book.getTotal(); int x; if (tot > 0) { tot = tot - x; book.setTotal(tot); }