Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
239 views
86 pages
CSC102 PAST QUESTION.. - Compressed
Past questions
Uploaded by
midn4150
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save CSC102 PAST QUESTION.._compressed For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
239 views
86 pages
CSC102 PAST QUESTION.. - Compressed
Past questions
Uploaded by
midn4150
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save CSC102 PAST QUESTION.._compressed For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 86
Search
Fullscreen
Nnamdi Azikiwe University, Awka Department of Computer Science: CSC 102 - Introduction to Programming 1: 2011/2012 Instructions: Answer All the Questions. Time: 50Mins . @ GUI stands for A. Group User Interface B. Group User Instruction C. Graphical User Interface D, Graph User “Tniterface E. None, OOL stands for A. Object Oriented Language B. Object Oriented Programming C.OOP D. Object On-line Language E. None. ‘New windows in VB arc called A. forms B. property C:imethod D, Variables E. None. One of the components of objects in V.B is A. Properties B. Models C. Orientation D. GUI E. None. Actions associated with objects are called -------- in V.B A. Methods B, GUI C. Properties D. Objects E. None One of the major parts of V.B.NET is: IDE B. GUI C. Transformation D. Orientation E, None. ASP stands for A. Active Server Pages B. Active Service Pages C. ASP NET D. Active Office E. None. The first term used in VB. NET when declaring variable or any array is: A. DECLARE B.DIM C. TYPE D. Integer E.None. ~ In Visual Basic.NET SDK stands for A. Software Development kit B. Software Organ Kit C. Software Interface Kit D, SDK E. None.18, Translator translates program into object code Algorithm B. Source Program ©. Object Program p, hardware File E. Execution. Compiler is 2 A, System Program B. Device ¢ Source Code D, Commands E. None. Assignment of system resources and monitoring computer activities are A. Function B. Limitations C. . Exemptions D. Commands E. Culture ofan operating system. The three types of A. language Translators B, System Hardware C. Object program D. computer device E. Software ........ are compiler, interpreter and assembler. Visual Basic is a type of A. High level Langaue B. Low level ©. machine Language D. OS E. None. Assembly language is a tye of A. 1 ow level B. High level C. machine D. Object coi.. software apparatus. Flowchart is a step-by-step instruction in a A Pictorial form B. Statement form C. Machine code D. High level E. None to solve specific problem. When your program performs 15 + 4, the operation i the operator is A, Addition, + B. Addition an C. Addition and - D. Addition only E. None. " . yu. In Visual Basic, Net when you plan the user ___— a draw the sketch of the screen that the user will s°° ate -
30): A. True B. False C.35 aple34. 35. 36. 37 38. 39. 40. incorrect expres: ion. nation operator 11 VB. E. Join p23 El The concate! &atD_ One of these is an arithmetic operator A. Mod B. = c D> B& The arithmetic expression 7 Mod 4 evaluates to A. 3 B 4 C213 D.21 El Which continuation symbol is used to split a lengthy VB.NET statement to continue on the next line A-B. CQ DO E_ To create a carriage return effect in WB.NET text display, we use A. Chr(0)B.? C.vbCr D. & E. J Which VB.NET function converts a values or an expression to its double equivalent is A.-vbCr B. Chr(13) C, Clint) D. CDbIQ) E. Integer() One of these is a valid variable name in VB.NET A. finalScore B. FINAL*SCORE C. final/score D. final-score E. | FinalScore ‘to 2012 Diploma CSC 102 For Unizik Students -Me. -Toolbox ~Graphical User Interface -Microsoft -Integrated Development Enyi Filed thar mvironment -ToolBox - All of the aboveg.A -Input Box o£ -F=(9/5)*C +32 10.A_ reserved words 11D -Compiler \2.B -Variable 13.B -INTEGERS 14.B. -The variable type is double 15.B -ImputBox (“Enter your reg no:"’) 16.B -Labels 17B -6 18.¢ - Labels 19B -C 20.(-) 2LE -Aray 22.(-) Answer =-1 23.D -False 24.) -While...If 25.(-) 26.D -For ...Next 27.C -While ...End While 2%C -2 29.E - Unknown 30.A -Line 6 3LA -None of the above 32.E -Machine langaue 33.B -False 34.B -& 35.A -Mod 36.A -3 Working: Tmod 4=7+4 = 1R3. thus, the remainder ‘3’ becomes the answer 37.E 38.E ‘ 39.4) -13-- FinalScore. 40.4 ‘dni i Azikiwe University, Awka, ; Si uter Sciences: Csc 102 Examination oer 3012/2013 Session: 01-08-2013: Time: 8-11.an zt il . le Becca Computer Programing 1: Answer All Question, Time Allowed: 50minutes. lgorithms can be defined as Qi. ee list of well-defined instructions for Solving g problem B. Anexample program C, A check box D. Asequence of goods E. None 12, One of the steps to describe an Algorithm is: A, Starting ° first B. By omission C. Flowchart D. Conference § None. Q3. Another way one can describe an Algorithm is througha A. Pseudocode B. Example C. Reuse D: Briefness E. None. Q4. One of these is not a basic control structuring A, Selection B. Sequence‘ C. Repetition D. Transfer E. None. Use the following pseudocode to answer QS through Q7. Algorithm start Get the first value into valuel Get the second value into value2 Add valuel to value? and store result in sum Divide sum by 2 and Store result in average Display sum Display average Algorithm stop SADR wro -14-be used to represent sicp 1 add A> Bet CC DL? BLO Step (6) is regarded as operation. A input B. Output C. decision D. assignment E. None Step (5) is regarded as operation, A, input B. assignment C. divide and rule D.Teiminal E. None of the above One of these is not a way to represent an Algorithm. A. Flowchart B. Pseudocode C. Decision table D. Data flow diagram E. Recursion. A flowchart can be classified as: A. System flowchart and program flowchart B, Terminal C, Reuse D. Briefness E. None. One of these is not a programming element in VB. NET A. Statement B. Declaration C. Method D. Operations E. Good program. In declaring a variable, the two key words used are A. DimandAs B.Dimand For C. Dimand variable D. Dim for Dim E. None of the above. . To run a program in VB. NET, the special key to press is. A.FI2. B.F4 C.F5 D.FIO E.FL Program flowchart may be subdivided into A. Mini and micro flowchart B. Micro and macro flowchart C. mainframe and mini flowchart D. Pseudocode and micro E. None. One of these is not a way to classify algorithm: A, By ‘ le -15-18. 20. 21. 22, 237 implementation B. By design paradigm C. By field of study D. By complexity E. By choice of language. When you declare a variable, two things must be decided. A.Aname and type B.Aname and value C. A name andchoro D.Anameanddouble E. None. One of these is not a data type in VB.NET A. Integer B, °° Double C.String D. Boolean E. Default. Avvariable declared as Boolean can store two values A. Good or bad B, True or false _C. Start and stop D. If and then E, None. The correct version of anumber 1 + anumber 2 = sum is: A. Sum =anumber 1 + anumber 2B. Sum - a number | =anumber2 C.Sum “am +anumber D. Number = sum-number E, None IDE stands for: A. In Dey. Exercise B. Integrated Development Envitonment C. Inverse Dev. Exercise D. Development Tool Kit. E. None. The forerunner of VB.NET is A. Pascal B. FORTRAN C.COBOL D. Visual Basic E. Basic, VB.NET is introduced by A. Appex B. Jame Touch C. Microsoft D. Java E. Apple. s VB.NET is an A. OOP B. Procedural language C. | Sequencing D. Algorithm B, Original language. is the window that provide access to all solution files in VB.NET A. Tool box B. Solution explorer C. Code window D. Files E, None 1K25. 26. 21. 28. 29. 30. 31. 32. window displays the properties for the currently selected form, control or file in Design view. A. msg box B. properties window E. None of the above are the basic building blocks in windows application development. A. VB B. VB.NET C. C. Toolbox D. Code Forms D. Codes E. Graphs The general name given-to compiler in all languages is A. Language translator B.dnterpreter C. Compiler D. VB. Tool The term VB in VB.NET stands for: A. Interpreter B. Tool box C. Visual basic D. Vibrator E. None. Ifa line in VB.NET is preceded by sinble quote, it is E. None of the above is the window that houses the VB form, initially titled form 1, A, Form designer B. Code designer. C. Title form 2 D. Title page E. None of the above regarded as:a line of codes B. comment C. Interpreter D. Translator E. None of the above Ifa variable will held only one character like ‘F” and “T’, we use data type to declare it. A. Boolean B. Integer C. CHAR D. Logical E. None. Concatenation applies to Integer C. Double D, Logical E, None values. A String B. The function in VB.NRT that is used to display output is A. msg box () B. Input box() C. Message D. Boolean E. Integer. -I7-33. 34. 35. 36 ag 38. 39, 40, The part of VB.NET program that users see ang ‘nteract with isteferredtoasthe SA. User Interface B. User window .C. User work D. User floor None. In VB.NET text boxes, labels, command buttons are called A.Controls B.Forms C.Dialogbox p, First form E. None. | The native language of the computer is A. Assembler Machine language C. Compiler D. Interpreter 5, None One of these is a characteristics of an algorithm A, Finiteness B.Briefness C.Closeness D. Too long E, None The two major ways to represent an Algorithm is A, By flowchart. and pseudocode B. By closeness C, By petition to management D. By design E. None Which of the control structures uses IF-THEN-ELSE construct: A. Sequencing B. Selection C.Loop D, GOSUB_ E. None. The first thing to do when using VB.NET to solvea programming problem is to create the where the code will be stored, A.Filebox B. Toolbox C. Project D. Module E, None. When you open Visual Basic from START menu, then you click on on the file menu. A. New projec! B.Saveas C.Oldproject D, Exit E, None.(LU. (OME no LN 1 STUDENT Answers to 2013 CSC 102 For Unizik Stu Ohms: 1A A finite list of well-defined instructions for problem : 2.C Flowchart [other steps for describing algor through Natural Languages, Pseudo cod flow diagrara (DFD) and Decision Tabl C is correct. 3.A Pseudocode 4E None of the above 5C © 6.B Output 7.B Assignment (this can also be regarded a operation). Option B is correct. 8.E Recursion 9.A System flowchart and Program flowcha 10.E Good program (Programming elements include statements, declarations, methods, oper keywords and comments, off which ther like good program). @ption E is Corre 11.A Dim and As |17.B 18.4 19.B 20.E 2L.C 22.A 23.B 24B 25.A 26.D 27.B 28.C 29.B 30.C 31A 32.A 33.A 34.B 35.B 36.A 37.A 39.C 40.A IVETE SUV Yt Currency)]..thus, the correct option is E, r False aun : anumberl + anumber2 : IDE (Integrated Development Environment) Basic (The forerunner of VB.NET is Basic while the designated successor of VB was Visual Basic.NET) Option E is correct. J Microsoft : OOP (Object Oriented Programming) Solution Explorer Properties Form designer Codes Interpreter Visual Basic Comment CHAR String msg box () User Interface Forms Machine language Finiteness By flowchart and pseudocodé project New project. -20).. Nnamdi Azikiwe University, Awka. Department Of Computer Sciences: Second Semester: CSC 102 Examination 2013/2014 Session (REGULAR) CSC 102: Introduction te Computer Programming: Exam Date: Tuesday, 9th September, 2014:Time: 8.00AM-11.00AM: Time Allowed: 50mins Instruction: (a) attempt all Questions and shade the correct answer only; (b). Fill your exam details, shade appropriate Section on the OMR sheet very clearly; (c) DO NOT WRITE ON YOUR QUESTION PAPER (d). Submit this question paper with your answer script. Name:-———-— Reg No;-—---------Department:—--——-—--— al & Which of the following is not an cxample of event driven activity a, The press ofa key on the keyboard b. Movement of the mouse c. The click of a mouse button d. double clicking the mouse . switching on the computer 2. The VB.NET capability of an object to hide its internal workings from other objects is called a, encapsulation b. algorithm c. polymorpgism d. hide and seek e. running 4, OOPL means a. oriented Object Programming Language b. Object Oriented Programming Language c. Object Oriented Procedural Language d. Oriented Object Procedural Language ¢. Old Object Programming Language, is used to swith between the Design and Code Window in VB.Net a. Property explorer b. Solution Explorer Window c. Code Window d, VB form window e. Intemet Explorer 4. In VB.Net-----defines its appearance, behaviour, position, and other attributes a. Look b. Properties c. menu d, solution e. forms 6. The virtual blank space which is used to ipa the user interface for a VB application is called a, form b. object _c. windows d. design space e. drawing board. | Bie16, includes a sct of graphic notation techniques to Create visual models of software-intensive systems a. VB.NET > flowchart c, UML diagrams d. Blocks e. Program In UML, a rectangle divided into three compartment is aq Class icon b.logoicon ¢. Faculty d. Student ¢. Null UML is a. University model language b. Universal model language c. Utility model language." Union modelling language e. Unificd modelling language Use the diagram below to answer the following three questions [___Circie 7 itsRadius ; double’ * * | itsCentre : point Area() : double Circumference () : double SelectCentre (Point) | SelectRadius (double) aHeader b. Name c. Attribute d. Title ¢ ‘Operator aHeader b.Name c. Attribute d. Title ¢. ‘Operator aHeader b.Name c. Attribute d.Title ‘Operator Which of these is a programming construct a. Selection b. Selecting ¢.Choice d.GOTO e. all of the above +- is a Loop programming construct a. Sequence b. Iteration ¢. Selection d. GOTO e. all of the above A loop within another loop is a----- a. Nested Loop b. Loop in loop c. Loop-loop d, Loop Child e. Covered loop A block of code written to perform specific tasks is a--— Loop b. Procedure ¢. Event d. Algorithm e. Process 2 \20. 21. 23. 24. 25, 26 RAY t Object.Property = Value is an a. Equality statement b. variable statement ¢. Assignment statement d. Object Statement e. value statement Assignment Statement consists af how many parts? a. 1b. 2 3 d4 06 BESEESE oe A finite set of step-by-step sequence of solving a given problem is a, a program }, an Algorithm c. a pseudo code d.a Solution e¢, a Computer Choose the right label for numbers 20 to 23 below: S_ Compas Age ; Cevtacaies Chiazlo, Enter yearof bith’ 1975 2 a. Label b. Toolbox c. Textbox d. Button e. Form a. Textbox b, Form ce. Label d. Button e. IDE a. Form b.Form c. Label d. Button ec. Textbox a IDE b. Form ¢. Label d. Button e. Textbox What translate VB.NET programs to machine language a. high-level language b. assembly language c. machine language d. compiler e, Visual Studio Which of the following is not a label control property? a. Name b. Text c. Colour d. Click ¢. Text alignment Objects can be manipulated through the use of three key object features? a. properties, methods & events b, properties, class & events c, class, methods & events d. properties, method & class ¢. procedure, methods & events.28. 29. 30. 31. 32, 33. 34, 35, 36. The syntax for using an objects method is ? a, Method objec, €, object_method c. object.method d method object ¢ method+object The VB.NET statement fimMain hide is an example of a, Propctty b. class ec. encapsulation d.event c method ‘The VB statement : Private Sub cmdsubmit_Click() is an a, Action b, Activity c. Execution d. method e. event Each line of a VB.NET code is called aa. Line b. sentence ¢, language d. statement €. report What is used to group related radio buttons? a. A GroupBox b. ARadioBox c. A ComboBox d. ButtonBox e. BigBox Which of these is NOT a Visual Basic. NET built-in arithmetic Operators a. Exponentiation b, Multiplication ¢, Division d, Addition. Subtraend One of the following is NOT a VB.NET data type? a. Decimal b. Date ¢. Byte d. Integer e, Variable Two operators of the same Precedence, for example + and - , are evaluated in order from a. right to left b. above ©, left to night d. right to right e. left to left. ~~ are used to explain and clarify program code for other programmers but have no effect on the way an application runs a. Statements b. Keywords ¢, Comments d. Objects «. Variables. One of these is a valid variable name in VB.NET a. finalScore b. FINAL*SCORE cc. final/score d, final-score ¢.1 final Score Answer questions 37 to 39 with the statement below; Dim twoDim = {{1, 2}, {3,4}, {5,6}, {7, 8} }I 37. Whatis the array declared above named a. Sdim_ b, twoDim c.4-dimensions d. EightDims ¢. none 38, How many elements are contained in the array a2 b.4 c. 6 a8 ¢10 39. The number of rows in the amay isa.2 b.4 ¢.6 4.8 ¢. 10 40. DIM is used in VB.NET to a, Execute statements _b. Begin Statements c, Comment d. Declare Variable ¢. Assign variable. 41 Which of these is a component of an algorithm a. Instruction b. Sequence c. Selection d. Repetition ¢. all of the above 42. Stepwise refinement is a top-down methodology because it progre: from the a. Known to unknown b. general to the specific c. specific to general d.a& c above ¢. none of the: above. Use the following VB.NET code to answer the next 3 Questions A. Dim cities(3) As String B. Private states() As String = {“Hawaii”, “Alaska”, “Maine”} 43, How many clements are contained in the statement A above?” a3 b2 ¢4 dl 20 44, The declaration of B is said to be a. implied & implicit c. explicit d, invalid e. correct 45. In line B above, the subseripted indexed of “Alaska” is equal al b.3 ¢.2 d.0 ¢. none of the above Answers to 2014 GSC 102 - By Mr Ohm: 1.E Switching on the computer 2.A — Encapsulation. Encapsulation is the capability of an object to =25-BA 9.E 11.C 13.A 14.B 15.4 16.D 17.C 18.B 19.B 20.A 21.C 22.D 23.E 24.D 25.D 26.A hide its internal workings from other objects. Ip ve programmers does not need to know what is goin, aes bi beat but only need to know how to work wae ‘nside object's properties & methods. Option 4 is Correcy, Object Oriented Procedural Language (OOPL) Properties . ‘A form is a virtual blank space to design the user Interface g ‘Or a VB application. Option A is Correct. UML diagrams. UML is a way of visualizing a software program using a collection of diagrams. Option C is Corres Class icon. A class icon is simply a rectangle divided into thre compartment. Option A is Correct. me. Unified Modeling Language 10.B Name (or Class name) Attribute (or Properties) 12.E Operation (or Methogs Selection Iteration. The iteration construct is*» times called the Repetition or Loop Construct. Op Bis Correct Nested Loop Algorithm Assignment statement 2(two). An assignment consists of two parts, valwes and keyphrases, which are separated by an equal sign. An Algorithm Labels Labels Button Textbox Compiler Click Properties, methods & events. Classes consist of fields, Properties, methods & events. Ficld s and properties represe™ information that an object contains, Methods represents a) action that an object can perform. Events are notifications 4° 627.C 28.4 30.B 32.E 35.0. 38.D 39.B 40.D 43.0 448 45.4 DOU LFCRs object receives from or transm applications. Example of an ¢ bea “check_Engine, Option object.method Property 29.6 Eyent Sentence. In VB.NET, code, modules are called chapters. Procedures are called Paragraph and lines of code are called sentences. Option Bis Correct. 31.4 GroupBox Subtraend 33.E variable 34,¢ Left to right Comments 36.4 finalScore 37.B twoDim 8. ie (1,2), {3,4}, {5,6} , {7,8}} = 8 clements(values) 4rows Working: Observe {{1,2} , (3,4), {5,6} , {7,8}} = its to other abject or ‘vent for the “ear” elass would Ais Correct. thus, from the above, we have 4 rows and 2 columns. Option B is Correct. Declare Variable 41.B Sequence 42.B General to specific 4 (ic 0 to 3) Implicit. If we declare a variable using Dim keyword, it is called Explicit declaration, WHEREAS, if we directly use variable without declaring dim keyword, VB Script will automatically declare by itself, it is called Implicit declaration. Option B is Correct. 1 (one) Working: Observe {Hawaii, Alaska, Maine} = Array Valuc Subscripted Index thus, from the above, the subscripted index of Alaska is | WHILE that of Hawaii and Maine are 0 & 2 respectively. Option A is Correct. -27-we University, Awa, FACULTY OF PHYSICAL SCIENCES :Time 40 ming, CSC102 Computer Programming 1: Second Semester Quip The sequence of steps taken to solve a given taskis calleda/an A. flowchart B. plan C.code Dp, algorithny E. none. The syntax for the IF - THEN STATEMENT in VB.NETig A.IF (exp) nB. IF (exp) j1,j2,j3 C.IF (exp), 5123 D.IF (exp) THEN E. None. Which of these is not among the properties ofan algorithm A. finiteness B. definiteness C, mustbe an iutial action D. cach action has a unique successor D.None. Allare operators in VB.NET: except: A. Relational B, logical C. Mixed D. String £. none of the options, The arithmetic operaior used != VS.NET programming for power-ofis: A.* B.A C.** p. power-of E. pow. Which ofthe following isnota correct operator in VB. NET programming? A. AND B.GT. C._EG. D, EQV. E. none of the options. | . Which of the following is an example of a logical operator inVB.NET? A.NOT B.NAND C. NAND. D.NOT. E.EQV x Which of the following isan example of arelational operatorin VB, NET? A.GT B. AND.C. NOR. D..GE E.none of the Options,AUNTRGO(OMPUTE iS t 9 10. 13, AVB. NET program should end with? A.END. B. END C..END.D. STOP E. none ofthe options. IfA=TRUE and B= FALSE; then B. NEQV.Ais (a) TRUE (b) FALSE (c) undefined (d) none of the above Use the program below to answer Questions 11-15 Sum = 0 DO 10, 1 =0, 10, 2 PRINT *,1 SUM=SUM+1 10 CONTINUE How much iteration will this program have? A, 6 B. 5 C.4 D.3 E10. Which of the variables in the program is called the control variable? A. sum BDO C. 1 D, CONTINUE E. none of the options. The loop terminator consists of ? A. SUM, 0 B. po Cc. 10 D. 10 CONTINUE E. none The resulting values (0, 10, 2) are called scoeeeee---Of the DO LOOP A. parameters B. letters C. control variables D. key numbers E. none of the options. If the increment of the program is omitted, what will be the outeome of sum? A. 50 B.30 C.10 D. 55 E. none of the options. The Concatenation operator in VB.NET is A. & B. Concat C.* D.+ B._ The computer understands just one language -29-20. 21: 22. 23. 24. 25, called a. Operator b, Assembly ¢, Machine d. Algol ¢. VB.NET is an example of a high level language soe Cobra b. SSAS ¢. Apron d. VB.NET ¢. Junk A compiler is an example of a Computer game b. language translator ¢. Using language d. Modern language e. None The sumbol X(20) indicates a number 20 for Xb. X is 20 c. The 20th element ofan array —. just an element of game e. None "What will be the value of the expression (2+ De + £), ifk = 8, e=2,f=3 a4 b2 c3 d6 ©8 The VB.NET equivalent of (a’+b’) is (c+ay The term RAD in VB.NET programming stands for a. Rapid Aid Development b.RapidAssistant Development _ c. Rapid Application Development d. Rapid Application Distribution The term IDE in programming stands for a. Intelligently Defined Electronic _ b. Invested Definite Environment c, Integrated Device Environment Internet Design Environment e. Integrated Development Environment Programming elements in Visual Basic include -30- the ud21, 29. 30. 31. 32s Jey ULUN IE following except a. Statements b, task ¢.declaration d. comments ©. operators, *Modules’ in Visual Basic are like - a.procedures b. paragraph c,chapters d. sentences ¢, topics. All these are found on the Visual Basic. NET IDE except___a. Toolbox -b,FirmDesigner ¢. Code window d. Solution Explorer. Properties window Code window used to edict source code in VB application developmentis called a. codeeditor b.codeexplorer c.code compiler d.codetranslator contains icons representing controls used to customise forms. a. Solution Explorer b. Textbox ¢. Toolbox d_.Properties e. Textbox is a letter orname that can store a value a.Constant b. Variable c.Alloftheabove d.Noneof the above is aseries of text characters, such as letters, numbers, special characters and spaces. a. String b. Variable c.Data d. Controls Composite data type include the following except a.Arrays b.components c. Structures d. Classes Data type in Visual Basic include the following except a.Char b.Boolean c.object d. subject e. composite -31-34. 35. 36. 37. 38." 39, “40, Ue In VB.NET, the data type used to hold a string Characte k is b.Char ¢.Boolean d. Composite a. String . . “ The primary control for displaying textin VB.NET isthe a.Messagebox b. Inputbox e¢, Labels ‘Eiestbon: e. List box In the Label control, the fore Color property determines the a.Displayfont b. Colorofthe text itselp * ¢, Color of the area surrounding the text d. Color ofthe tea outside the text The programming element used to store a group of: Values of the same type is called a.form. b.size c.text d.position e. placement The correct form of the visual Basic Statement L42+B*2=Tis a.L42=T-B4) b.B=T-LA2 ¢,T=L424+B42) d. (L+B)=SQR(T) e.None Which of the following repetition constructs tests for a loop termination condition a, Do Until... Loop , ». Do...Loop While ¢, While... End While d.While...Wend e. None One of these is a Tepetition structure in VB.NET a. While Until...Loop b. While... Wend ¢. While... Loop @For..Next ¢ Do Until... While -32. iAnswers CSC 102 Quiz For Unizik Students: By Mr. Ohms ID 2B 2D 4c 5B 6c 1D 8.E 2 23.C 24E 25.B 26.C 27B 2A 29.C 308 33.D 37. 38.C 394 40.D 9B 17C 10A 18D 1B 19B 122C =620C 13D 21 (none) 14C * 1S.E : -16.A 2 Answer* (a%2+b*2)(e+d)2 Rapid Application Developmént IDE = Integrated Development Environment Task * . Chapters . Form Designer Code Editor * Toolbox - J Variable. 31.A String 32.B Components Subject 34.B Char 35.C Labels 36.B Colourof the textitself. 2 Array T=L‘2+B‘%2 Do... Loop While For... NextFACULTY OF PHYSICA \CIEN' 50m; Department of Computer Science: anapore Dip Exams: Course Code: CSC 102: A computer is basically an independent and intelligent machi a.Truc b.False c.Sometimes d.None “tie? IDE stands for a. Integrated Developme ‘b, Integrated Development Environment c, Integrated DevelopmentEntity d. Instant Data Encryption TM EXper, isa feature ofan IDE that provides you with guidance and correct syntax when writing programs? a. Program code b.intellisense c.intelligence d.userinterface AVB.NET data type that allows you to store only one uftwo possible valuesis 2a.Boolean b. Integer ¢, String d, Double The concatenation operator in VB.net is Dak bro. a" Ze Thé VB.net function that displays information to tlic user asa smalldialogboxis___? a, SmallBox()_b. MseBox() ¢.UserBox() d. InputBox() ‘The term “visual” in visual Basicrefers to the .wility to create__ applications?a.user b,GUI c.RAD 4. KAM In VB.NET variable declaration and. are usually Specified? a. space andtime b,nameand data c. memory and field d.none AVB. net. tdialog box that prompts user to makean input tothe Programis_____?a,InputBox b, Textbox c, UserBox dEntryBox(SL 10. 20 21, DY CUPLAER tr DEN U8 ‘The part ofthe VB.net program that users sec and interact with when they run the program is ?a.userwindow b. user interface ¢.output window d.none is the primary control forreceiving text from the user? a.textbox b,label ¢.checkbox d.InputBox ___ is both a VB.net assignment operator and relational operator? a.< b.<> o<= d= The arithmetic expressions 16mod 5 will give Jal b.3 24 dO Aspeciallized program that converts the VB.Net code into machine language is 2a. Visual Basic b.Compiler ¢. Interpreter d. Assembler | Ifa=$ and b=20, whatis the result of the logical expression: Not(a<=5 Orb>30) Ya.false b.true c.none d. incorrect expression The android operating system commonly found in mobile devices is currently owned by 3a, Techno b, Samsung c. Microsoft d, Google Aconcept in problem solving includes the following except 2a.psendocode b. flowchart c.algorithm d.none programming clement is used to store values that change during program execution?a. Arrays b. Constants c. Variables d. Integer is used by aprogrammer to debug (run)a VB.net program in Visual Studio? a.F5 b.alt+F5 ¢.ctrl+F5 d.P6 ‘No Question VB.Net keyword for variable declaration is, 2 a,Create_var b. Ver c. CONSTANT d. DIMENSION -35-yc Fe 24, * 25. 26. 27. 28. d 2 *. 3 number2 = 4 3: What is the full meaning of RAD. a. Rapid ADplicati nt, Rang tian Developer b. Rapid Application Developme; bat ‘Access Design d. Rapid App Design What is the full meaning of GUI" 2a. Graphical Interface b, Graphic User Interface c. Graphics Users Tnterfact e d. Guided User Interface The property ofa form control that allows you to modify its position is 2a. Position b. Location ¢. default d.nong All these are found in the Visual Studio IDEexcept 5 a, toolbox b. selution explorer c. property Window a propertieg window ; Use the program below to answer question 27 Dim aBolean As Boolean=True “The variable name from the VB.net statement above is 9 a.aBolean b.true c.aBoolean d.Dim Use the program below to answer question 28-32 Dimnumber|, number2, As Double number] =7,2 8 sum =number! + number? MsgBox(”Sum ="sum) -Which of the line will produceerrora.1 b.2 ¢.3 d.1&5 05 . . What Condition allows you to declare more than one variable on the same line? a. Different data types b. Same data types c. Only String Data type d.None ‘ Ie30. we 8 33, 44. we 5. ‘LB 2B 3B 4A SA Whatis missing inline 5?a.ampersand b,+ d.And d,None What problem does line 4 have ? a. Variable Declaration b, Initialization c.Double d,None Ifthe program had no errors, what would have been printed? a.9,0 b.8,5 ¢,10.0 “d.None Debug the following Program. Answer 33 & 34 1, Dimnuml As Double=4.5 2. Dim num2 As Double 3. num2=InputBox (“Enter Value for num2”) 4. MsgBox(“Number2 ="“& num2) Which line needs debugging?a.1 b.2 c.3 d.4 What would be printed inlinc?a.4.5 b.6.0. c.userinput d. None What property do-youneed to editto change the textappearance — ofacontrol?a, Text bName c.BackerColour d.Font Unizik 2015 CSC 162 Answers (Diploma) - By Mr Ohms False IDE = Integrated Development Environment Intellisense Boolean & MsgBox GUI name and type data InputBox User Interface Textbox Working: 3 16mod 5= =3 Remainder | (3 R 1). The remainder ‘1’ becomes the answer. None -37-i 18.¢ Variables 19.4 FS 20(-) 21.D DIMENSION 22.4 MsgBox 23 RAD=Rapid Application Development 24.4 GUI=Graphical User Interface 25.C Default 26.C Property window 27.C aBolean 28.E Line 29.A Different datatype 30.4 Ampersand 31. 32.C 10.0 33.B2 34. 35.E Font Nnamdi Azikiwe University,Awka Department Of Computer Science: Second Semester Examination 2014/2015 Session(CEP): CSC 102 - Introduction To Computer Programming: Date: Saturday, 14th November, 2015, Time: 08:00-10:00AM ; Time Allowed: 50mins Instructions: (a). Fill your exam details, shade appropriate sections onthe OMR sheet very clearly. (b). Answer All Questions. 1 VB.NET isahigh level language. Anothername for high level language is. 2a.manmade_b. general purpose c.highexecutable d, machine compliant e. human convertible For question numbers 2, 3. and 4, choose the righi answerw ‘oon 1.0 POE Properties Window b. SolutionExplorer ¢. Form ign View d. Control Toolbox ¢. Code Window Bisa. Properties Window b. Solution Explorere. Form Design View d.Control Toolbox ¢, Code Window Cisa. Properties Window b. Solution Explorer c. Form Desigg’) View d.Control Toolbox. ¢. Code Window. . VisualBasic. NET isa(n) programming language? a.code-driven b, logic-driven c. event-driven d. form-driven e.allofthe above . For question numbers 6, 7 and 8, choose the right answer: Rectangle ItsLength: Double ItsWidth: Double Area(): Double Perimeter: Double a.header b.name c.attribute d.title ¢. operation a-header b,name c.attribute d.title ¢. operation a.header b.name c,attribute d.title ¢. operation The VB.NET statement frmMain.hideis an example of. 2 a.property b.class ¢. encapsulation d.event e.method VisualBasic.NET enables. of GUL applications? a.MAD b.DAR c.ADR d.RAD e,NAD Which of the following isnota label control property? a, Name b.Text c.Colour d.click e. alignment DIMisused in VB.NET to 7a. assign variable b. begin statement ¢, write comment 4, declare variable e, execute statement 39.16. 18, 19. 20. 21. 22, MU LEVY) il usedto explain and clarify program, = rs but have ne effect on the way de fo, thee i AN appli aan ib. reserved word c.comment vert object "7 : the VB.NET IDE exee these are found on cept sep b. SolutionExplorer ¢.Code Window im “ Explorer e. Toolbox hon The VB.NET capability ofan object tohideits intemal workings fromother objects isealled_2, enc, ula algorithm ¢. polymorphism. d. information hiding ¢, hide and seek isusedito switch between the design and code wingyy, in VB.NET? a. property explorer z b. solution explorer c.code window d. VB formwindow e. internet explorer. One of these is nota VB.NET data type? a, Date b. Byte c.Integer d.Decimer ¢, Variable Which oftheseis nota VB.NET built in arithmetic operator? ‘a.exponentiation b. multiplication c. division d. addition e.subtraend The VB.NET statement: private sub cmdexit_Click()isan_? a.action ‘b. activity c. execution “d.event e.method The syntax for usingan object method is a.method.object b.object_method c. object.method d.method object e.method-+object Objects can be manipulated through the use of three key object features? a. property, methodandevent b. property, class a event ¢.class,methodandevent d, property, method jand class ©.procedure,methodandevent — . le Sperators of the same precedence are evaluated inorder ‘om____?a.righttoleft b. left toright c. right to righ! be 24n. a24. 25. 26. 27. 28. Ocoee x dlefttalef e. None EachlineofaVB.NET codeisealled ?a.line b. sentence c.language d.statement ¢, code VB.NETisa programming language developed by #: a. Sun Microsystems b, AppleIne ¢,Oracl International — d Microsoft e.IBM Forquestion numbers 25, 26 and 27, choose the right answer: Loe a.Textbox b.form c.label d. button ¢,IDE a.button b.IDE c.label d. Textbox e. form a.button b. Textbox c.label d.form e. IDE Use the program to answer Questions 28 1030 1. Dimname As String 2. Dim currentYear As Integer=2014 3. Dim yearOFBirth As Integer 4. DimageAs Integer 5. Dim msgStringAs String 6. name = InputBox(“Please enter your name....”) 7. yearOF Birth = InputBox(“Please enter youryear of birth”) 8. age=currentYear - yearOfBirth 9. msgString =“Hi” &mamed&”, you are” “&agese” years old” 10. MsgBox(msgString) The following are variables in the program except? a, msgString -41-29. 30. 31. 32. 33. 34. 35, 36. 37. b.MsgBox c.age d.currentYear e.name ‘Which of these variables was initiated witha value on declaration? a, msgString b.InputBox c.age d.currentYear e.name How does the variable age get its value?.a, computation and a ment z ‘b. input from the keyboard c. ithas no value d. initialisation after declaration ¢. read from file If the figure for questions 25, 26 and 27 is the output of the program, then the inputs in lines 6 and 7 are? a. Chinelo, 1998 b, Jennifer, 16 ¢. 1998, Jennifer d.Jennifer,2014 e, Jennifer, 1998 Which of these is used to group related radio buttons? a. group box b.radiobox c.combobox d,buttonbox e. bigbox Visual Basic was firstreleased in 2a, 1971 b. 1981 c.1975 d.1991 ©1985 Object property =Valuc isan a. equality statement b. variable statement c.assignmentstatement d. objectstatement e, value statement VB.NET isan IDE. IDE stands for 2a. Integrated Develoment Environment b. Integrated Development Environment c. Incorporated Development Environment d. Integrated DenegerationEnvironment e. Integrated Development Environment» (A‘2+M*N*2)/SQR(2) isan example of. 2a. VisualBasic Expression b. VisualBasic Statement c. VisualBasic Equation d, VisualBasic Language e¢.Noneofthe above includes a set of graphicnotation techniquesusedto create visual models of software-intensive system? a. VB. T b.flowchart c, UMLdiagrams d.blocks e.program39. 40. 4L. Az. 43. 44, 45. 1B 2D 3.¢ 4B 5.c 6B Phe lank interface, fora VB applicationis called 2a.form b. object c, windows d.designspace e. drawing space Arectangle divided into three compartments in UML represents Jaobjecticon b.classicon c.facultyicon d, program’ icon ¢, function icon UML means? a. Universal model language_b. Universemodel language c. Universal modeling language d. Unified modeling language e.none OOPLstandsfor__?a. oriented object programming language b. Object oriented programming language ¢. oriented abject procedural language d. outdated abject programming language none A finite set of step by step sequence of solving a given problemis ‘aaprogram b.apscudocode c.analgorithm d.aprogram steps ¢.acode sequence ‘What is the array declared above named? a. Dim b.DimarrayDim c.arrayDim 4.twoDim e. fourDim How many elements are contained in thearray?a, 2 b.4 ©.6 4.8 210 The number of rows in the array is at b4 0.6 d8 e610 inizik 2015 CSC 102 Answ. - By Mr Ohms. General purpose Control Toolbox Form Designer View Solution Explorer Event-driven Name Attribute (or Property) -43- 7 ‘16. 17E 18.E 19.D 20.C 2LA 22.B 23.B 24D ‘Operation (or Method) ‘ Property i RAD (Rapid Application Development) Click Declare Variable Comment Window Explorer. In VB IDE, there is nothing like Windows Explorer, Rather, what we have is Code Window, Solution Explorer, Form Designer, Toolbox, Properties Window. Option Dis Correct “ Encapsulation. Encapsulation is the capability ofan objectto hide its internal workings from other object. In VB, programmers do not need to know what is going on inside the object, but only need to know how to work with the object’s properties and methods. Option is Correct. Variable Subtracnd Event object.method Property, method and event. Classes con: sist of fields, properties, methods & events. Field sand properties representinformation that ar object contains. Methods represents an action that an object can perform. Events arc notifications an object receives from or transmits to other object or applications. Example ofan event forthe“car” class wouldbea‘‘check Engine. Option Ais Correct. Leftto right Sentence, In VB.NET, code, modules are called chapters. Procedures are called paragraph and lines of code are called sentences. Option Bis Correct. M..rosoft. VB.NET is a programming language developed by une -aworld leading software company. Option Dis orrect.ine CA AU UE. 25.C Label 26.A Button 27. Form The General format is shown in the diagram below TextBox Labels Button 28.B MsgBox. In Vb, we use Dim statement to declare variable. Option Bis Correct 29. CurrentYear 30.A Computationand Assignment 3LE Jennifer, 1998 32.A Group box 33.D 1991 34.C Assignment Statement 35.E IDE=Integrated Development Environment 36.4 VisualBasic Expression 37.C UML digrams. UML is a way of visualizing a software program using a collection of diagrams. Option C is Correct, 38.A Form 39B Classicon. Aclass iconis simply a rectangle divided into three compartment, Option Bis Correct. 40.D UML=Unified Modelling Language 41.B OOPL=Object Oriented Programming Language 42.C AnAlgorithm 43.C arrayDim 44.D — Belementsi.e {{1,2},{3,4}; (5,6), {7,8} } 45.B 4rows -45-Worksng: Observe {{1,2} , 43.4} {5.6}. {7,813 = |L12 Row | 3.14 Row2 3 Row3 o [8] Row 4 thus, from the above, we have 4 rows and 2 columns, Option B is Correct. Nnamdi Azikiwe University, Awka. Department Of Computer Sciences: Second Semester: CSC 102 Examination 2014/2015 Session (REGULAR) CSC 102; Introduction to Computer Programming: Exam Date: Friday, 31s July, 2014:Time: 8.00AM-11.00AM: Time Allowed: S0mins Instruction: (a) attempt all Questions and shade the correct answer only; (b). Fill your exam details, shade appropriate Section on the OMR sheet very clearly; (¢) DO NOT WRITE ON YOUR QUESTION PAPER (d). Submit this question paper with your answer script. Name:-~ ----Reg No: a----Department:—-—-----------— 1 One of the following is an example of eventdriven activity a. Thepressofcomputer button b. Movement ofthescreen c, Mouse focus d.branch operation e. switching onthe computer 2. and are abstraction mechanisms a. Objects and incthods b.Algorithmand programs c. Polymorphism and objects d,methodsandselection e. encapsulation and objects 3. VB.NETisa. Procedural Programming Language b. Object ‘Oriented Programming Language c. Object Oriented Procedural Language d. Natural Programming Language e. Morden Programming Language 4, is nota VB.NET object? a. Property explorer _b. Mouse pointer c.Combobox d.VBcode window e. Solution -46-Explorer 5. In VB.NET the properties of and object defines its aappearance b.behaviour c. position d.all ofthe above e, None of theabove 6. refers to program created in VB.Neta. Project b. Object c.File d. Software e.Allofthe above 7 isnotapartof the problem solving process a. Analysis b.Organize c.Design d.Implementation e. Compilation 8 UMLisastandardized ___in the field of software engineering a. General-purpose modeling language b. Object oriented. modeling purpose c, Flowchart modeling d. data flow model e. None of theabove 9. describes the structure ofasystem by showing the systems classes, theirattributes, and the relationships among the classesa, Relationship b. Classdiagram c. Unity diagram d.Classrelationship ¢. System diagram ‘Use the diagram below to answer the following four Question aboutUML 10. Label 10 represents a?.a.Class b. Supertype ¢. Parenttype d.Fatherclass ¢. Mother class the isa/an?a.Arrow b.Relation c.Gencralization d. Family c. Aggregation -4T-19. 20. 21. isa?a.subtype b.subclass c.childclass d, childtype Title e. baby class The diagram indicates aa. Aggregation b. Association ¢.Composition d. Generalization ¢.Commulativity Repeating the execution ofone or group of statements in program isunder certain conditions called a. Sequencing, Iteration c.Selecting d, Jumping e.Arepeat . AFOR.., NEXT statement contained in Do loop in the same program isaa.FORDostatement b.Coveredloop ¢.Twa loop-system d.Doubleloop ¢.Nested loop VB.Net procedures end with?a.End b.Exit c.astop e.End sub ¢.Endif isused forselectiona. IF Statement b. FOR---NEXT c.GOTOStatement b. Executable Statement ¢. While statement. Assignment Statement consists ofhow many parts? a.1_b.2 c3d4 66 Asetof step-by-step sequence of solving a givenproblemis a.aprogram b.anAlgorithm c.apseudocode d.aSolution e.a Computer Which of the followings nota VB.NET Primitive datatype a.Boolean b.Character c.Byte d.bit e.short To assign the Number 12 into a variable called Unizik, the correct VB.NET statement will bea. Assign Unizik to 12 b. Assign 12 into Unizik ¢. assign 12inUnizik d.Unizik=12 ¢.12+ Unizik os Ais greater than or equal to B issameasa. A=>=B b.A<=?8 cA>=B dA=>B eB<=A -48- ‘ ad26, 27 28. 29, 30. Forl =| to 20step2 isa. An executable statement p.Acomment c.aloop d.AForstatement e, AnArray Objects can bemanipulated through a, Methods , Properties c.events d.Allofa,bande e.Noncofthe above The VB statement frmMain-hide isa. method. A property ¢.aDimension d.AnEvent e.AnEvent. Use the following Program to answer questions 26 to 28 Dim index AsInteger=0 Do While index <= 100 Ifindex> 10 Then Exit Do EndIf Debug. Write(index.ToString &””) index+=1 Loop How many loops are in the diagram above?.a,1 b.2 ¢.3 d.4 e. None The Exit Do? a. Ends the loop ifindex isless than 10 b. Ends the Do loop if index is greater than 10 c. Ends the Do loop if index is less than 10 d. Prevents the Do from an indefinite loop e. Terminates the loop at will Which optionis falseabout the program, a. To Do is nesting the IF Statement b. the IF isNesting the Do statement c. Index is avariable d. Index isincremented after the Endif ce. there are more than one loops. The VB statement; Private Sub emdsubmit_Click()is an Action b. Activity c. Execution d.method e.event The atithmetic expression 11 Mod 2 evaluatestoa.3. b.4 -49-Le OQ RA 31. 32. 33. 34: 36. c. 156 d.21 ¢.5 What is used to group related radio but b.ARadioBox c.AComboBox 4.B Ifx=5 and y=20, What is the result of expression Not (x <= 5 or y,> 30) a. Inc c.35 d.25 e.True Use the VB.NET statement below to questions: Dim Studname (5) As Integer Studnameisa.AnArray b. Constant d. Integer e.Acharacter Studname has elements?a.3 b is the subscript of the array a ¢. studname Integer isthe? a. Index b.Array c.Di e. Value Answer questions 37 to 39 with the sta’ Dim FourDim = { {1,2}, {3,4}, {5,6},Hat Ln ‘One of these is nota version of VB.NET. 2005 2004 42. ©.2008 d.2012 ¢.2015 43, command will enable input froma keyboard a. Use.keyboard ».Console.ReadLine . Console. WriteLine ‘a d. Keyboard.Input e. Keyboard.Enter «44 will displaya messageboxon the screen? a. Message.box b. MsgBox.show c. MsgBox.display d.MsgBox.Screen_ ¢. Display.MsgBox 45. Whichoftheseisnotan Algorithm? a. A flowchart b.AnEquation c.Almighty formula d. IF-Then Construct e. Dim Statement . Answers to 2015 Unizik CSC 102 (Regular) - By Mr Ohms LE Switching on the computer. In computing, an eventis an action or occurrence recognized by software that may be handles by the software. Computer events can be generated or triggered by the system, by the user or inother ways. Examples of event driven activities are Mouse clicks, window-resizing, keyboard presses, branch op| eration, message from other programs etc. Option Eis Correct. 2.E — Encapsulation and Objects 3.B Object Oriented Programming Language (OOPL) 4B Mouse Pointer 5.C Position 6A Project 7A Organize 8A — General-purpose modeling language: The Unified Modeling Language (UML)is a general-purpose, developmental, modeling language in the field of software engineering, thatis intended to provide a standard way to visualize the design system. Option Ais Correct. 9B Class diagram, In Softwareengincering, aclass diagram in the -5]-10.4 ILC 12.B 14.B 17.C 20.C 21.D 23.E 27.B 28.D 29.E 30.D 32.E Unified Modeling Language (UML) is ap diagram that describes the structure of, ‘YPC Of static g system's classes, their attributes, operat yst the relationships among objects. Optjg, aa Class (or Parent Element) Generalization. General ization isa Telationgh: aspecialized clement with a generalizeq apellp Which connects 1G represented by an arrow witha hollow hea, ioe tis end, ie ————> tructuy showing the (ormethods), and isCorrect. The arrow end/head represents the parent clement; end isthe child element i ie Child Generalization Parent cethe other SubClass (or Child Element) 13.D Generalization Iteration 15.E Nestedloop 16.A End GOTO Statement 18.B 2parts 19.B AnAlgorithm Bit. Abitisa unitof Information expressed as cither a (or 1 in binary notation and cannot bea VB Primitive datatype. Option Cis Correct Unizik=12 22.C A>=B 23,C aloop 24.D Allofa,bandc Method 26.E Unknown Ends the loop ifthe index is greater than 10, The [fstatementin the loop causes the ExitDo statement to stop the loop when the index variable is greater than 10. Option B is Correct. Index is incremented after the End if Event Working: 11 mod2=11+2=5R1, therefore,the remainder'l’ becomes the answer. Generally, In computing, themodulo(med) operation finds the remainder after division ofone number) another (sometimes called modulus). Option Dis Correct. GroupBox. When using a container control to groupradio buttons, the GroupBox control is the best choice, becavse the border provides a visual cue that the group of ‘choices belongs together. Option Ais Correct. We True. Osan Not(x<=5 ory> 30), wherex=5 aS noticed from the abovei.e (x
30) isnot TRUE" 7 FALSE, Generally, if the logical editions are TRUE, then? |36.C 37.4. 38.D 39.B. 40.0 ALA 42.B 3B 44.B 45.E operator will return the value FALSE. However, ifthe logical conditions are FALSE, the NOT operator will return the value TRUE. Option E is Correct. Anarray 2 he = Array element (6) siedromows) = Fela ere ls : sl ws ut 5, Given Dim Studname (5) As Integer, the ‘5 Indicates the last subscript in the array. Option Ais Correct. Datatype FourDim §Elementsi.e {{1,2),(3,4}, (5,63, {7.81} 4rows Working: Observe {{1,2}, {3.4} (5,6), {7.8} = nus, from the above, we have 4 rows and 2 columns. Option B is Correct. Solution Explorer 2004 Console.ReadLine MsgBox.Show Dim Statement -53-Nnamdi Azikiwe Universi Departm ent Of Computer Sciences: Seensa ee a uation 2015/2016 Session (CEP) mere SS 102 thy . Tetraitaetion to Computer Programming: Exam Dat ‘5 ecember, 2016:Time: 03. 01 img Aieapy Det Des ‘Time: 03.00PM-06.00PM: Time For question numbers 1, 2 and 3, choose the right answer, Dim arrayDim = {{1,2}, {3,4}, {5,6}, {7,8}} 1, What is the array declared above named? a. Dim b, DimarrayDim c. arrayDim d.twoDim e. fourDim 2 How many element are contained in the array? a.2 b. 4 26 4.8 €.10 3. The number of rows in the array is a2 v4 6.6 d8 ¢.10 includes a set of graphic notation techniques used to create visual models of software-intensive system? 5. The virtual blank space which is used to create the user interface for a VB application is called 2 a. form b. object c. windows 4d. design space ¢. drawing space 6. Arectangle divided into three compartments in UML represents 7a. objecticon ». class icon c. faculty icon d. program icon e. function icon. he UML means. ? a, Universal model language b, Universe model language c. Universal modeling language d. Unified modeling language ¢. Unified! model lingua. 8 VB.NET is an IDE. IDE stands for__?® Integrated tb, Integral Development Development Emvironmen Environment ¢, Incorporat . Integral Denegration Enviro Development Environment ed Development Emvironment ment e. Integrated na12. | jeg {RAD ONS (AS2+ M*N*2)/SQR(2) is an example of a, VisualBasic Expression b. VisualBasic Statement c. VisualBasic Equation d- VisualBasic Language ¢. None of the above. . OOPL stands for 9 a, Oriented Object Programming b, Object Oriented Programming Language ° Oriented Object Procedural Language d. Outdated object programming e. None of the above VB.NET isa high level language. Another name for high level language is ? a. manmade b. general purpose, c high executable d, machine compliant e, human convertible. The VB.NET statement frmMain hide is an example of a. property b.class c. encapsulation d, event ¢, method For question numbers 13 and 14, choose the right answer @ ® a. Pripenties Window b. Solution Ex; fecer F i View a Contol Toolbox. 2, Cole Window 2 ee a, Properties Window b. Solution Explorer i View d. Control Toolbox e, Code Window. ae Objects in VB has 2 a. To . . Tools and control b Properties and methods ¢. Names and labels 4. Controls and Methods ¢, Controls and Properties ‘16. Changing the text on or colour of an object at design time wil} be achieved through the ? a, Propertics Window b. Text Box c. Solution Window c. Tool Box d. Paint Box 17, VisualBasic. NET is a(n) programming language? a. code-driven b. logic-driven c. event-driven d. form-driven e. all of the above, 18. the BNET Capability of an object to hide its internal Fee me other objects is called ? a, encapsulation ie a m ¢. polymorphism d. information hiding e. hide 19, private Sub cmdexit_VB.NET statement? a. action bb. activity c. execution d. event ¢. method. For question numbers 20, 21 and 22, choose the right answer [20] itsRadius : double itsCentre ; point Area() : double Circumference () : double SelectCentre (Point) SelectRadius (double) 20. a.header b.name c. attribute d. title e¢, operation 21. aheader b,name c. attribute d, title e. operation 20. aheader b.name c.attribute d. title e. operation 23, VisualBasic. NET enables of GUI applications? a. MAD b.DAR c.ADR d.RAD ¢, NAD 24. Which of the following is not a label control property? @. Name b. Text c.Colour d. Click ¢. Alignment 25, DIM is used in VB.NET to ? a, assign variable . begin statement c. write comment d, declare variable _ 56- adi27. 28. 29. 30. 31. 32. 33. 34. 35, fi VDE e. execute statement _is used to explain and clarify program code for other rogrammers but have no effect on the way an application runs? a. Statement b. Reserved word c. Comment d. Variable e, Object All of these are found on the VB.NET IDE except? a. Form Designer b. Solution Explorer c. Code Window d. Windows Explorer ¢. Toolbox is used to switch between the design and code Window in VB.NET? a. Property explorer b. Solution explorer c, Code window d. VB form window. Internet explorer One of these is not a VB.NET data type? a. Date b. Byte c. Integer d. Decimal c. Variable Which of these is nota VB.NET built in arithmetic operator? a. exponentiation 5. multiplication c. division d. addition ¢, subtraend The syntax for using an object method is 2 a: method.object b. object_method c. object.method d. method_object e. method + object Objects can be manipulated through the use of three key object features? a. property, method and event b. property, class and event c. class, method and event _d. property, _ method and class. procedure, method and event. Two operators of the same precedence are evaluated in order from ? a right toleft b. lefi to right c. right to right d, left to left e. None of the above. Fach line of a VB.NET code is called ? a. line b. sentence c. language d. statement e. code VB.NET is a programming language developed by ?aiairatn f fn. ih i ni ni Ui VIER a, Sun Microsystems b. Apple Inc c. Onacle Inivis d. Microsoft. ¢. IBM For question numbers 36, 37 and 38, choose the right answer. pao 36. a. Textbox b, form c. label d. button e. IDE “37. a.button b. IDE c. label d. Textbox e. form 38. a. button b. Textbox c. label d. form ec. IDE Use the program to answer Questions 39 to 41 1. Dim name As String 2. Dim currentYear As Integer= 2014 3. Dim yearOfBirth As Integer 4.DimageAsInteger 5, Dim msgString As String 6, name = InputBox(“Please enter your name....””) 7. yearO fBirth= InputBox(“Please enter your year of birth”) 8. age =currentYear- yearOfBirth 9. msgString = “Hi” &name&”, you are” “&ageé&” years old” 10. MsgBox(msgString) 39. ‘The following are variables in the program except? a. msgString b. MsgBox c.age d.currentYear e.name 40. Which of these variables was initialised witha value on declaration? a.msgString b.InputBox c.age d.currentYcar ¢€, name -58-4l 42. 4B. 45, re 2D 3.B 4c S.A fl {AR STOR How does the variable age getits value? a. computation and assignment b. input from the keyboard c. ithas no value d. initialisation after declaration ¢. read from file Ifthe figure for questions 36, 37 and 38 is the output of the programme, then the inputs in lines6 and 7are? a. Chinelo, 2 1998 b. Jennifer, 16 ¢. 1998, Jennifer d. Jennifer, 2014 z e. Jennifer, 1998 a Which of these is used to group related radio buttons? a. group box b.radiobox c.combobox d.buttonbox ¢. big box Visual Basic was firstreleased in 2 a.1971 b.1981 © 1975 d.1991 ©. 1985 Object.property = Value isan ? a,equality statement b.variablestatement c.assignmeni statement d. object statement ¢. Value statement. 2 - By Mr Ohi arrayDim 8Elementsi.c {{1,2}, {3,4}, {5,6}, {7,8} 4rows : Working: ae : Observe {{1,2) {3.4}, (5,6, (7,8}} = [1] 2 |-—*Row | 3 | 4 |—+Row2 5 [6 | —~Row 3 7[8 | —+Row 4 thus, from the above, we have 4 rows and 2 columns. Option Bis Correct. UML Diagrams. The Unified Modeling Language isa standardized general-purpose modcling language and nowadays is managed asa de facto industry standard by the Object Management Group (OMG). UMLincludes a set of graphic notation techniques to create visual models of roltwnre-ntendive systems. Option C is Correct ‘orm‘nara {ARG 6B Classicon.Aclass iconis simply a rectangle divided into three compartments. The topmost compartment contains the name ofthe class. The middle compartmentcontainsa list of attributes (member variables) and the bottom compartment contains a list of operations: (member functions). i.0 Operation() The Class Icon ass diagram is to depict the classes withina ication, classes haveattributes (member variables), Operations (member functions) and relationships with other classes. The UML class diagram can depictall these things quite easily, The fundamental element of the class diagram is an icon thatrepresent a class, The class icon is shown above. Generally, the purpose ofa cl: model. Inan object oriented appl ‘1.D Unified Modeling Language (UML) $.E Integrated Development Environment (IDE) 9.4 Visual Basic Expression 10.B Object Oriented Programming Language (OOPL) 11.B General Purpose 12.E Method 13.D Control Toolbox 14.C FormDesign View 15.E Properties and Methods. Generally, an object is a type ofuser interface element you create ona Visual Basic form by using a toolbox contro]. An object in VB has three important elements: They are @). Properties (or attributes) : This describes the object (i). Methods (behaviour) : This causes an object to do something (ii). Events: This is what happened when an object does something. 16.A Property Window -60-© (YD AVC LENT Event Driven © Eycapsulation 18" Event. An event isa signal that informs an application that thing important has occurred. For example, when auser clicksa ‘rolona form, the form canraisea click eventand calla procedure art dics the event. Visual Basic uses a standard nam ing convention tn yeat handlers that combines the name of the event sender, an or erscore, thename of the event, Forcxample, the elick, eventofa een named button], would benamed as Sub button] _Click(). 19. om! 0.3 Name (or Classname) sic ‘Attribute (or Property) 2E Operation (or Method) 73D RAD (Rapid Application Development) 34D Click anv 5D Declare variable. In VB, Dimension statement written DIM is used to declare an array, We declare an array in VBas DIMarrayName (Subs) as Data Type thus, from the above, the variable, ‘arrayName’ is declared using the DIM statement. Option D is Correct. 26.C Comment 27.D Windows Explorer 28.B — Solution Explorer. Solution explorer window is used to switch between the Design and Code Windows. Option B is Correct. 23E Variable 30,E Subtraend 31.C object.method 32.4 Pioperty, method and event. Classes consist of fields, Properties, methods & events. Fields and properties represent information thatan ebject contains. Methods represents an action that an object can perform. Events are notifications an object receives from or transmits to other object or applications. Example of an event forthe car” class wouldbeacheck_Engine. Option Ais Correct. 33.B Lefttoright 343 Sentence. In VB.NET, code, modules are called chapters. Procedures are called paragraph and lines of code are called sentences. Ption Bis Correct, — “6I-35. _ Microsoft. VB.NET isa programming language developed by Microsoft-a world leading software company. Option Dis Correct, 36.B Form 37.C Label 38.4 Button 39.B . MsgBox. From the program, wenoticed that the variables; misgString, age, current Year andname were declare explicitly using the statement, “DIM”, whereas, MszBox was not declared either explicitly or implicitly. Option B is Correct. 40.D CurrentYear. 41.4 Computationandassignment. Inline 8, we noticed (subtraction operation). i,< age = currentYear - yearO{Birth. So, it computes and assigns value to age. Option Ais Correct. 42.E Jennifer,1998 43.4 Groupbox 44.D 1991 45.D Object statement (or Object property) Nnamdi Azikiwe University, Awka. Department Of Computer Sciences: Second Semester: CSC 102 Examination 2015/2016 Session (REGULAR) CSC 102: Introduction to Computer Programming: Exam Date: Friday, 12th August, 2016: Time: 1.00PM-3.00PM: Time Allowed: 50mins Instruction: (a) Answer all Questions by shading only the correct answer: (b). Fill your exam details & shade appropriate Sections on the OMR sheet very clearly; ( c) DO NOT WRITE ON YOUR QUESTION PAPER (d). Submit this question paper with your answer script. Namei--——---------—--Reg Noi----=-----—-Department sane 1 isnotan example of event driven activity a. The press ofakeyonthekeyboard b, Movement ofthe mouse c. The click ofamouse button d.Doubleclicking the mouse ©. Switching on the computer, -A?-nour {AORN STUDENT ‘Which of the following is notpart ofa problem solving pracess i aanalysetheproblem b. outlinerequirements c, processing d.coding ©. algorithm ___isnotan important feature of a goodalgorithm? 3 a Readiness b, Unambiguity ¢,Preciseness d. Efficiency e, Correctness __isusedto switch between the Design and Code Window jn VB.NET a. Property explorer b. SolutionExplorer ¢.Code window d.VB form window e. Internet Explorer 5, contains all files required to execute an application? a.Code b.Control c. Project d. Solution explorer e. Forms 6. The virtual blank space which is used to create the userinterface fora VBapplication iscalled a.form b.object c. windows d.design space e¢. drawing board 1. includes a sct of graphic notation techniques to create visual models of software-intensive systems a. VB.NET b.Flowchart ¢,UMLdiagrams d. Blocks e.Program 8 Bi-directional and uni-directional are two, of UML representation? a. Classification b. Association c, Aggregation d.Composition e. generalization 9 UMLis, a. University Model Language b. Universal Model Language ¢. Unity Model Language d.Union Modeling Language e. Unified Modeling Language. We e following UML diagram below to answer questions 10, 11 ant x = -63-10is the ? a.Class Header b. Class Name c.Attribute d. Class Title ¢. Object Name aHeader b.Name c.Attribute d.Title c. Operation The diagramisa 7 a Activity diagram b. State machine c.Usecasediagram d.Atiributediagram e. Class diagram Which of these isnotapart ofa Doloop a.Continue b. Exit c. Until d. While e.None ofthe above isa Loop programming construct a. ExitDo b.DoWhile c.JF-Then d.GOTO e¢.allofthe above Anested loopisaa-aloopinanest b.Loopinaloop ¢, unending Loop d. Loop Childe. two loops Ablock ofcode written to perform specific tasks isa a. Loop b. Procedure c.Event d.Algorithm c. Process Object Propert= Value isan a. Equality statement ’b. Variable statement c.Assignmentstatement d. object statement e. Value statement, Assignment Statement consists of how many parts? a.1 b.2 o3 d4e6 Afinite set of step by step sequence of solving a given problem is a.aprogram b. an algorithm ¢.apscudocede d.asolution e.aComputer Choose the right label for numbers 201023 below:20. ai: 23. 24, 25, 26. 27, 28, Ener yournsme Chinelo Enter year of biety 1975 Helio Chinelo, you ave 3a years-od The diagramabove is a. Message Box b. Window Box c. Textbox d.Control box. e. Noneofthe above a.Texibox b.Form ¢.Label d,Button e.IDE a.Form b.IDE ¢.Label d.Button e. Textbox _isused in aprocedure to changea value atrun time a ‘Assignment statement b.Resultstatement c. Label d. Declaration Statement e. Valid Statement defines its appearance, behaviour, position and other attributes a. Property b.Method ‘c.Class d, Event e. Control Which of the following is nota label control property? a. Name b. Text c.Colour d.Click ¢.Textalignment Objects can be manipulated through the use of three key object features? a, propertics, methods & events b. properties, class &cvents c.class,methods &events d. properties, methods & class ¢. procedure, methods & events ‘The syntax for using an objects method is. 2 a.method.object b. Object_method c, object.method d.method_object ¢.methed+object The VB.NET statement fimMain.hideisanexampleof___? a.amethod b.aclass c.anencapsulation d.anevent29. 30. + 31. 32. 33 34. 35. 36. Sub emdsubmit_ Click isan cecution d.Action e. Event ine b. Sentence The VB statement: rivaie a. Method b. Activity c.E: Each line ofa VB.NET cote is calleda a. Li c.Language d. Statement ¢ Report thatare used tocreate objects? contains controls ci a. GroupBox b. Too! Box c.Combo Box d.ObjectBox ¢. BigBox Which of these is NOT a Visual Basic. NET built-in arithmetic operators a. Mod b. Multiplication ¢. Division dlAddition e. Subtraend One of the following is NOT a VB.NET data type? a. Decimal b.Date c.Byte d.Integer e. Variable The=sign in VB signifies ? a.Assignment b. Equality c.Cormespondence d.Allofaandb e.a,bandcabove are used to explain and clarify program code for other Programmers but have no effect on the way an application runs a. Statements b. Keywords ¢. Remarks d. Clarify e. Variables One of these is not a valid variable name in VB.NET a.finalScore b.FINALSCORE c.final_score d. final-score ¢. finalScorel Answer Questions 37 to 38 with the statement below 37. 38. 39. Whatwill be highest value of [tobe executed? a. 11 b.10 6948 67 = Gig many loops willthe statement undergo? a2 b.3 64 ec is used to grouprelated radio b ? ; uttons? a. Array Group c. Groupname d. Group class e. Group Box -66-40. al. 42. Og ROCA FO DE 0 Public is used ina VB.NET statement to . Execute statements b. Begin Statements c.Comment d. Declare Variable ¢. Assign Variables Which of these is acomponent ofan algorithm a. Instruction b. Sequence c. Selection d, Repetition e.allofthe above Stepwise refinement is a top-down. methodology because it progresses from the a. known to unknown b, general to the specific c. specifictogeneral d.aandcabove e.a, b&e Use the following VB.NET codeto answer questions 43 to 48 43. 45. 47, 48, 49. A. Dim Sgrade(5)As Integer B, Public Names () As String = {7 Awa’, “Ata”, “Agwu", “Aba"} C. Private Score (2, 3) As String How many elements are contained in the statement A above aSbéc7Td4e0, The declaration of B is said to be a. implied b. implicit c.explicit d.invalid ¢.correct In line B above, thesubscripted indexed of “Agwu’ is equal to al b.3 c.2 d.0 e.noneoftheabove InAabove Sisthe a.subscript b.element ¢. variable d.Noneofa,bande e.allof'a,bandc Cisa? a, multidimensional array_b, two dimensional array c.three dimensional array, two and three dimensional array e. combined array InC above Private is 9 a.aDatatype b.aCode can Array Nmae d.akeyword e.aStatement Whichis the latestversion of VB.NET a. VB 15-2015 b. VB 14-2014 c, VB 14-2013 d. VB 15-2013 e. VB 12-2014OOF: BR Oriented Even Oriented EvnetDriven b. Object d Object Oriented Ry ¢. Object Orient Event Driven : Driven vent Driver ¢. Object Oriented Event Answers to 2076 UNI CSC 102 fr Oh Ss wins LE 8.B 9.E 10.B 11.¢ 12.E 13.E Switch: ss ees me computer, Ingomputing, an eventis an action rosa zecomnized ‘by software that may be handles by a - Computer events can be generated or triggered b ie system, by the userorin other ways. a Examples ofevent driven activities are Mouse clicks window-resizing, keyboard presses, branch op eration message from other programs etc. Option Eis C orrect. : Coding 3.{-) So. futi on Explorer Window. Solution Explorer Window is used to switch between the design and code window in VB.NET. Option Bis Correct Solution Explorer Form. Forms are the windows and dialog boxes you pace on the screen, It is that blank space which is used to create user interface for Visual Basic application, Option Ais Correct. UML diagrams. The Unified Modeling Language (UML)isa standardized general-purpose modeling language and dustry standard by the nowadays is managed asa de facto in Object Management Group (OMG). UML includes a set of graphic notation techniques to create visual models of software-intensive systems. Option C is Correct Association Unified Modeling Language Class Name Attribute (or Property) serie i diagram shows the classes inasystem, Ce ect feach class and the relationship ibutes and operations © : a these Mages, Inmost modcling tools, a we thre arts: tlicy arenamae at the top, attributes in = oe ai operations or methods at the bottom. A class represented as None of the above oralf 4B Do While 5B Loopina loop 16.D Algorithm 7B Object Statement (or Property) 1gB Two(2) Parts 19B An Algorithm 20.E Noneof the above. The diagram above is called a form 2.C Label . 22,.D Button & 73.0 Declaration Statement. When Declaration statement is used, the values will assigned atruntime. 24.4 Property 25.D Click 26.4 Properties, methods and events. Classes consist of fields, properties, methads & events. Field s and properties represent information that an object contains. Mcthods represents an action that an object can perform. Events are notifications an object receives from. or transmits to other object or applications. Example ofan event forthe “ear” class would be a“check_Engine. Option Ais Correct. 27.C Object.method 28.4 AMethod 29.E Event 30.4 Sentence 31.B Toolbox 32.E Subtraend 33.E Variable 34D AllofA&B 35.) af 36.D _ final-score. (Sec Mr Ohms Students’ guide on CSC 102 for abetterunderstanding), (Get Serious) 37.B Working: Itgoes this way O+1=1 14+3=4 4437 hus th 74+3=10 : thus, the highest value to i i we deeenane on is 10. Option Bis Correct 39,E GroupBox -69-40.D 4LE 42.B 43.B 44.3 46.4 47.B 48.E 49.B NB: 50.E declare Variable Allofthe above General to the specific. Stepwise Refinement is aWay of developing a computer program by first describing ener, functions, then breaking each function down into detail, Wh al are refined in successive steps until the whole program i. fil defined, Also called top-down design. Option Bis Corpegy.“!Y 6-Elements. (i.c from Oto 5) 3 Implicit. Line B is implicitly declared because it was not declared using the DIM Statement. Option Bis Corregt “i - Arra 2:(.e0102) = [Awa] Atu[Agwu Se % [o | 3 z [3] Subseripted dex Subscript Two dimensional array a Statement VB 14-2015. Visual Basic 2015 (code named VB“ 14.0”) was released with Visual Studio 2015. Option Bis Correct. Visual Basic 2017 (code named VB “15.0")has beenreleased. with Visual Studio 2017, ODED = Object Oriented Event Drivenkiwe University, Aw: ter Sciences: Second Semester: csc 1017 Session (REGULAR) Computer Programming: Exam Time: 3.30PM Nnamdi rtment of Compu Dep amination 2016/2! : Introduction to a Ys 27th July, 2017: ed: 50mins | estions and shade the correct lal Qu + (a) Answer! Hh details & shade appropriate + (b). Fill your exam answer only? ( ) you ery clear eee co fr ONOT sae oN YOUR QUESTION PAPER (d). Submit this question paper with your ans er script. -Reg Nogensone—-r— Department ofthe problem solving Analyzing the problem One ofthe following isnota part Algorithm process? a. Writing the codes b. c, Clicking the mouse d. Developing an e. Program execution Methodsare? a. Abstraction mechanisms Polymorphism mechanisms 4, Events & capsulation mechanisms 2. Objecisand b. Functions ¢. Operations ©. En 3. OOED means? a. Object Oriented Even Driver b. Object Oriented Event Driven c. Objective Original Event ‘Driver d. Ordinary Object Event Driver e. Objective Oriental Even Driver ‘ 4. isnota VB.NET obj i " ject? a. Prope: b. Mouse Click c. Combo box d. VB sn fa d, Solution Explorer 5 In VB.Net the i j F properties of and object defines it appearance b. behaviour c, status d, all of theab - e, None ofthe above ove14, i ?.a. Project Aprogram created in VB.Netisa ___? a. Proj bOblect c.File d.Software e. Allofthe above isnotapart of the problem solving process a. Analysis b. Organize c. Design d. Implementation e. Compilation UMLis broadly divided into categories?a,2 b.5 c.11 d.14 e Noneofthe above = Dim myscoreas Integer () is ?a.an assignment statement b. array declaration statement c. Remark/ Commentstatement d. variable declaration statement €. no statement The following are valid identifiers except 2a. Friend _b._mum c.A_number d._Mptse e. Praise operators are used for concatenation? a. *and & b.t+and. c.&and+ d.+and* e..and= In UML the Profile diagram represents a a. structure b.component c.behaviour d. state ofa machine e.class The UML uses mostly notations to express the design of software projects a. periodic b. graphical ¢. text d. verbal _e. None of the above is used to repeat the execution of one or group of statements in program is under certain conditions? a. Sequencing b. Iteration co, Selecting d. Jumping ¢.Arepeat ADo loop contained inaFOR... NEXT statement in the same procedure isa? a, FOR Do statement b, Two loop system c. Double loop d. Covered loop e. Nested loop 7.18. 20. 21, 22, 23, 24, 25. i WB.Net procedures end with ?a. End Procedure b.ExitSub ¢.Stopend d.Endsub e. Endif® statements initiates actions in VB.NET program a. Declaration b. Executable c. Variable d. While e, None of the above The codeNum2=(Cint)num! is an a. Explicit narrowing b.explicitwidening c. Implicit Narrowing d.Implicit Widening e. None ofthe above Aset of step-by-step sequence showing how to solvea giventaskiscalled a.aprogram b.anAlgorithm c.a pseudocode d.aSolution ¢.a Sequence Which of the following is nota VB.NET Primitive datatypea, Boolean b. Character c.Byte d.bit e.short To assign the Number 12 into a variable Unizik, the correct VB.NET statement will be a. Assign Unizik to 12 b. Assign 12 into Unizik ec. assign 12 in Unizik d.Unizik=12 e.12+ Unizik Ais greater than orequal to Bis sameas a.A=>=B b.A<=>B c.B<=A d.A=>B e.A>=B ‘For!=] to20step2 is a. An executable statement b.Acomment c,aloop d.AForstatement e. AnArray isusedtoruna VB project a.F1 b.F2 c, d.F8 ¢, F6 , “ The VB statement frmMain.hideisa 2a, Declarati b.Command Method d.anEvent ¢. Program ne, Use the following Pro; gram to answer Questions 26 to 28 ? a. VB Window b. VB Box 26. THediagram aboveisa c. Tool Box d. Message Box e. Message Window 27.‘ ThepartlabelledAis___? a. Insicle Box b. Message c. TextBox d.Story Line e. Text Line 28. The partlabelled Bis 2a.The Control b. Text Box c.Command button d, Control Button e. Press Button. 29. The VB statement: Private Sub cmdsubmit_Click() isan a.Action b.Activity c. Execution d.Method e¢. Event 30. Ifa=30.8\5 thea= 72.616 b6.0 ¢6 d.62 > 86.5 31. Whatis used to group related radio buttons? a. A GroupBox b.AGeneralBox c, MotherBox d. Box O Box e. A BigBox 32. Ifx=Sandy=20, whatis the result of evaluating the logical expression Not (x <= 5 ory >30)a. Incorrect expression b False ¢.35 d.25 e. True Use the VB.NET statement below to answer the next four questions Dim Mark (9) As Integer 33, Mark in thestatement above is ?a.A Array name “740b.ConstantName c.Thenameofastudent d, Variable type ¢. Array name 34, | Howmany elements constitute the array? a, 10 bo cll d,1 ¢.None of the above 35. isthe subscript ofthe array a5 b.9 c.11 d.Integer e.Mark 36, _ Integeris the ? a.Index b.Array c. Datatype d. Subscript ¢. Value 37. VB.Netis _? a.Aninterpreter_b. Converter c.Compiler d. Transformer Alloftheabove 38. WB.NET converts to code at runtime? a.RAMtoROM. b.Delectableto Executable ¢, Source toRuncode d. Object to natural code e. Source to Object Use the following statements to answer question 39 to 40 For K As Integer=40 to 1 step -3 Console.writLine(K & ““) NEXT - 39. Thestatements above is ?a.asequence b.an iteration c.aselectionstatement: d, Assignment statement e. declaration statement 40. Theincremental value of the loop is 2a.3 b.40 c.-3 dl e.-40 41 VB.NET can be used to create 2a. Desktop applications b. Android Applications c. Mobile Application d.Onlytwoofthe above e.Allofthe above -75-44. 45, 8A 9B ILC, 15.E 18.C 21.D 25.C » 28.C 30.C One of these isnota version of VB NET a.2005 b. 2004 "| ¢2008 d.2012 e.2015 at _isnota feature of: OOPL? a, Inheritance }. Encapsulation ¢. Abstraction d, Methodology e. Polymorphism Dim, Do, IF and Forare examples of 2a, MessageBox b. Keywords ¢.Commands d Methods ¢. VB Actions Which of these is notan Algorithm? a.A flowchart b.An Equation c.Almighty formula d.IF - Then Construct ¢. Dim Statement 2017UNL O2— it Clicking the mouse 2.D, Events and Operations OQOED= Object Oriented Event Driven 4.B Mouse Click Alloftheabove 6.A Project Organize. Generally, Problem isa task that isneeded to be solved by the computer. Problem Solving Process is the process/step taken to solve a problem/task. The problem solving process include Analysis, Design, Implementation and compilation. Option Bis Correct. Two(2). Generally, there are 14 UML diagram types which can be divided into two main categories. They are Structural diagrams & Behavioural diagrams. Option A is Correct. Array declaration statement 10.A Friend ([tisa keyword) &and+ 12.BComponent 13.B Graphical 14.B Iteration Nestedloop 16.D Endsub 17.B Executable Implicit Narrowing 19.B AnAlgorithm 20.D Bit Unizik=12 22.E A>=B 23.C Aloop 24.C FS Method 26.4 VB Window 27.C TextBox Command button 29.E Event Working: 30.8\5 = 30.8/5 =6.16=6. Note that 30.8\5 isan beWg. you take on © whole integer di emits c rt. Option C is Correct. 31.A AGroupBox number p® 40.8 False Sees ‘ working: ODSET™ Not (x <=Sory > 30); Where x= Sandy=20 Weobserve that Not (True or False) =Not (True)=FALSE. rence, the answers. FALSE since the Notoperator will retum the value FALSE. Option Bis Correct. 3A AnAray name WA 10.i.(0-90,1,2,3,4,5,6,7,8.9=10) 35.B 9 36.C Datatype 37.4 Aninterpreter 38.E Source to Object 39.8 An iteration 40(-) 41-E Alloftheabove 42.B 2004 43.D Methodology 44.B Keywords 45.E Dim Statement Nnamdi Azikiwe University, Awka. nt Of Computer Sciences: Second Semester: CSC ination 2017/2018 Session (REGULAR): Likely ons: CSC 102: Intreduction to Computer Programming: Time Allowed: 50mins Instruction: (a) Answer all Questions and shade the correct answer only: (b). Fill your exam details & shade | appropriate Sections on the OMR sheet very clearly; (¢) DO NOT WRITE ON YOUR QUESTION PAPER (4). Submit this question paper with your answer script. Departme! 02 Exam Examination Questi Department: Nameze---——----— --Reg No:-—-- |. Objects can be manipulated through the use ofthreekey object features? a. properties, methods & events b. properties, class & events ¢. class, methods & events ~).. d. properties, methods & class ¢. procedure, methods &events | 4 Thesyntax for using an objects method isi 2 4 method.object_b.Object_method ¢- object.method .method_object e.method+object10. ll. The VB.NET statement frmMain.hide isan example of > a.amethod b.aclass c.anencapsulation d.an event €.aproperty The VB statement: Private Sub cmdsubmit_Click() isan a.Method b. Activity c. Execution d.Action ¢, Even Each line ofa VB.NET code is calleda a. Line b.Sentence ¢.Language d.Statement ec. Report contains controls thatare used to create objects? a.GroupBox b.Tool Box ¢.ComboBox d. Object Box e. BigBox Which of these is NOT a Visual Basic.NET built-in arithmetic operators a, Mod_b. Multiplication ¢.Division d. Addition e. Subtraend One of the following is NOT a VB.NET datatype? a.Decimal b.Date c.Byte d. Integer c. Variable The=signin VBsignifies __? a. Assignment b. Equality c. Correspondence d. All ofaand b eab and c above — are used to explain and clarify program code for other programmers but have no effect on the way an application Tunsa. Statements b. Keywords c. Remarks d. Clarify e. Variables One of these is not a valid variable name in VB.NET a.finalScore b.FINALSCORE c. final_score d.final-score ¢. finalScore] Use the following VB.NET code to answer questions 12 to 17 13, A. Dim Sgrade (6) As Integer B. Public Names ()As String = {”Awa”,“Atu”, “Agwu”, “Aba”} C. Private Score (2, 3) As String How many elements are contained in the statement A abovea.5 b.6 c.7 d4 20 The declaration of Bis said to be a.implied b. implicit c.explicit d.invalid ¢. correctiW 18. Inline B above, the subscripted jindexedof“Agwu' Is equalto__a.] b.3 ¢. 2 4.0 e.noneofthe above InAaboveSisthe a, subscript b. element c. variable d, None ofa, bande e.allofa, bande f Cisa? a. multidimensional array b.two dimensional array c. three dimensional array d.twoand three dimensional array ¢. combined array InCabove Privateis___? a.a Datatype b.aCode c-an ArrayNmae d.a keyword ¢.@ Statement Which is the latest version of VB.NET a. VB 15-2015 b.VB 14.2014 c.VB 14-2013 d.VB 15-2013 e. VB 12-2014 Use the program below to answer question 19-22. 20, Ble 2. DIM number! As Integer DIM number! As Integer DIM Answer As Integer number1=3 number? = 5 answer = number 1 + number 2 msgbox answer What is the function of the above program? A. Count numbers B. Subtract numbers C. add two numbers D assignment program E. none. How many variables can you find in the program? A. 2 B.1C3 D4 ES Which of these is a valid assignment statement in VB.NET. A. DIM answer As Integer B. msgbox answer C. Private sub button D. answer= number 1 + number2_ E. All of the above. What is the function of msgbox answer in the above program? A. hid result of the program B. calculate result of the program C. display result of the program -79-24 25 26. 27, 28. 29 30, 31. 33, 34, 35. D. assign result of answer E. done nothing, One of the following is not a part of the problem solving process. a. Writing the codes b. Analyzing ih, problem c. Clicking the mouse d. Developing an Algorithm Objects and Methods are? a. Abstraction mechanisms b. Functions ce. Polymorphism mechanisms d. Events g. Operations e. Encapsulation mechanisms OOED means?a. Object Oriented Even Driver b. Objec, Oriented Event Driven c. Objective Original Event Drive, d. Ordinary Object Event Driver e. Objective Oriental Even Driver ah isnota VB.NET object? a. Property explorer b, Mouse Click c. Combobox d. VB code window d. Solution Explorer In VB.Net the properties of and object defines its a. appearance b, behaviour c. status d.all ofthe above , None of the above Aprogram created in VB Net isa ?a, Project b. Object c.File d.Sofiware ¢.Allofthe above i ___isnota part of the problem solving process a. Analysis b. Organize c. Design d. Implementation e. Compilation UML is broadly divided into eategories?.a.2 b.5 c.11 d.14 e.None ofthe above Dim myscore as Integer () is _? a. anassignment statement b. array declaration statement c. Remark! Comment statement d. variable declaration statement ¢€.no statement ‘The following are valid identifiers except ?a. Friend b. _num c.A_number d._Mgtse e. Praise operators are used for concatenation? a. * and& b.t+and. c.&and+ d.t+and* e..and= InUML the Profile diagramrepresentsa___? a. structure b.component ¢.behaviour d, state ofamachine e. class The UML uses mostly notations to express the design of software projects a. periodic b. graphical ¢. text -Rn-3 38. 40. Al 42, 4B. 45, 46. 41, q. verbal e, None of the above . Z isused to repeat the execution ofone or group of Jatementsi i dercertain conditions? ifements in program 1S unt a 4 sMgequenciNg b. Iteration ¢. Selecting d Jumping ; eat J : i aan contained ina FOR... _NEXT statementin the eam? procedure jga?a, FORDo statement b. Tw loop a mC. Double loop d. Covered loop e. Nested loop Sp Netpr i ?a. End Procedure 'B Net procedures end with _ “ Peatub c. Stop end d.End sub e- Endif statements initiates actions in VB.NET program 3 Declaration b. Executable c- Variable d. While "None of the above : oe thi Thecode Numa? = (Cint)aum| isan & Bape narrowing b. explicit widening c. Implicit Narrowing d. Implicit Widening e. None ofthe above ‘Asetof step-by-step sequence showing howtosolvea giventaskiscalled a. aprogram b an Algorithm ¢.a pseudocode d. aSolution ¢.aSequence Which of the following isnot aVB.NET Primitive datatype a. Boolean. Character c.Byte d.bit ¢ short ‘Toassign the Number 17 intoa variable Unizik, the correct VB.NETstatement will be a. Assign Unizik to 17 b. Assign 17 into Unizik ¢. assign | 7in Unizik d,Unizik=17 ¢.17+Unizik IfA=3 and B=5, what isthe result ofevaluating the logical expression Not(A<=3 andB> 10) a. Incorrect expression b.False ¢.30 d.15 e. True Aisless than or equal to Bis same as, aA=>B bA<=>B c.A>=B d.A=>B e.A<=B _ The operator that returns True when the conditionis false iscalled a.NOT b.AND ole ND c.OR d.NAND The operator returns True when the conditions of the left and right are Ti d.NAND KOR tue.a.NOT b.AND c,OR -81-49. 50. 51. 52. 53. 54, 55 56. 2, find the value ofx, =4,B=6andC= tans 44,0, 65536 b.448 ¢. 157351936 ifx=((4*B42)-C*9) 36 4.157351 Jent to? a, 1000Bytes b. half Giga Ikilo bytes is equiva Byte © 1900Bytes d.512Bytes e. 128Bytes uate 5 4=2 a.l0 b.3 ¢.32 4.25 6.7 ms a8 b.2 c15 4.1.67 27 ConvertS= a’+b'+c’ into VB equivalent statement 22 Atwo-dimensional array can also be called Anarray with 2rows and 3 columns will have how many elements a.2 b.3 c.5 d.6 ¢.8 Anarray of the form [2] [3] [2], will have how many elements. a.7 b.8 ¢.12 d.4 ©,10 Assignment statement consists of how many parts? a. | b2c3d4e6 ‘Use thediagram below to answer the following three Questions: 37, 58. 59. Do Until... Loop Dim numb As Integer = 0 Dim msg As String =“ Do Until num > 16 msg = msg & numb & ”,” num += 2 Loop MsgBox (msg) End Mae is the initial value of the program? a.2 b.0 c.1 od bay % the incremental value of the program? a, 2. b.0 G1 d.-2 oo loop are in the program? a.2 b.16 c.9 onnu oulea ) (i (i in Use the diagram to answer the next two Questions. Dim num AsInteg numb = vee R c Do until numb 3=3 msg = =numb+ 2 “Enter your numb”) Loop ° msg box (msg) End ‘What is the initial value of the program? a0 b2 6.3 d, None of the above cu gi. What js the incremental value of the program? a. 0 b2 3 ¢. None of the above. Use the diagra™ below to answer the four Questions about UML: Platelets 62. Label Arepresents__? @ Class b. General element” c. Father class d. Supertype 63. Bisa/an___?a. Composition b, Arrow c. Relation ” d. Aggregation , Cisa element? a. Composite b. Sub} c.Childclass d. Subclass ® nee 6, The diagram above indicates a. Composition b, Aggregation c, Generalization d. Association “83.wy 8 NAD E08 nun “Answers to 2018 UNIZIK ESC 102 (Likely Questions) ~ By Mr Ohms: —$________—____~ methods and events. Classes consist of fields ods & events. Field s and properties bject contains. Mcthods 1A Properties, properties, meth represent information thatan © represents anaction that an object can perform. Events are ~ jdtifications an object receives from or transmits to other object or applications. Example of an event forthe “car” class would bea “check_Engine. Option A. is Correct, 2.C Object.method 3.4 AMethod 4.E Event 5.A Sentence 6.B Toolbox 7.E Subtraend 8.E Variable 9D — AllofA&B 10.(-) 11D final-score. 12.C 7-Elements. (i.¢ from 0 to 6) 13.B Implicit. Line B is implicitly declared because it was not declared using the DIM Statement. Option Bis Correct 14.C 2:(.c0t02) = [Awa][Atu] Agwu] Aba fae, 0 1 2 3 Subseripted Index 15.4 Subscript 16.B Twodimensional array 17.E aStatement 18.B VB14-2015. Visual Basic 2015 (code named VB “14.0") was released with Visual Studio 2015. Option Bis Correct. Visual Basic 2017 (code named VB “15.0") has been released with Visual Studio 2017. 19.C Addtwo numbers 20.0 3 21.D Answer=numberl +number2 22.D Display result of the program NB:| A the mouse He CA d Operations bo! object Oriented Event Driven pB Mouse Click iagortneabove jet : 28. Fe eee aciehe 4 the computer. Problem Solving Process is the st scess/steP taken to solve aproblem/task. The problem solving process include Analysis, Design, Implementation jndcompilation. Option Bis Correct. 9), Generally, there are 14 UML diagram types which can be divided into two main categories. They are ‘ _ Séructural diagrams & Behavioural diagrams. a Option Ais Correct. 7 rray declaration statement . akeyword) 33.C &and+ 34.B Componeftt-’ a) Graphical 36.B Iteration 37.E Nested loop . Endsub 39.B Executable 40.C Implicit Narrowing 3D iB AnAlgorithm 42.D ‘Bit 43.D Unizik=17 goa yp ae 2A Friend (Itis 44E True Working: Not (A<=3 And B> 10)=Not (True And False) =Not (False)= True. Hence, the result of evaluating the logical expression Not (As=3AndB> 10)is TRUE. Option E is Correct. 4$E. Ac=B 46A NOT 47.B AND 48.C Working: Observe A=4, B= 6,C=2 r= ((4"642)-245) *4=((4" 36)+32)*4 iex=(144-32)44=11244= (112)'= 157,351,936" C 8C 1000Bytes, Generally, 1kB=1024bytes= 1000by's an Working: 5 "=2=5°2=5'=25=>D LA Working: 5+=3=5+3=85°A “R5-thus, the number of times NB: 60.D NB: 62.B » 63.A 64.A 65.A AU Working: Ae bADtc*2)M (2*z) ARectangular array oT Matrix array Working:1=2,¢= 7+ a 2! By formula, Numberofelements=T xe =2 x3=6elements Working: Number ofelements = 2x3 x2 =12elements 2. Answer is2 parts. L€ the lefthand variable and the right hand variable separated by the =sign.e-8 T=L42+B42, 0 58A2 Working: Initial value= 0: Increment=2 Initial value =0 0+2=2 84+2=10 2+2=4 104+2=12 44+2=6 124+2=14 6+2=8 14+2=16 (It will terminate at this point) the loop willexecutes is 9times=>C The number of variables in the program is2(ie0,“") Noneoftheabove 61.E None ofthe above There is no initial value and no incremental value to execute General element Composition Composite/Unit/Componentelement Composition.
You might also like
Visual Basic MCQ
PDF
62% (125)
Visual Basic MCQ
36 pages
CSC 113 PAST QUESTIONS
PDF
No ratings yet
CSC 113 PAST QUESTIONS
8 pages
Visual Basic MCQ
PDF
100% (1)
Visual Basic MCQ
19 pages
Multiple Choice Questions
PDF
100% (4)
Multiple Choice Questions
44 pages
Software Development With Visual QP Bank
PDF
No ratings yet
Software Development With Visual QP Bank
11 pages
Exitexam 2015
PDF
No ratings yet
Exitexam 2015
14 pages
Visual Basic Programming Question Paper For Institute
PDF
No ratings yet
Visual Basic Programming Question Paper For Institute
8 pages
4 PDF Visual Basic MCQ
PDF
No ratings yet
4 PDF Visual Basic MCQ
11 pages
MCQ On
PDF
80% (5)
MCQ On
11 pages
407B - VB - Net Programming PDF
PDF
No ratings yet
407B - VB - Net Programming PDF
25 pages
Visual Programming Techniques
PDF
No ratings yet
Visual Programming Techniques
27 pages
PROG Quiz
PDF
100% (1)
PROG Quiz
24 pages
mec VB
PDF
No ratings yet
mec VB
20 pages
Visual-Basic MCQ3
PDF
No ratings yet
Visual-Basic MCQ3
22 pages
CSC102 Questions Provided by Temmy'20
PDF
No ratings yet
CSC102 Questions Provided by Temmy'20
11 pages
.NET
PDF
No ratings yet
.NET
22 pages
VisualBasic TM
PDF
100% (2)
VisualBasic TM
35 pages
VB .Net Questions
PDF
No ratings yet
VB .Net Questions
11 pages
Multiple Choice Questions
PDF
100% (2)
Multiple Choice Questions
51 pages
CSC102 Questions 100%
PDF
No ratings yet
CSC102 Questions 100%
11 pages
Programming in VB 6.0 MCQs
PDF
No ratings yet
Programming in VB 6.0 MCQs
5 pages
Csc102 Questions 100- By Grace.
PDF
No ratings yet
Csc102 Questions 100- By Grace.
8 pages
APznzaZ2gK6RoGA09Z3HAXXUHNGoxF-ll5BjpFkl8UM4OkeRBMuM-_DGRBgeJ2jbhvhKrMcGz3HM2g_sw0P6Kl6ktPXycznivlHp8APwyg7hEjf6OxGsRkONiP2PYv1nppupX6HuePmJwTRgKvRZP8CWtIsZ5rEProE85vGCkg73xfzxwsO_5O8IXiA3qcsbizkxAV8Ndvr2WNRtdfiMofwuSKB_dFD0OGSTtDvs5lB
PDF
No ratings yet
APznzaZ2gK6RoGA09Z3HAXXUHNGoxF-ll5BjpFkl8UM4OkeRBMuM-_DGRBgeJ2jbhvhKrMcGz3HM2g_sw0P6Kl6ktPXycznivlHp8APwyg7hEjf6OxGsRkONiP2PYv1nppupX6HuePmJwTRgKvRZP8CWtIsZ5rEProE85vGCkg73xfzxwsO_5O8IXiA3qcsbizkxAV8Ndvr2WNRtdfiMofwuSKB_dFD0OGSTtDvs5lB
27 pages
VB One Mark
PDF
No ratings yet
VB One Mark
12 pages
IV Sem - Visual Programming Techniques
PDF
No ratings yet
IV Sem - Visual Programming Techniques
27 pages
Visual Programming Techniques BCA IV Sem Multiple Choice Questions
PDF
No ratings yet
Visual Programming Techniques BCA IV Sem Multiple Choice Questions
47 pages
MULTIPLE CHOICE. Choose The One Alternative That Best Completes The Statement or Answers The Question
PDF
No ratings yet
MULTIPLE CHOICE. Choose The One Alternative That Best Completes The Statement or Answers The Question
54 pages
Us05ccsc22 - QB
PDF
No ratings yet
Us05ccsc22 - QB
10 pages
Model Gui Final3
PDF
No ratings yet
Model Gui Final3
1 page
VB & VB - Net, System Engineering Model Question Bank
PDF
No ratings yet
VB & VB - Net, System Engineering Model Question Bank
9 pages
IT4302: Rapid Application Development: University of Colombo, Sri Lanka
PDF
No ratings yet
IT4302: Rapid Application Development: University of Colombo, Sri Lanka
12 pages
OOP (Java & VB) MCQ'S
PDF
67% (3)
OOP (Java & VB) MCQ'S
18 pages
Objective Type Questions: Answer: B
PDF
No ratings yet
Objective Type Questions: Answer: B
39 pages
VB MCQ Joel
PDF
No ratings yet
VB MCQ Joel
8 pages
Visual Basic Level 200 by Akiola
PDF
No ratings yet
Visual Basic Level 200 by Akiola
7 pages
Comp Exam
PDF
No ratings yet
Comp Exam
7 pages
VB Mcqs
PDF
No ratings yet
VB Mcqs
46 pages
short (2)
PDF
No ratings yet
short (2)
8 pages
Imp.notes.mcq555
PDF
No ratings yet
Imp.notes.mcq555
19 pages
VBMCQ 2007 Final
PDF
No ratings yet
VBMCQ 2007 Final
10 pages
Question Bank - EC-208 - Programming Concepts
PDF
No ratings yet
Question Bank - EC-208 - Programming Concepts
20 pages
Assignment Bca Visual Basic
PDF
No ratings yet
Assignment Bca Visual Basic
12 pages
4th Monthly Examination in TLE - ICT Grade 10: Department of Education
PDF
No ratings yet
4th Monthly Examination in TLE - ICT Grade 10: Department of Education
2 pages
Visual Basic
PDF
No ratings yet
Visual Basic
22 pages
Chapter 01
PDF
100% (1)
Chapter 01
16 pages
CA Even 17UCC411-VISUAL-BASIC
PDF
No ratings yet
CA Even 17UCC411-VISUAL-BASIC
22 pages
SCS1206201105 Visual Programming Concepts and Development
PDF
No ratings yet
SCS1206201105 Visual Programming Concepts and Development
4 pages
Csci 120 Visual Basic Midterm Exam Oct 15 2008 261741
PDF
No ratings yet
Csci 120 Visual Basic Midterm Exam Oct 15 2008 261741
4 pages
1 Marks
PDF
No ratings yet
1 Marks
25 pages
Multiple Choice Questions
PDF
100% (2)
Multiple Choice Questions
51 pages
CSC 102
PDF
No ratings yet
CSC 102
37 pages
Edu 223
PDF
No ratings yet
Edu 223
16 pages
Hke 335
PDF
No ratings yet
Hke 335
6 pages
Stat 202 Past Question PDF 2004-2017
PDF
No ratings yet
Stat 202 Past Question PDF 2004-2017
41 pages