Assignment 2 - Statement
Assignment 2 - Statement
ASSIGNMENT – 2 – SE
Deadline: Friday Oct 25, 2024
1. Make sure that you read and understand each and every instruction. If you have any questions
or comments you are encouraged to discuss your problems with your colleagues (and
instructors) on google classroom.
2. If there is a syntax error in the code, zero marks will be awarded in that part of the
assignment.
3. Keep a backup of your work always that will be helpful in preventing any mishap and avoid
last hour submissions
4. Displayed output should be well mannered and well presented. Use appropriate comments
and indentation in your source code.
5. Please ensure that only concepts covered in class are used for the assignment. For each
question in your assignment, make a separate .cpp file e.g., for question 1, make q1.cpp and so
on. Each file that you submit must contain your name, student-id, and assignment on top of the
file in the comments.
7. Combine all your work in one folder. The folder must contain only .cpp files (no binaries,
no exe files etc.).
8. Rename the folder as ROLL-NUM_PROGRAM_SECTION (e.g., i240001_SE_A) and
compress the folder as a zip file. (e.g., i240001_SE_A.zip). Strictly follow this naming
convention, otherwise marks will be deducted.
9. Submit the .zip file on Google Classroom within the deadline.
10. The student is solely responsible for checking the final file for issues like corrupt file,
viruses in the file, or mistakenly exe sent. If we cannot download the file from Google
Classroom, it will lead to zero marks in the assignment.
Input:
N1=>8 , N2=>6 , N3=>0 , N4=>11 , N5=>7
Input:
N1=>4 , N2=>3 , N3=>1 , N4=>0 , N5=>0
Question 6
TechNova Solutions, a global leader in technology services and innovation, has introduced a
performance-based bonus system to reward employees for their contributions. This system
considers multiple factors, including years of service, performance rating, overtime hours,
department, and work location. Emma, the HR Manager at TechNova Solutions, has reached
out to your team to develop a C++ program that automates the calculation of performance
bonuses for employees.
The goal is to ensure that this comprehensive system not only rewards employees fairly but
also motivates them to continue excelling in their roles. Your task is to implement a C++
program that automates the calculation of performance bonuses based on the company’s
detailed guidelines.
Program Requirements:
● Accept the following inputs from the user:
○ Years of service
○ Performance rating (1 to 5)
○ Annual salary
○ Overtime hours
○ Department (Engineering, Sales, Other)
○ Work location (Region A, Region B, Other)
● Bonus Calculations:
○ Calculate the base bonus based on the employee’s years of service and
performance rating.
○ Add the overtime bonus based on the number of overtime hours.
○ Include any department-based bonus (for Engineering or Sales).
○ Apply the location allowance based on the work location.
○ If the employee’s salary exceeds $100,000, apply an additional 5% bonus to
the total calculated bonus.
● Display the final bonus amount and provide a breakdown of the bonus components:
○ Base bonus
○ Overtime bonus
○ Department-based bonus
○ Location allowance
High salary bonus (if applicable)
Constraints:
● The solution must be generic and not involve directly outputting values via cout. As Direct
cout will result in direct zero.
● Use Switch for Menu-Driven Program.