Barani Institute of Management Sciences: Mid-Term Exam Spring 2019

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

BARANI INSTITUTE OF MANAGEMENT SCIENCES

Mid-Term Exam Spring 2019

Course Title: Visual Programming Course Code: CS-692


Discipline /Program: BSCS 6(A & B) Total Marks: 24
Time allowed: 1:15 Hours Instructor’s Name: Mr.Iftikhar Muhammad

Mr. Seemab Zafar

NOTE:-
 Write to-the-point and precise answers to the questions with code examples.
 You are not allowed to ask any explanation about the question paper from anybody during the exam.
Q1: Differentiate between virtual and abstract members with code example. [6]
Q2: Differentiate between out and ref. with code example. [6]
Q3: Write the C# code for the converting Fahrenheit to Celsius conversion for temperature.
Formula = C = 5/9 (° F – 32)
[6]

Control Name Type

txtFarenheit TextBox

txtCelcius TextBox

btnConvert Button

lblFarehneit Label

Q4: Write a C# method double HarmonicMean(double a, double b) that would return the
harmonic mean between the two parameters a and b. Don’t write the entire program, just
write the function, assuming n has already been initialized. The formula for calculating
𝟐𝒂𝒃
harmonic mean is: 𝑯𝑴 = [6]
𝒂 𝒃

 (Best of Luck) 

You might also like