Questions for Final Paper
1. Explain the difference between OOP and Procedural Programming.
2. Explain OOP. Explain the features of OOP.
3. Explain the difference between structured and unstructured programming.
4. Explain object with example. Explain the object members.
5. Explain class with example.
6. Explain the difference between attributes and methods.
7. Explain inheritance with example. Explain different types of inheritance.
8. What is base class (super class)?
9. Explain the difference between parent and child class? What is derived class (subclass)?
10. Explain the virtual base class with example.
11. Explain polymorphism with example. Explain different types of polymorphism.
12. Explain the difference between static (Compile-time) and dynamic (Run-time)
polymorphism.
13. Explain the difference between method overloading and method overriding.
14. Explain encapsulation.
15. Explain different types of access controls (access specifiers/access levels).
16. What is data hiding?
17. What is data abstraction?
18. What are getters and setters?
19. Explain the “is-a” relationship in an inheritance.
20. Explain the different types of methods.
21. Explain object linking and embedding (OLE) processing with example.
22. Explain ActiveX with example.
23. Define modules and class modules.
24. Explain the class module properties.
25. What is visual programming? Explain the features of visual programming?
26. What is integrated development environment (IDE)?
27. Explain the Toolbox, Solution Explorer, Project Explorer, Object Browser, Properties
Window, Code Window, and Menu Bar in Visual Studio?
28. What are controls and control properties in VB?
29. Explain different Visual Basic Project File Types (.ocx file, .vbw file, .vbp file, .frm file, .bas
file).
30. What is variable? How to declare variable in VB? Give example. Explain different types of
variables (public instance variables, private instance variables, static references) with
example.
31. What are arithmetic expressions and arithmetic operators?
32. What are conditional statements and comparison operators?
33. What are logical operators and binary logical operators?
34. What are iterative statements/loop?
35. What is the main use of a For...Next loop in VB?
36. How does a Do While loop determine whether to continue executing?
37. What is the difference between Do Until and Do While loops?
38. Write the syntax for a While...End While loop.
39. Define infinite loop.
40. What are Boolean expressions?
41. Explain Event-Driven Programming with example? What are events, event sources, and
event handlers?
42. Explain Label, Button, TextBox, ComboBox, ListBox, RadioButton, CheckBox, and PictureBox
controls in VB.
43. Explain the modular programming?
44. Explain the difference between subroutine and function with examples. Explain parameters
in subroutine and function with examples. Explain subroutine invocation and function
invocation with examples.
45. What are mathematical built-in functions? Explain Math.Abs(x), Math.Sqrt(x),
Math.Round(x).
46. Explain the following string functions with examples: Len(str), Mid(str, start, length),
Trim(str), UCase, and LCase.
47. Explain InputBox and MsgBox in VB with examples.
48. Explain date and time functions in VB with examples.
49. What is debugging? What is Visual Basic Debugger?
50. What are breakpoints? How to manage breakpoints? Explain different types of breakpoints.
51. What is stepping through the program? Explain Step Over, Step Into, Step Out, and Run to
Cursor.
52. Explain the Locals Window, Watch Window, Immediate Window, and Call Stack Window in
Visual Studio.
53. Explain exceptional handling with example.
54. What is PictureBox Control? How to add picture/image in the PictureBox?
55. What are Line and Shape Controls? How to draw a line on a PictureBox control?
56. What is Panel Control? How to draw a rectangle on a Panel control?
57. What are Shape Controls? How to add a LineShape control to draw a line? How to draw
rectangle using RectangleShape Control?
58. What is Object-Oriented Software Engineering (OOSE). Explain the process of Object-
Oriented Software Engineering (OOSE).
59. What is modularity?
60. What are instance variables?
61. What is reusability?
62. What is interface in Object-Oriented Software Engineering (OOSE)?
63. Explain abstract class with example.
64. Explain Class Responsibilities Collaboration Cards (CRC Cards) with example.
65. Explain Class Diagram with example.
66. Explain Dependencies and Inheritances with examples.
67. Explain Multiple Document Interface (MDI) and different components of MDI with
example.
68. How to open a form in VB? How to hide a form in VB? How to close a form in VB?
69. Explain Aggregation and Association with examples.
70. Explain Constructors and Destructors in detail with examples.
71. What is Garbage Collection in .NET?
72. What is Reusable Objects in VB?
73. What are Class Libraries and Imported Libraries in VB?
74. What is valid declaration in VB?
75. How to comment code in VB?
76. How to inspect code during debugging in VB?
77. What are naming conventions in VB?
78. How to Checking Functionality Against Requirements in VB?
79. What is the difference between testing and debugging?
80. What is MenuStrip control? What is ToolStripMenuItem? What is ToolStripSeparator?
81. How to create Menus Using the MenuStrip in VB? How to add Menu Items and Submenus
in VB?
82. How to handle Menu Events with Code in VB? Write a code for Menu Click Events.
83. How to implement Shortcut Keys for Menu items in VB?
84. How to Set Access Keys for Menu items in VB?
85. Explain ContextMenuStrip with example. How to add a context menu with the menu items
in VB?
86. What is toolbar in VB? Describe the key components of a toolbar interface.
87. In VB, which control is used to create a toolbar, and what are some of the features that this
control provides to customize the toolbar?
88. What are the steps to add a toolbar to a Windows Forms application using Visual Basic?
89. How do you add buttons to a ToolStrip control in Visual Basic, and how can you customize
their actions?
90. What is a dialog box in Visual Basic, and why are dialog boxes important in GUI-based
applications?
91. What is the purpose of using FileDialog, ColorDialog, and FontDialog controls in a Windows
Forms application? Provide a brief use case for each.
92. Write a detailed note on Application Distribution and Compilation in VB.
93. Explain Application Setup in VB in detail.
94. What are tables in database? How to create tables and how to define table structure in VB
IDE?
95. Explain the primary key and foreign key in tables?
96. Explain data control in VB.
97. Explain data forms in VB.
98. Explain ADO.NET and the components of ADO.NET Object Model in VB.
99. Explain the Key Classes in ADO.NET and explain the Basic Workflow of Using ADO.NET.
100. How to insert records into the database and display them in a DataGridView in VB?
101. Write a Visual Basic program that performs basic arithmetic operations. The program
should read two numbers from TextBox1 and TextBox2 when the Calculate button is
clicked. It should calculate and display the following results:
a. Sum of the two numbers in Label1
b. Difference in Label2
c. Product in Label3
d. Quotient in Label4
102. Explain If...Then Statement in VB. Create a Visual Basic program that checks if a user wins a
lucky prize based on a number entered into TextBox1. When the Check button is clicked:
a. If the number is 50 or more but less than 100, display: "Congratulations! You win
a lucky prize"
b. If the number is less than 50 or 100 or more, display: "Sorry, you did not win a
lucky prize"
103. Explain If….Then…Else Statement in VB. Write a Visual Basic program that checks if a user is
eligible to win a lucky prize. The program should read a number from TextBox1 and an age
from TextBox2 when the OK button is clicked. If the number is 100 or more and the age is
60 or more, the program should display the message:
a. "Congratulations! You win a lucky prize"
Otherwise, it should display:
b. "Sorry, you did not win any prize"
104. Explain If….Then…ElseIf Statement in VB. Write a Visual Basic program that takes a
student's mark (0–100) from a text box when the OK button is clicked. The program should
determine the grade based on the following criteria and display it in a message box:
a. A for marks between 80 and 100
b. B for marks between 60 and 79
c. C for marks between 40 and 59
d. D for marks between 0 and 39
e. If the mark is outside the range 0–100, display "Out of Range"
105. Write a Visual Basic Console Application that asks the user to enter their name. After the
user types their name, the program should greet them with a message like:
"Hello [Name]!"
106. Write a VB program to print the first 10 natural numbers using a While loop.
107. Write a VB program to generate a multiplication table using a Do While Loop.
108. Write a Visual Basic program using a Windows Form where, when the form loads, an
InputBox appears asking the user to enter their name. If the user enters a name (i.e., the
input is not blank or just a space), display a greeting message in a message box saying:
"Hello, [Name]! Welcome to our program." If the user does not enter a name or only enters
a space, display an error message in a message box saying: "You didn't enter a name. Please
try again."
109. Create a Visual Basic Windows Forms application that allows the user to enter three
numbers in textboxes. When the Add button is clicked, the program should calculate the
sum of the three numbers and display the result in a label.
110. Write a Visual Basic program with a Windows Form that checks whether a number entered
by the user is even or odd.
111. Write a Visual Basic program with a Windows Form that displays the message "Pakistan" in
a message box 10 times when a button is clicked using For Loop.
112. Write GUI program in VB which takes two numbers in two text boxes and print their
difference in third box?
113. Explain syntax errors, run-time errors, and logical errors with examples.
114. Explain bitwise operators in detail?
115. Describe the process of creating a new Windows Forms application named
SampleDatabase in Visual Studio. What are the initial steps to set up the project?
116. How do you add a service-based database to your project in Visual Studio? What file
extension will your database have?
117. Explain the steps to add a data source to your project. What are the options available in the
Data Source Configuration Wizard, and which one should be selected for connecting to a
local database?
118. Explain the difference between friend function and friend class?
119. What is inline function?