Challenge: Flyweight Pattern
In this challenge, you have to implement the flyweight pattern to solve the given problem.
We'll cover the following...
Problem statement
In this challenge, you have been given the Dress
class.
First, you need to define the dressPrice
function, which is used to set the price
of a dress and return it. The prices of different type
of dresses are as follows:
-
maxi
:1000
-
gown
:2000
-
...