Question: Please help with writing the code for the following. The language being used is C++ and I'm using vim to write the program. Please include
Please help with writing the code for the following. The language being used is C++ and I'm using vim to write the program. Please include plenty of comments.


Do not include a main method in the files you submit - just the definitions of the assigned functions. I will compile your code with my own main method for testing, and there can only be one main method in a program. You will of course need to have a main method for testing purposes -just make sure you comment it out (or delete it) before submitting your file. Do not use any global variables. Global variables and their drawbacks are discussed on pages 357-9 of the textbook. . If the assignment description doesn't specify a return value for a function, then it should have a return type of void
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
