0% found this document useful (0 votes)
12 views3 pages

Assignment 01 Oop

The assignment requires students to develop a C++ program for a Pakistani company that calculates salaries and tax deductions based on employee type. It involves user-defined functions, function overloading, and recursion for tax calculations, with specific guidelines on input and output formatting. The submission deadline is April 30, 2025, and students must upload their work to Google Classroom.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Assignment 01 Oop

The assignment requires students to develop a C++ program for a Pakistani company that calculates salaries and tax deductions based on employee type. It involves user-defined functions, function overloading, and recursion for tax calculations, with specific guidelines on input and output formatting. The submission deadline is April 30, 2025, and students must upload their work to Google Classroom.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment 01

Object Oriented Programming


Spring 2025, 2nd Semester , Section (G, H, I)
Topic: Functions
Note:

• The last date to submit is April 30, 2025.


• Write your Roll Number (----------555----------) at the top of each program output.
• Run all the questions in the compiler. Take screenshots of your code and console (output).
• Make a PDF file and upload the soft copy to Google Classroom only.
• Google Classroom Link https://classroom.google.com/c/Njg3MjQ0NzQxMzYw?cjc=czbyr62f
• Google Classroom Code: czbyr62f
• Follow the guide.

Assignment Problem: Pakistani Employee Smart Salary & Tax Calculator

Objective:

Develop a C++ program for a Pakistani company that calculates monthly and annual salaries,
applies tax deductions, and considers employee type (full-time/part-time). The program should
use:

• User-defined functions
• Function overloading
• Recursion (for tax slab calculation)

Background:

In Pakistan, the income tax system is progressive, meaning:

• No tax for income below Rs. 600,000 per year.


• 5% tax on income between Rs. 600,001 – Rs. 1,200,000.
• 10% tax on income between Rs. 1,200,001 – Rs. 2,400,000.
• 15% tax on income between Rs. 2,400,001 – Rs. 3,600,000.
• 20% tax on income above Rs. 3,600,000.

Employees also get allowances:

• Full-time: Rs. 10,000 per month.


• Part-time: Rs. 5,000 per month.
Instructions:

Create a program that:

1. Takes the following input from the user:


o Employee name
o Employee type (Full-time / Part-time)
o Monthly salary
2. Uses function overloading to calculate:
o Salary with allowances for full-time employees
o Salary with allowances for part-time employees
3. Uses a recursive function to calculate total annual tax based on the income slab.
4. Displays:
o Total annual income
o Total tax
o Net annual salary

Function Hints:

➤ float calculateSalary(string type, float monthlyBasic);

• Calculates total salary with allowance based on employee type (overloaded function).

➤ float calculateSalary(string type, float monthlyBasic, float


customAllowance);

• Overloaded: handles custom allowance (optional).

➤ float calculateTax(float annualIncome);

• Recursive function to apply correct tax slabs.

Check the Assignment Guide on the next page.


Assignment 01 – Guide
Note: Your assignment should be formatted like this. Each question should be listed in the
same way as shown. Also, include screenshots for all questions, just like the examples
below.

Problem 01:
Write a simple C++ program to print "Hello, World!".
Program:

Output:

You might also like