Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE READ EACH PART! I need alot of help. Enumeration Type Challenge will be pretty obvious if cheating took place. 1. Define an enumeration type
PLEASE READ EACH PART! I need alot of help.
Enumeration Type Challenge will be pretty obvious if cheating took place. 1. Define an enumeration type in the global scope called Order with three values RANGER, BUILDER, STEWARD 2. Declare a variable called nightsWatchOrder of type order in your main function. 3. Assign the value RANGER to the night shiatchorder variable in your main function 4. Write a cout statement to print the value of night swatchOrder followed by a line break You should see a 0 in your output COMPILER RUN Value of Order variable - 25... Scient de touttontact your code Che 8:03 AM 2/8/2021 Updal Descuente LACSC: 0 pse numeration Type Challenge 5. Define a function called print with a parameter of type Order called watchrder. The function should print a string that reflects the value of the parameter followed by a line break. Remember, you cannot print enums directly. 6. Call the print function from the main function with nightsWatchOrder as the argument. You should see the word Ranger on the second line in your output. COMPILE & RUN print function - 25 pts Show 56 Checked DOS 8:03 AM 2/8/2021 0 * 8 Update 1. Enumerati... Collapse 1. Enumeration Type Challenge 7. Define a function called incrementorder with one parameter of type Order called watchorderThe function should increment the watchOrder variable by one and then return the updated value 8. Call the incrementorder function in the main() function using nightshatchOrder as your argument. 9. Call the print function in win to print the current value of the night swatchrder You should see the word Builder on the third Nne of your outout COMPLEX RUN incrementOrder function -... D 804 AM 2/8/2021 Collapse 1. Enumeration Type Challenge 10. Define a function called decrementorder with one parameter of type Order called watchrder The function should decrement the watchOrder variable by one and then return the updated value. 11. Call the decrenentorder function in the main function with night swatchOrder as your argumenti 12 Call the pnnt function in main to print the current value of nights WatchOrder COMPILE & RUN decrementOrder function - kthe check it outton to check out cooe 8:04 AM 2/8/2021 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started