CS411 Assignmnet # 2 (Spring 2016) Complete Solution

CS411 Assignmnet # 2 (Spring 2016) Complete Solution 

Visual Programming (CS411)
Assignment # 2 (GRADED)
Total marks = 20
                                                                                       Deadline Date = 20/07/2016
Please carefully read the following instructions before attempting the assignment.
Rules for Marking
It should be clear that your assignment would not get any credit if:
·         The assignment is submitted after due date.
·         The submitted assignment does not open or file is corrupt.
·         The assignment is copied. Note that strict action would be taken if the submitted assignment is copied from any other student. Both students will be punished severely.

1)      You should consult recommended books to clarify your concepts as handouts are not sufficient.
2)      You are supposed to submit your complete solution project as a single file (i. e. zip or RAR). Anyother formats like scan images, PDF, bmp, docx etc. will not be accepted.
3)      You are advised to upload your assignment at least two days before Due date.

Important Note:
Assignment comprises of 20 Marks. Note that no assignment will be accepted after due date via email in any case (whether it is the case of load shedding or emergency electric failure or internet malfunctioning etc.). Hence, refrain from uploading assignment in the last hour of the deadline, and try to upload Solutions at least 02 days before the deadline to avoid inconvenience later on.
For any query please contact: CS411@vu.edu.pk

Write a WPF application in C# with following requirements:
Program Design and Code Requirements:
Design (XAML File)
Title of the Salary Calculator Window should be Salary Calculator.
Salary Calculator window should contain the ComboBox or list box which will be used to select the designation i.e. (BPS-I, BPS-II, BPS-III, BPS-IV, and BPS-V).
Basic Salary of all the scales will be as follow
Basic Salary

Salary Calculator window should contain the 7 textboxes where it will display the respective information on the basis of selection of ComboBox. Label of the Text Boxes will be Basic Salary, HR Allowance, UB Allowance, T Allowance, CVN Allowance, M Allowance, Gross Total.
At the End, Salary Window Calculator should contain 10 TextBlocks which will be used to display increment information (from 1 to 10).
Code (CS File)
It should declare a namespace with name Salary_Calculator
In the above namespace, it should declare a class with the name MainWindow
Class should contain a constructor which should initialize the components.
Class should contain three methods
·         SelectionChanged
·         Allowance_Calculation
·         Increment_Calculation
Class should contain a “SelectionChanged” method on combobox, which should load all the values including basic salary, allowances (HR Allowance, UB Allowance, T Allowance, CVN Allowance, and M Allowance), total salary and increments (First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth). For this purpose it uses “Allowance_Calculation” and “Increment_Calculation” methods discussed below.
Allowance_Calculation method should accept one argument which will be Basic Salary and then calculate the allowance using amount of Basic Salary. Different percentage of allowances is as follows
HR Allowance = 45% * Basic Salary
UB Allowance = 10% * Basic Salary
T Allowance = 15% * Basic Salary
CVN Allowance = 5% * Basic Salary
M Allowance = 12% * Basic Salary
Gross Total = Basic Salary + HR Allowance + UB Allowance + T Allowance + CVN Allowance +       M Allowance
Increment_Calculation method should accept one argument i.e. Gross Total Salary and then calculate the ten increments using the amount of Gross total. Increment values will be calculated on the basis of following information,
First Increment = (0.1 * Gross Total) + Gross Total
Second Increment = (0.2 * Gross Total) + Gross Total
Third Increment = (0.3 * Gross Total) + Gross Total
Fourth Increment = (0.4 * Gross Total) + Gross Total
Fifth Increment = (0.5 * Gross Total) + Gross Total
Sixth Increment = (0.6 * Gross Total) + Gross Total
Seventh Increment = (0.7 * Gross Total) + Gross Total
Eighth Increment = (0.8 * Gross Total) + Gross Total
Ninth Increment = (0.9 * Gross Total) + Gross Total
Tenth Increment = (1.0 * Gross Total) + Gross Total

Solution:  XAML File Code :


Code (CS File):


Complete Solution File in Zip Format find Below Attachment : 

Welcome to Our WebSite! - | Virtual Ning | Pakistan NO # 1 . Website for the Students of Virtual University.

Click here for Comments