Make sure you are in section 010. If not, then get to the assignment from your section of the course.
The function processOrder() has a calculation to process orders. It has error codes for each restriction, including if the quantity is non-positive, if the order is empty, if the product name is invalid, and if the quantity exceeds the maximum.
In this exercise, you will perform the refactoring Replace Nested Conditional with Guard Clause and then change the functionality.
Commit messages must be exactly as given in the instructions.
Instead of an upload to Brightspace, you are going to fill out a form. You must fill it out after completing the commits and issue work of the following.
Replace nested conditional with guard clause. This must be done first.refactor of the original code.In the branch refactor, perform a Replace Nested Conditional with Guard Clause Refactoring.
As you make changes, build and run the test program often to ensure you are not changing the code's behavior.
Commit your changes with the commit message:
Push as soon as you make the commit.
mainRemove the restriction of an empty order on main. This must be done first.main.The customer wants to allow empty orders. Change the code, comments, and test to remove the error for an empty order.
Make sure the program builds and that all tests pass.
Use the following commit message exactly as given:
Push as soon as you make the commit.
refactorRemove the restriction of an empty order on refactor. This must be done first.refactor.The customer wants to allow empty orders. Change the code, comments, and test to remove the error for an empty order.
Make sure the program builds and that all tests pass.
Use the following commit message exactly as given:
Push as soon as you make the commit.
After completing the previous work, fill out this form.