Preview

UNDERSTANDING VISUAL BASIC

Satisfactory Essays
Open Document
Open Document
976 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
UNDERSTANDING VISUAL BASIC
DURATION: 90MIN MARKS: 60 DATE:
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

You May Also Find These Documents Helpful

  • Powerful Essays

    Write " Thank you, please type 'X' to exit or 'Y' to enter another salary amount "…

    • 671 Words
    • 3 Pages
    Powerful Essays
  • Good Essays

    Pt1420 Unit 21 Quiz

    • 1899 Words
    • 8 Pages

    Complete these answers in your own words. Follow instructions in the Final Examination document. Answer all questions according to the instructions. Number each question here according to its number in the Final Examination document provided by your…

    • 1899 Words
    • 8 Pages
    Good Essays
  • Good Essays

    PRG/420 Week 3

    • 1025 Words
    • 5 Pages

    User 's total compensation // Display welcome message System.out.println("Hello, welcome to the Simple Commission " + "Calculator.") ; // Insert a blank line System.out.println(); // Create a Scanner object to read input Scanner keyboard = new Scanner(System.in); // Get user credentials System.out.println("Please enter your first name.") ; firstName = keyboard.nextLine(); System.out.println("Please enter your last name.")…

    • 1025 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    It 210 Week 7

    • 286 Words
    • 2 Pages

    2. Display the contents of the file GRADES created in Problem 1. Each student’s record should appear on a separate line and include the total score (the sum of the three tests) for that student. For example, a line of output might be as follows:…

    • 286 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Touch Doc

    • 468 Words
    • 2 Pages

    Students may bring this sheet into the exam once approved by the teacher. It is to contain the following.…

    • 468 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    CMIS 102 Homework 3

    • 342 Words
    • 3 Pages

    Program Description - This program will allow a user to input their name and final grades from their courses and calculate their GPA accordingky. The amount of students as well as the amount of classes each student is taking, are undetermined.…

    • 342 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    understanding macros

    • 668 Words
    • 6 Pages

    Complete the following tasks by using the Microsoft® Word® document located on the student website:…

    • 668 Words
    • 6 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Name and Example Output

    • 492 Words
    • 2 Pages

    2) Write a query to display the Student id and the number of grades they have received ***…

    • 492 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    In the space provided below, copy and paste your VBScript Program Code. If it doesn’t fit, use the next page for the continuation of your sourcecode program…

    • 642 Words
    • 3 Pages
    Powerful Essays
  • Satisfactory Essays

    Ocean Tours Visual Basic

    • 1010 Words
    • 5 Pages

    Program Name: Ocean Tours Trip Selection ' Author: Fernando Fresnillo ' Date: 03/09/2012 ' Purpose: The Ocean Tours Trip Selection application determines the ' ocean tours available and calculates the cost of the tour. Option Strict On Public Class frmTours ' Class variables Private _intTwoHours As Integer = 2 Private _intThreeHours…

    • 1010 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Complete Exercise 5 on page 284 Write SQL commands for the following: a. Create two different forms of the INSERT command to add a student with a student ID of 65798 and last name Lopez to the Student table. b. Now write a command that will remove Lopez from the Student table. c. Create an SQL command that will modify the name of course ISM 4212 from Database to Introduction to Relational Databases…

    • 368 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    2) Write a query to display the Student id and the number of grades they have received ***…

    • 400 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    CHAPTER11

    • 2591 Words
    • 18 Pages

    Which line of code will declare and create an instance of a new object variable called…

    • 2591 Words
    • 18 Pages
    Good Essays
  • Powerful Essays

    POS 408

    • 3128 Words
    • 14 Pages

    Create a VB form inside of Visual Studio. The form needs the following components and functionality:…

    • 3128 Words
    • 14 Pages
    Powerful Essays
  • Good Essays

    Visual Basic Practical File

    • 3284 Words
    • 14 Pages

    Aim :- WAP to take input of principal, rate & time and calculate simple interest & compound interest.…

    • 3284 Words
    • 14 Pages
    Good Essays

Related Topics