A well renowned hotel has three branches in Miami. Namely x,y and z .Each has two types of customers. Regular and Rewardee. Also each branch has its own ratings x is given a 3 star rating while y has 5 star rating and z has 4 star rating.Each hotel has specific rates for weekend and weekdays. x charges $100 for regular customers on weekdays and $120 on weekends While it is $90 for rewardee on weekdays and $95 on weekends. While z charges $195 for regular customers on weekdays and $150 on weekends. While its $120 for rewardee on weekdays and $90 on weekends. Now when the customer requests for a particular detail you need to find which hotel would yield the customer profit. In case of tie between hotels compare the ratings and provide the result.

Input format:Regular: 16Mar2010(sun), 19Mar2010(wed), 21Mar2010(Fri)

Answer: (This is the format of the question but not sure about the values).

*Practice only makes habit, only perfect practice makes perfect.
So, practice mindfully. Practice doing the right things and doing things right. *— Junilu

[How to Ask Questions] [How to Answer Questions]

*Practice only makes habit, only perfect practice makes perfect.
So, practice mindfully. Practice doing the right things and doing things right. *— Junilu

[How to Ask Questions] [How to Answer Questions]

RegularAndWeekdays, RegularAndWeekends, RewardedAndWeekdays, RewardedAndWeekends are the classes implement them

An interface Hotel

HotelX HotelY HotelZ will implement that interface

Now all the conditions concrete classes will have a reference to hotel and it will instantiates each type of hotel

these classes have a function Calculate and they will calculate the charges for each hotel and then put them into the int variables

then i will find the smallest one of these ints and return that variable.

Start with Classes; forget about interfaces for now. This is a fairly simple problem and adding interfaces at the start tends to add too much complexity.

And I'm not sure you really need a "Conditions" concept yet.

HotelX, HotelY, HotelZ implementing a Hotel Interface is not right. X, Y, and Z are all Hotels. At most, I would think they would be instances of the same class.

*Practice only makes habit, only perfect practice makes perfect.
So, practice mindfully. Practice doing the right things and doing things right. *— Junilu

[How to Ask Questions] [How to Answer Questions]

The fact that you have "And" in the names is a red flag -- you need to break these things down into smaller concepts. Don't mix two different concerns.

So, practice mindfully. Practice doing the right things and doing things right.

[How to Ask Questions] [How to Answer Questions]