class LoyaltyCardService { // constructor removed for brevity's sake void addPoints(int id, int points) { LoyaltyCard card = //... find card by id in db card.addPoints(points); // persist the LoyaltyCard } void removePoints(int id, int points) { LoyaltyCard card = //... find card by id in db card.removePoints(points) // persist the LoyaltyCard } }