Spring 2024 - CS411 - 2
Spring 2024 - CS411 - 2
Total Marks: 20
Assignment No. 02
Semester: Spring 2024 Due Date: June 24, 2024
Instructions:
You need to use MS word document to prepare and submit the assignment on VU-LMS.
It should be clear that your assignment will not get any credit if:
Objectives:
The objective of this assignment is to enhance the learning capabilities of the students about:
If you have any confusion, you can send your query at [email protected]
Lectures Covered: 19 to 32
1
CS411 – Visual Programming
Total Marks: 20
Assignment No. 02
Semester: Spring 2024 Due Date: June 24, 2024
Problem Statement:
You need to develop a WPF application (simple calculator) in C#.NET with the following
functional requirements:
1. You need to develop and design simple calculator (as shown in the figure above.) that has
three text boxes, three buttons, and labels using WPF XAML with file name
"MainWindow.xaml".
2. Write the C# code in file named " MainWindow.xaml.cs" that receive two integer numbers
form the users entered in first two textboxes and perform addition operation when "Add" button
is pressed and perform multiplication operation when "Multiply" button is pressed.
3. The application will also display Result of the entered values in textbox labeled as Result.
4. When "clear" button is pressed the values need to be disappear from the textboxes.
Instructions:
At the top of application, you will write your own VU ID.
If you didn’t use your own VU ID, you will get zero marks.
Paste the screen shot of output at top of solution in word document, then paste code (XAML and
C#) of program. (Solution Template is given on page No 3 of this file)
If you submit only the screen shot of the source code, you will get zero marks.
2
CS411 – Visual Programming
Total Marks: 20
Assignment No. 02
Semester: Spring 2024 Due Date: June 24, 2024
Sample Output:
<Window x:Class="WpfCalculator.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Simple Calculator" Height="300" Width="400">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30*" />
<RowDefinition Height="30*" />
<RowDefinition Height="30*" />
<RowDefinition Height="100*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
3
CS411 – Visual Programming
Total Marks: 20
Assignment No. 02
Semester: Spring 2024 Due Date: June 24, 2024
using System;
using System.Windows;
namespace WpfCalculator
4
CS411 – Visual Programming
Total Marks: 20
Assignment No. 02
Semester: Spring 2024 Due Date: June 24, 2024
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
5
CS411 – Visual Programming
Total Marks: 20
Assignment No. 02
Semester: Spring 2024 Due Date: June 24, 2024