Final Examination Semester 2 / Year 2011



Similar documents
One Dimension Array: Declaring a fixed-array, if array-name is the name of an array

Company Setup 401k Tab

1. Create SQL Database in Visual Studio

VB.NET Programming Fundamentals

DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan

National Database System (NDS-32) Macro Programming Standards For Microsoft Word Annex - 8

Unified Monitoring Portal Online Help Account Admin

CRM Setup Factory Installer V 3.0 Developers Guide

How To Connect Legrand Crm To Myob Exo

Changing the Display Frequency During Scanning Within an ImageControls 3 Application

In This Issue: Excel Sorting with Text and Numbers

4. The Third Stage In Designing A Database Is When We Analyze Our Tables More Closely And Create A Between Tables

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

How to test and debug an ASP.NET application

1. To start Installation: To install the reporting tool, copy the entire contents of the zip file to a directory of your choice. Run the exe.

When a variable is assigned as a Process Initialization variable its value is provided at the beginning of the process.

Introduction to Microsoft Access 2003

Using C# for Graphics and GUIs Handout #2

Ambientes de Desenvolvimento Avançados

USER GUIDE Appointment Manager

HOUR 3 Creating Our First ASP.NET Web Page

LabVIEW Day 6: Saving Files and Making Sub vis

Express222 Quick Reference

The resulting tile cannot merge with another tile again in the same move. When a 2048 tile is created, the player wins.

HOW TO CREATE AN HTML5 JEOPARDY- STYLE GAME IN CAPTIVATE

Payroll Import. Version Main screen for Payroll Import.

Quick Start Guide. Microsoft Access 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.

MS Access Lab 2. Topic: Tables

Time Clock Import Setup & Use

Global Search v 6.1 for Microsoft Dynamics CRM Online (2013 & 2015 versions)

Access Queries (Office 2003)

OVERVIEW AND TERMINOLOGY

E A R LY A L E RT S Y S T E M

7. Data Packager: Sharing and Merging Data

Data Visualization. Prepared by Francisco Olivera, Ph.D., Srikanth Koka Department of Civil Engineering Texas A&M University February 2004

Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459)

Many applications consist of one or more classes, each containing one or more methods. If you become part of a development team in industry, you may

Company Setup Payroll Groups Tab

About PivotTable reports

arrays C Programming Language - Arrays

SPSS INSTRUCTION CHAPTER 1

User's Guide. Using RFDBManager. For 433 MHz / 2.4 GHz RF. Version

Scan Physical Inventory

Final Examination Semester 2 / Year 2012

Microsoft Visual Studio Integration Guide

Drawing a histogram using Excel

WHAT S NEW IN MS EXCEL 2013

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development

Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro

Final Examination Semester 1 / Year 2010

Answers to Review Questions Chapter 7

ADP Workforce Now V3.0

Easy Map Excel Tool USER GUIDE

Hands-on Exercise 1: VBA Coding Basics

Using the ihistorian Excel Add-In

GE Intelligent Platforms. Activating Licenses Online Using a Local License Server

Downloading Your Financial Statements to Excel

Tutorial #7A: LC Segmentation with Ratings-based Conjoint Data

Installing and Setting Up the License Manager for Use with Pathfinder Office, GPS Analyst, or Trimble Positions Desktop Add-in

The software shall provide the necessary tools to allow a user to create a Dashboard based on the queries created.

IMPLEMENTATION OF A TIME TABLE GENERATOR USING VISUAL BASIC.NET

Microsoft Access 3: Understanding and Creating Queries

GlobalView Software, Inc.

VB.NET INTERVIEW QUESTIONS

DbSchema Tutorial with Introduction in SQL Databases

Beginner s Matlab Tutorial

Final Exam Review: VBA

StreamServe Persuasion SP4 Service Broker

Query. Training and Participation Guide Financials 9.2

Excel Database Management Microsoft Excel 2003

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

Horizon Debt Collect. User s and Administrator s Guide

The VB development environment

Manual Reference Manager 12 and Word2010

Wave Analytics Data Integration

Project 2: Bejeweled

VB.NET - WEB PROGRAMMING

LS-DYNA Material Table. HyperMesh 7.0

Stacks. Linear data structures

CDD user guide. PsN Revised

Google Apps for Sharing Folders and Collecting Assignments

Updated 08/2015. Wire Transfer User Guide

To create a histogram, you must organize the data in two columns on the worksheet. These columns must contain the following data:

Workshop Tool in Moodle

MICROSOFT ACCESS A. CREATING A DATABASE B. CREATING TABLES IN A DATABASE

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

RIT Installation Instructions

I PUC - Computer Science. Practical s Syllabus. Contents

Bloomberg 1 Database Extension for EViews

MICROSOFT ACCESS 2003 TUTORIAL

CRYSTAL REPORTS IN VISUAL STUDIO.NET 2003

Exercise 1: Python Language Basics

Company Setup Work Comp Tab

The Chi-Square Test. STAT E-50 Introduction to Statistics

Transcription:

Southern College Kolej Selatan 南 方 学 院 Final Examination Semester 2 / Year 2011 COURSE : VISUAL BASIC.NET COURSE CODE : PROG2024 TIME : 2 1/2 HOURS DEPARTMENT : COMPUTER SCIENCE LECTURER : DR. LEE ZHI SAM Student s ID : Batch No. : Notes to candidates: 1) The question paper consists of 6 pages Section A: 10 questions (20 marks) Section B: 2 questions (40 marks) Section C: 1 question (40 marks) 2) Answer all questions. 3) Write your answer for Section A and Section B in answer booklet. 4) Save your answer for question in Section C and submit your answer in softcopy to Southern College E-Learning System.

SECTION A: MULTIPLE CHOICE QUESTION ( 10 questions x 2 marks= 20 marks ) Please choose most appropriate answer. State the answer in the answer booklet. 1. You use the method to add items to a list box. a. AddList b. Item c. AddItems d. Add 2. Which of the following will return a random value within the range of 1 to 10? a. randomgenerator.next(0,11) b. randomgenerator.next(1,10) c. randomgenerator.next(0,10) d. None of above 3. Dim count As Integer = 2 Do MessageBox.Show( VB.NET ) count = count + 2 Loop While count > 10 How many times will the MessageBox.Show method in the code above be processed? a. 1 b. 4 c. 5 d. 10 4. Dim svariable as String = Hello World soutput = svariable.substring(1,3) What is the content of soutput? a. llo b. Hel c. ell d. None of above 5. Dim fullname As String = Hello World Which of the following change the fullname to Helly World? a. fullname = fullname.change( o, y ) b. Mid(fullName, 5,1) = y c. fullname = fullname.replace( o, y ) d. Both b and c 6. Dim IntArray(5) As Integer How many elements in IntArray? a. 4 b. 5 c. 6 d. None of above 1/6

7. Which of the following is FALSE about procedure? a. There are two type of procedure which are sub procedure and function procedure. b. Sub procedure return a value after performing its task, whereas, function procedure does not return a value. c. You can pass information to both sub and function procedure either by value or by reference. d. When calling a procedure, the number of arguments listed in the argumentlist should agree with the number of parameters listed in the parameterlist in the procedure header. 8. Dim num() as Integer ={1, 2, 3, 4, 5,6,7,8} Which of the following value stored in the num(5). a. 4 b. 5 c. 6 d. None of above 9. Which of the following statements sort the Hello array in descending order? a. Sort(Hello) b. Hello.Reverse() c. Array.Sort(Hello) d. Array.Reverse(Hello) 10. If the elements in two or more array are related by their subscripts, the arrays are called as arrays. a. parallel b. coupled c. matching d. associated 2/6

SECTION B: SHORT QUESTIONS. ANSWER ALL THE QUESTION ( 2 questions x 20 marks = 40 marks ) Question 1 (20 marks): a) Write a statement code that enable the option of Explicit and Strict function. Meanwhile, disable the Infer option. (3 Marks) b) Write a Private Sub Procedure namely ProTotal. The ProTotal should contain two integer parameter variables passing by references. The two variable are given the name as inumber and itotal. (4 marks) c) Write a calculation statement in ProTotal sub procedure. The calculation statement is as follow: itotal is equal to inumber multiply inumber. (2 marks) d) Write a statement that declares inum and isum as integer. (2 marks) e) Write an assignment statement that assigns the variable inum to 0 and isum to 0. (2 marks) f) Write a statement that assign InputTextNum.text to variable inum. The assignment statement should include the statement of integer try parse. (3 marks) g) Write a statement that to call the sub procedure namely ProTotal. The statement should include the argument list of variable inum and isum. (2 marks) h) Display the isum variable in LabelBox. The isum variable should be convert to String before display.(2 marks) Question 2 (20 marks) Consider the following Visual Basic code. Answer the following question based on the code below. Dim state() As String = { Malaysia, Singapore, Thailand, United America } Dim phonenum() As String = { 1-800-999-9998, 1-800-999-8006, 1-800-999-6709 } phonenum(1) = phonenum(1).replace( 800, 877 ) (a) Mid(state(3), 8) = Kindom displaylabel.text = state(3) (b) a). What is the latest value for phonenum(1) after we execute statement (a) (2 Marks) b) Write the Visual Basic code that uses the Like operator to determine whether any elements in the state array contains a string begin with letter N then end with letter k. If found, then display that element in statuslabel, otherwise, display Not Found (10 Marks) 3/6

c). What is the output of state(3) in statement (b)? (2 Marks) d) Write the Visual Basic code to show the string length for state(3). (2 Marks) e) What is the output for the code Array.Reverse(state) after statement (b) (2 marks) f). Write a statement to declare an integer type two dimensional array namely Table. The Table array consist of 3 row elements and 2 column elements. (2 marks) SECTION C: CODING QUESTIONS (40 MARKS) Question 1: You need to create an application named as Main that generates ID and score number randomly. Meanwhile the generated ID and score can be added to ListBoxID and ListBoxScore respectively. Finally you can type the ID number the search the score value. Figure 1.0 show the example output of this application. You are advised to use sub procedure/ function and array to answer this question. Figure 1.0 Your tasks are as follows: a) Create user interface as show in figure 1.0. (5 marks) b) Write the function for ID Generator button and Score Generator button. (10 marks) The ID generator must follow the format of XXX-YYY where XXX and YYY are both integer random number within the range of 0 to 999. Both numbers are not allowed to repeat where XXX cannot equal to YYY or vice versa. The final output of the ID must in 7 characters which including - between XXX and YYY. Each ID should be in String data type and not repeated. The Score generator should within the range of (0-100) and the variable is in integer format. 4/6

Figure 1.1 c) Write a function to for ADD ID and ADD SCORE button. For the ADD ID button, once clicked, ID will added to IdListBox while once click the ADD SCORE button, score will be added to ScoreListBox. If there is no value in ID text or Score textbox, the system will pop out a message dialog to inform the user Invalid Input. Figure 1.1 show the output (5 marks) Figure 1.2 d) Write a search function for Search ID button. The system should able to retrieve relevant score value in Label 6 based on the ID number in IDTextBox. You are required to create an public String sarrayid(100) and public integer sarrayscore(100) to hold the value of ID and Score respectively. Figure 1.0 show the example output of this function. (13 marks) 5/6

e) Write a validation function in button Search ID to ensure the number of item in IdListBox and ScoreListBox are the same. If the number of item for both list box are not equivalent, the Label 6 will retrieve the message Length not match. Figure 1.2 show the output. (5 marks) f) Write an exit function to button Exit. (2 marks) 000 6/6