Back to problems

Customer Revenue and Referral Tracking

Object-Oriented Programming · Uber · Medium

Create a data structure for maintaining customer revenue totals and assigning referral credit. Implement the CustomerRevenueTracker class: CustomerRevenueTracker() Creates an empty tracker. int insertNewCustomer(int revenue) Adds a customer using the next unused customer ID, with IDs beginning at 0. The customer's initial total revenue is revenue. int insertNewCustomerWithReferral(int revenue, int referrerId) Adds a customer using the next unused customer ID. Its initial…

Checking your access…