Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added RewardValue class and implemented conversion logic #1448

Open
wants to merge 2 commits into
base: flow
Choose a base branch
from

Conversation

sampujya123
Copy link

@sampujya123 sampujya123 commented Sep 28, 2024

Added RewardValue class and implemented conversion logic

Created a RewardValue class with two constructors: one that accepts a cash value and one that accepts a miles value.
Implemented methods getCashValue() and getMilesValue() to retrieve the corresponding values.
Added conversion logic to convert between cash and miles at the rate of 0.0035.
Created unit tests to validate:
Cash value creation
Miles value creation
Conversion from cash to miles
Conversion from miles to cash
This will allow proper handling of reward values in both miles and cash formats within the RewardsConverter application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant