Write an application for a simple calculator to implement addition,
Q1 subtraction, multiplication and division operations. The text boxes get
cleared when ‘clear’ button is cleared.
# Design view
# Coding
Add Button
Subtract Button
Divide Button
1
Multiply Button
Output
# On click on Add Button.
# On click on Divide Button.
2
Write an application for Quick Fox Transport LTM.,who wants to
develop an application for calculating amount based on distance and
Q2 weight of goods. The charges(Amount) to be calculated as per rates
given below.
Distance Weight Charge per Km
Greater than or equal to Greater than or equal Rs. 5/-
500 Km to 100 kg
Less than 100 kg Rs. 7/-
Less than 500 Km Greater than or equal Rs. 8/-
to 100 kg
Less than 100 kg Rs. 7/-
Answer
# Design
# Coding
Clear Button
3
Calculate Button
# On click on Exit Button.
Output
# On click on Calculate Button.
4
Write an application to calculate percentage and grade as a
programmer requires developing a student record application. The
Q3 school offers two different streams-medical and non-medical, with
different grading criteria.
# Design
Write the code to disable the ‘txtPercentage’ and the
‘txtGrade’ text fields.
Ans : txtPercentage
txtGrade
Write the code for calculating percentage to display in
text field‘txtPercentage’,after finding the total marks of
first term and second term. (Assuming that both marks
are out of 100) and calculating grade to display in text
field ‘txtGrade’,depending on the selected according to
the criteria in the following table:
5
Stream Percentage Grade
Greater than or equal to 80 A
Between 60 and 80 B
Medical
Less than or equal to 60 C
Greater than or equal to 75 A
Between 50 and 75 B
NON-Medical
Less than or equal to 50 C
Answer
6
Output
# When medical option is selected and calculate button is
clicked.
# When non-medical option is selected and calculate button
is clicked
7
8