Homework 5 REFACTORING TO DESIGN PATTERNS

$30.00

Category: Tags: , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (4 votes)

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.