Accounting Calculator
The Accounting firm LambdaCalculator is running out of money. In the past few months, they've struggled to find new clients, and as a result they are looking at laying off staff. They've hired you to build some software that fulfills the role of their accountants. As the first step, you will write some code that calculates the gross profit (total revenue minus total expenses) for monthly financial reports.
Write a function called calculateGrossProfit
that takes in two int[]
parameters, the revenue for each day of a
month then the expenses for each day of a month, and returns the gross profit (revenues minus expenses) as an int
.
You may assume that both passed arrays will not be null
and the same length.
Here's an example of how your class should behave:
Readings:
- The robots are coming for Phil in accounting (New York Times).: Discussing how traditional white-collar jobs like accounting are in fact not safe from automation. (10–15 minutes)
- FloQast scores $110 million in latest funding round (Accounting Today). FloQast, the developer behind a popular accounting workflow automation software, raised a recent round which values it at over a billion dollars. (3 minutes)