Return Locker Fields Using this->
easyQuestion 686Complete the Locker class. It has two private int fields, lockerId and itemCount. Every parameter below has the SAME name as its field, so reach the fields through this->.
1. Constructor Locker(int lockerId, int itemCount) - store both parameters in the fields.
2. getLockerId() const - return this->lockerId;
3. getItemCount() const - return this->itemCount;
4. setItemCount(int itemCount) - store the parameter in the field.
Do NOT write a main function - the tests supply one.
The test builds Locker(12, 3) and prints its id and count, calls setItemCount(9) and prints the count again, then builds Locker(7, 0) and prints its id and count, so the output is exactly what is shown in Expected Output.
Expected output
12 3 9 7 0
= newline. The output ends with a newline, so print one after the last line.
Your output
Run your code to see the output here...