Homework 5 REFACTORING TO DESIGN PATTERNS solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (1 vote)

In this homework, you are required to modify your homework 3 on the movie rental application.
1) You are required to modify the code to make the function of computing frequent rental points into a strategy design pattern (That is, you will have strategy classes to compute frequent rental points). 2) After create a strategy class for the current strategy to compute frequent rental points, you are required to add two new strategies: a. The first new frequent rental point computation gives double regular points to any customer who is renting more than two types of categories b. The first new frequent rental point computation gives double regular points to any customer who is 18-22 and renting one or multiple new release movies. 3) Please submit your resulting code and a short Word document explaining the rationale behind your code. 4) Bonus (20 points): Please modify your code to add an additional functionality as follows. In a transaction, if a customer rents 3-5 items, the price of all additional items that he purchases in the same transaction will be 80% of the original prices. But if more than 5 items were rented, the price of the item in purchase will be reduced in half. You need to use design pattern for this task.