Company: Altimetrik_3oct
Difficulty: medium
Reward System Problem Description Design a Payment app that supports three types of transactions: Peer-to-peer (P2P) Peer-to-merchant (P2M) Self The app supports a reward system. Whenever a user makes a P2M transaction and if that person is among the top 100 users (in terms of the total amount of P2M transactions they have made), they are eligible for a reward. Implement the Payment class: TransactionSummary makePayment(int transactionId, int senderId, int amount, TransactionType transactionType) : TransactionSummary class definitions are provided in the locked stub. TransactionSummary class contains two attributes, transactionId , and isSenderEligibleForReward . Given transactionId , senderId , amount , and transactionType create a TransactionSummary object. Determine if the senderId is eligible for a reward based on the condition mentioned above. int getNumberOfTransactions(int senderId, TransactionType transactionType) : Given senderId , returns the number of transactions of type tr