CIS112 Assignment 4 A sales company has many employees Each
CIS112 Assignment #4 A sales company has many employees. Each employee works in a specific department. The departments are located in areas and the areas are contained inside territories. Your manager has asked you to write an interactive program to allow the salesperson to enter the territory, the area and the department they are in whenever they make a sale. The territories are numbered from 01 thru 03, the areas are also numbered from 01 thru 03 and the departments are numbered from 01-10. If the territory is 99, stop the program. The manager wants totals for the number of sales in each department with the following form: Terr 01 Area 01 Number of Employees Department 01 6 02 5 Area -02 Number of Employees Department 015 027 Terr-03 Area -01 Number of Employees Department 012 05
Solution
*********************************The switch case for above data**************************
if(Terr==01){
switch(Terr) {
case 01 :
if(Department ==01)
NumbeOfEmp=6
else if(Departement ==02)
NumberOfEmp=5
break;
case 02 :
if(Department ==01)
NumbeOfEmp=5
else if(Departement ==02)
NumberOfEmp=7
break;
}
}
else if(Terr==03){
switch(Terr) {
case 01 :
if(Department ==01)
NumbeOfEmp=2
else if(Departement ==05)
NumberOfEmp=3
break;
}
