Visual Basic Programming Language and Applications (CSCT3108)

Computer Science - COS

Semester: Resit

Level: 300

Year: 2018

1
REPUBLIC OF CAMEROON THE UNIVERSITY OF BAMENDA
Peace-Work-Fatherland P.O. Box 39 Bambili
Resit Examinations
School: HTTTC Department: Computer Science Option: FCS/ICT Level: 200
Course Code: CSC213/ICT212 Course Title: Visual Basic
Lecturer: Mr. Demanou Credit Value: 2
Date: Time: 1 hour Start Time: End Time:
Problem
A professional training center registers students for 3 months training. It offers various options: Web
programming, Android programming and maintenance. On registering a student, he has to choose its option,
then provides its name. After paying the fees (90 000 fcfa) the bursar registers him with a unique registration
number. The student has the possibility of paying the training fee in THREE instalments (30 000 fcfa × 3).
A student who pays once the 90 000 receives a discount of 20%. Those who pays TWO instalments receives
a discount of 15%. You have been hired by the training center to develop their registration system assuming
they can recruit at most 200 students.
1. Declare the constants you may use in your program
2. Using the following table, define a data structure for student table
Field Type Field Type
Matricule String Option String
Name String Balance Double
3. Declare and array S for storing the students of the training center
4. Write a function that inserts a student at position pos in the array S using the following prototype:
Function register(ByVal student As Student, ByVal pos As Integer) As Integer
5. Define a procedure to display the student at position k in that array. Prototype:
Sub display(ByVal k As Integer)
6. Using the procedure display write a procedure that displays all students registered. (Sub
displayAll())
You may like to displays students registered progressively in a ListView control and also provide some
searching options to the end user. The following figure shows the application GUI. (Each control variable
name is given)
7. Provide the instructions of the Register button handler, that will add the new student to the array S and
also display his information on the list view as shown on the picture above. (Hint: The balance should be
calculated considering the discount).
www.schoolfaqs.net