EXAMINERS :
MODERATORS:
This MEMO consists of 9 pages including this page.
SUGGESTED TIME REQUIRED TO ANSWER THIS QUESTION PAPER
QUESTION
SUBJECT
MARKS
TIME IN MINUTES
1
QUESTION 1
2 QUESTION 2
3
QUESTION 3
TOTAL
QUESTION: 1 [25 MARKS]
1.1 Write a program to calculate the final mark of students and to display the marks in a listbox using sequential files. The input values (icasno, name, ca1, ass, ca2 & exam marks) must be taken from the sequential file (10)
1.2 Write a programe to print the Febonici series from 0 to 10 (5)
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim sr As IO.StreamReader = IO.File.OpenText("C:\Users\LAB 502\Desktop\student.txt") Dim capercent, exampercent, finalmark As Double Dim icasno, ca1, ass, ca2, exam As Integer Dim name As String ListBox1.Items.Add("ICASNO" & vbTab & "NAME" & vbTab & vbTab & "CA01" & vbTab & "ASSIN" & vbTab & "CA02" & vbTab & "EXAM" & vbTab & "FINAL" & vbTab) ListBox1.Items.Add("") Do While sr.Peek -1 icasno = sr.ReadLine name = sr.ReadLine ca1 = sr.ReadLine ass = sr.ReadLine ca2 = sr.ReadLine exam = sr.ReadLine capercent = ((ca1 + ass + ca2) / 3) * 0.4 exampercent = exam * 0.6 finalmark = FormatNumber((capercent + exampercent), 0) ListBox1.Items.Add(icasno & vbTab & name & vbTab & ca1 & vbTab & ass & vbTab & ca2 & vbTab & exam & vbTab & finalmark) Loop End Sub
End Class
QUESTION: 2 [15 MARKS]
Write a program to calculate the net salary of an employee using the second & third forms as a dialog box to total the