<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CS201 Assignment 1 Solution and Discussion]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/725/cs201-assignment-1-solution-and-discssion">CS201 Assignment 1 Solution and Discssion</a></p>
<pre><code>Assignment No.  1
</code></pre>
<p dir="auto">Semester: Spring 2020<br />
CS201 – Introduction to Programming	Total Marks: 20</p>
<p dir="auto">Due Date:  01/06/2020<br />
Instructions<br />
Please read the following instructions carefully before submitting assignment:<br />
It should be clear that your assignment will not get any credit if:</p>
<p dir="auto">o	Assignment is submitted after due date.<br />
o	Submitted assignment does not open or file is corrupt.<br />
o	Assignment is copied (From internet/students).</p>
<p dir="auto">Recommended tool to develop Assignment</p>
<ul>
<li>Dev C++</li>
</ul>
<p dir="auto">Objectives:<br />
To enable students to understand and practice the concepts of:<br />
•	Data Types and Variables<br />
•	Arithmetic and Logical Operators<br />
•	If-else and switch case statements</p>
<p dir="auto">Assignment Submission Instructions<br />
You have to submit only.cpp file on the assignments interface of CS201 from your LMS account. Assignment submitted in any other format will not be accepted and will be scaled with zero marks.</p>
<p dir="auto">For any query related to assignment, please contact <a href="mailto:cs201@vu.edu.pk" target="_blank" rel="noopener noreferrer nofollow ugc">cs201@vu.edu.pk</a>.</p>
<p dir="auto">Assignment</p>
<p dir="auto">Create a menu based program using C++ which will calculate the increment and tax deduction amount on salary based on the pay scale of an employee. After this, net salary of employee will be calculated. Details of these calculations are provided in Solution Guidelines.</p>
<p dir="auto">You are required to use initial salary, increment rate, and tax deduction rate given in following table for each of the given pay scale.</p>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>Pay Scale</td>
<td>Initial Salary</td>
<td>Increment Rate</td>
<td>Tax deduction Rate</td>
</tr>
<tr>
<td>SPS6</td>
<td>40,000</td>
<td>20%</td>
<td>3%</td>
</tr>
<tr>
<td>SPS7</td>
<td>60,000</td>
<td>15%</td>
<td>3%</td>
</tr>
<tr>
<td>SPS8</td>
<td>80,000</td>
<td>10%</td>
<td>3%</td>
</tr>
<tr>
<td>SPS9</td>
<td>100,000</td>
<td>5%</td>
<td>3%</td>
</tr>
</tbody>
</table>
<p dir="auto">Solution Guidelines:<br />
•	There should be a menu consisting of different pay scales and options to select any one pay scale. See first sample screenshot for reference.<br />
•	On the basis of a selected pay scale, calculate increment amount and tax deduction amount. For the rate of increment and tax, use the table given above.<br />
•	Increment amount will be calculated through initial salary on the basis of given rate.<br />
•	Updated salary will be calculated as initial salary plus incremented amount.<br />
•	Tax deduction amount will be calculated through updated salary as per given rate.<br />
•	Formula to calculate net salary is Net Salary = Initial Salary – Incremented Amount – Tax Deduction Amount<br />
•	After doing all necessary calculations, display initial salary, incremented amount, increased (updated) salary, tax deduction amount and net salary. See last sample screenshot for reference.</p>
<p dir="auto">Sample Screenshots of Output:<br />
Screenshot of menu.<br />
<img src="https://i.imgur.com/QwD2Ba7.png" alt="e4eb4b46-1546-4526-bbc9-0eb4f919d004-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Screenshot of selecting invalid choice of pay scale from menu.<br />
<img src="https://i.imgur.com/QhytXSr.png" alt="ac433228-2e7b-46bb-b25d-37dc5a0275b6-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Screenshot to display all calculated values on screen.<br />
<img src="https://i.imgur.com/FuGWcum.png" alt="922c1a6f-5735-4889-8cf9-42f2896ab970-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Lectures Covered: (Lecture # 1- 8) and Due date to submit solution: (Monday, June 01, 2020).</p>
]]></description><link>https://community.secnto.com//topic/1773/cs201-assignment-1-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 20:45:54 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/1773.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 20 May 2020 12:18:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS201 Assignment 1 Solution and Discussion on Wed, 17 Jun 2020 08:56:39 GMT]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
#include &lt;stdlib.h&gt;
using namespace std;

main() {
	int choice = 0, salary = 0;
	float increment = 0.0, tax = 0.0, newsal = 0.0;
	
	cout&lt;&lt;"\n ********* SALARY CALCULATOR *********\n"&lt;&lt;endl;
    cout&lt;&lt;" *************************************\n"&lt;&lt;endl;
	cout&lt;&lt;" ********* Enter 1 for SPS6  *********\n"&lt;&lt;endl;
	cout&lt;&lt;" ********* Enter 2 for SPS7  *********\n"&lt;&lt;endl;
	cout&lt;&lt;" ********* Enter 3 for SPS8  *********\n"&lt;&lt;endl;
	cout&lt;&lt;" ********* Enter 4 for SPS9  *********\n"&lt;&lt;endl;
    
	cout&lt;&lt;" Select a pay scale from the menu: ";
	cin&gt;&gt;choice;
	
	switch(choice){
		case 1:
			salary = 40000;
     		increment = salary * 20/100;
     		newsal = salary + increment;
     		tax = newsal * 3/100;
			break;
		case 2:
			salary = 60000;
     		increment = salary * 15/100;
     		newsal = salary + increment;
     		tax = newsal * 3/100;
			break;
			
		case 3:
			salary = 80000;
     		increment = salary * 10/100;
     		newsal = salary + increment;
     		tax = newsal * 3/100;
			break;
			
		case 4:
			salary = 100000;
     		increment = salary * 5/100;
     		newsal = salary + increment;
     		tax = newsal * 3/100;
			break;
			
		default:
			cout&lt;&lt;" Selected choice is invalid."&lt;&lt;endl&lt;&lt;endl;			
	}
	
	if(choice &gt;= 1 &amp;&amp; choice &lt;=4) {
		cout&lt;&lt;" Initial Salary: "&lt;&lt;salary&lt;&lt;endl;
		cout&lt;&lt;" Incremented Amount: "&lt;&lt;increment&lt;&lt;endl;
		cout&lt;&lt;" Increased Salary: "&lt;&lt;newsal&lt;&lt;endl;
		cout&lt;&lt;" Tax Deduction: "&lt;&lt;tax&lt;&lt;endl;	 
		cout&lt;&lt;" Net Salary: "&lt;&lt;newsal-tax&lt;&lt;endl&lt;&lt;endl;
	}	
	    
	system("pause");
}


</code></pre>
]]></description><link>https://community.secnto.com//post/5002</link><guid isPermaLink="true">https://community.secnto.com//post/5002</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Wed, 17 Jun 2020 08:56:39 GMT</pubDate></item><item><title><![CDATA[Reply to CS201 Assignment 1 Solution and Discussion on Wed, 20 May 2020 20:50:36 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://youtu.be/--rsdfqfQCo" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/--rsdfqfQCo</a></p>
]]></description><link>https://community.secnto.com//post/4965</link><guid isPermaLink="true">https://community.secnto.com//post/4965</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Wed, 20 May 2020 20:50:36 GMT</pubDate></item><item><title><![CDATA[Reply to CS201 Assignment 1 Solution and Discussion on Wed, 20 May 2020 20:50:17 GMT]]></title><description><![CDATA[<p dir="auto">Official Channel of the <a href="http://Cyberian.pk" target="_blank" rel="noopener noreferrer nofollow ugc">Cyberian.pk</a><br />
Visit our website: <a href="http://bit.ly/31LSltr" target="_blank" rel="noopener noreferrer nofollow ugc">http://bit.ly/31LSltr</a><br />
Please Like us fb: <a href="http://bit.ly/2laGweN" target="_blank" rel="noopener noreferrer nofollow ugc">http://bit.ly/2laGweN</a><br />
Follow <a class="plugin-mentions-user plugin-mentions-a" href="/user/cyberian" aria-label="Profile: Cyberian">@<bdi>Cyberian</bdi></a>: <a href="http://bit.ly/2klphZH" target="_blank" rel="noopener noreferrer nofollow ugc">http://bit.ly/2klphZH</a></p>
<p dir="auto">How to Copy NEW Quiz in VU Exam<br />
Chrome Extension Link: <a href="http://bit.ly/31LSltr" target="_blank" rel="noopener noreferrer nofollow ugc">http://bit.ly/31LSltr</a></p>
<p dir="auto">Video: <a href="http://bit.ly/31LSltr" target="_blank" rel="noopener noreferrer nofollow ugc">http://bit.ly/31LSltr</a></p>
<p dir="auto">#it430 #Quiz , #Assignment, #GdB #Solution and #discussion #Spring2020</p>
]]></description><link>https://community.secnto.com//post/4964</link><guid isPermaLink="true">https://community.secnto.com//post/4964</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Wed, 20 May 2020 20:50:17 GMT</pubDate></item></channel></rss>