Objective:
Program with enumerations
Preparation:
Review section 11.12 from Starting Out with C++ by Gattis.
Programming:
- Place your code in a file named LlllFfffLab03.cpp where Llll is the first four letters of your last name and Ffff is the first four letters of your first name.
- Define a Color enumeration with at least six common values.
- Write a function to display the name for a given Color value it receives.
- Write a function that allows the user to input a color name as a string and then it
returns the corresponding Color value.
- Write a function that returns the wavelength as a floating-point value in units of
meters for a given Color value it receives.
- Write a driver program that utilizes the functions described above. It should ask
the user to input a color. It should then report the wavelength of that color. It
should also allow the user to repeat if they desire.
- Verify your program works correctly.
- Submit your source code file to
ude.wons@nosneros.htrag. Due at 8:00 am on 21 January.