Week 12: Nov 12 Exam is wednesday 1. Autoboxing: We briefly encountered this in the past: ArrayList numlist; // fails!! ArrayList numlist; numlist.add(3); // ok: expect Integer, get int int z = numlist.get(0); // ok: expect int; get Integer This has nothing to do with arraylists. Automatic int <--> Integer conversion works anywhere: Integer Z; int z; Z = z+1 z = 2*Z; =================================================== DarkRoom overrides getShortDescription, getLongDescripton respond overrides GO, LIGHT, TAKE note the check of inventory in getXDescription constructor trick! Note how anything that's a Light can be lit!! This time with detail about Light extends Item Compare to Food extends Item; fields: amount_left; method: is_gone(); Only need to do this *if* we need to store some attribute. Look at Torch. ============= ValveRoom from the back: linking two rooms DustyRoom (north of prepRoom) overrides SWEEP ZooRoom overrides get?Description respond =========================== Access problems: Game class cannot be accessed by any Room or sub-Room! the Inventory problem player weights ========== Study guide: StoneRoom example ===================================================================================== ===================================================================================== Friday: no class??