Question: using switch statements only. no if statements. Problem A certain company assigns each employee an ID made up of 4 parts: If the employee's last
Problem A certain company assigns each employee an ID made up of 4 parts: If the employee's last name begins with a vowel the ID begins with V, otherwise it begins with C The next three characters are based on what department the employee works in: Department Abbreviation Code Accounting Acc 101 Human Resources Hrs 102 Sales Sal 103 Finance Fin 104 Advertising Adv 105 Communications Com 106 Any other 110 The fifth and sixth characters are based on the month of the employee's birth: Month of Birth Code Jan, Feb 01 Mar, Apr 02 May, Jun 03 Jul, Aug 04 Sep, Oct 05 Nov, Dec 06 The last two characters are the length of the employee's last name (use leading zero if necessary) Write a program, Employeeld, to input an employee's last name, department (3 letter abbreviation) and month of birth (3 letter abbreviation) and display the employee's ID. Examples The code for employee Smith in department Sales born in April is C1030205 The code for employee Easterbrooke in department Security born in December is V1100612
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
