Only in VideoStock1.2: ChildrensPrice.class Only in VideoStock1.2: ChildrensPrice.java Binary files VideoStock1.1/Movie.class and VideoStock1.2/Movie.class differ diff -r VideoStock1.1/Movie.java VideoStock1.2/Movie.java 8,9c8,9 < private int _priceCode; < --- > private Price _price; > 13c13 < _priceCode=priceCode; --- > setPriceCode(priceCode); 17c17 < return _priceCode; --- > return _price.getPriceCode(); 21c21,34 < _priceCode=priceCode; --- > switch (priceCode) > { > case Movie.REGULAR: > _price=new RegularPrice(); > break; > case Movie.NEW_RELEASE: > _price=new NewReleasePrice(); > break; > case Movie.CHILDRENS: > _price=new ChildrensPrice(); > break; > default: > throw new IllegalArgumentException("Incorrect Price Code"); > } 26a40,53 > > public int getFrequentRenterPoints(int daysRented) > { > return _price.getFrequentRenterPoints(daysRented); > > } > > public double getCharge(int daysRented) > { > return _price.getCharge(daysRented); > } > > > 27a55 > Only in VideoStock1.2: NewReleasePrice.class Only in VideoStock1.2: NewReleasePrice.java Only in VideoStock1.2: Price.class Only in VideoStock1.2: Price.java Only in VideoStock1.2: RegularPrice.class Only in VideoStock1.2: RegularPrice.java Binary files VideoStock1.1/Rental.class and VideoStock1.2/Rental.class differ diff -r VideoStock1.1/Rental.java VideoStock1.2/Rental.java 21,40c21 < double result=0; < switch (getMovie().getPriceCode()) < { < case Movie.REGULAR: < result+=2; < if (getDaysRented()>2) < { < result+=(getDaysRented()-2)*1.5; < } < break; < case Movie.NEW_RELEASE: < result += getDaysRented()*3; < break; < case Movie.CHILDRENS: < result += 1.5; < if(getDaysRented() > 3) < result+= (getDaysRented()-3)*1.5; < break; < } < return result; --- > return _movie.getCharge(_daysRented); 45,49c26,27 < if( (getMovie().getPriceCode()== Movie.NEW_RELEASE) < && (getDaysRented()>1)) < return 2; < else < return 1; --- > return _movie.getFrequentRenterPoints(_daysRented); > 51a30 > Only in VideoStock1.1: VideoStock1.1.ps Only in VideoStock1.2: VideoStock1.2.ps