0% found this document useful (0 votes)
34 views5 pages

March - April 2018vb

Uploaded by

Anesu Muusha
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
0% found this document useful (0 votes)
34 views5 pages

March - April 2018vb

Uploaded by

Anesu Muusha
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
You are on page 1/ 5
MINISTRY OF HIGHER AND TERTIARY EDUCATION, SCIENCE AND TECHNOLOGY DEVELOPMENT HIGHER EDUCATION EXAMINATIONS COUNCIL (HEXCO) NATIONAL DIPLOMA IN INFORMATION TECHNOLOGY SUBJECT: Programming in Visual Basic PAPER NO: 553/15/S04B (Practical) DURATION: 3 Hours MARCH /APRIL 2018 EXAMINATION REQUIREMENTS 1. Computer with VB. Net Compiler. 2. Storage medium. 3, Printing facility. 4, At least 2 sheets of plain paper for rough working. INSTRUCTIONS TO CANDIDATE 1. Answer ALL questions. 2. Print both code and interface. 3, Submit soft copy of work done on storage medium provided. This paper consists of 5 printed pages, PAPER NO. $53/15/S098_- PROGRAMMING IN VISUAL BASIC NET [PRACTICAL UESTION 1 a) (b) Given that the quadratic equation is solved by the formula x= DeND aac 2a And also that if b? < 4ac, then the equation has no real roots, if b? > 4ac there are two real roots, write a VB.Net application that allows the user (@ enter three integer yalues and generates and displays the roots of the quadratic equation nor display an appropriate message. Use the sample interface given below. (15 marks) (QUADRATIC EQUATION Number 1 Number 2 UL Number 3 Number of Roots Eases The roots are [_ [[eenerate } (liew Problem Write a VB.Net console application that displays the statement “I LOVE WORKING WITH COLORS four times, First font colour 1s white and background colour is black, then next font colour changes to red and background colour is black, then font colour is red and background colour is white then finally font colour is yellow and background colour black (10 marks) PAPER NO: §53/15/S04B_- PROGRAMMING IN VISUAL BASIC NET (PRACTICAL) QUESTION 2 fa) ib) Write a console application that creates a structure to store the following details of a city. Name Population Diameter Year Your program should captut as follows: the above details and then display the details _______ City had a population of _______ million people and a diameter of _____km in the year fs (10 marks) The formula to calculate compound interest and determine the amount to be earned on a deposit after a number of periods 1s A=P( tr/my. Where:- Pas the amount deposited. r is the annual interest rate. m is the number of compounding periods per year. nv is the total number of compounding periods. Ais the amount earned after n periods. ‘You are required to come up with a program that calculates the interest earned and amount earned given that the user enters the principal, interest rate, number of periods and compound frequency. Use the sample interface given below. Ps PER NO: 553/15/S04B - PROGRAMMI ASIC MY DEPOSITS Inputs Compound frequency Principal Po} © Monthly Interest f= O Quartery Number of periods[____] © Biannually = O Annually {ests Interest Earned Amount Earned Calculate Refresh (20 marks) QUESTION Design an interface for a clock that will show the time as it progressively changes. Add progress bars far each component of the time. Add code to the interface so that it picks the system ume and then show the time changes. CLOCK aime HOURS i MINUTES: (Gee are ee ee = SECONDS p {13 marks) PAPER NO: 5 .NO: 553/15/S04B__ PROGRAMMING IN VISUAL BASIC NET [PRACTICA! QUESTION 4 Wnite a program tha operation Gen a sec the user to enter two integers and then selects a list. The program should then calculate and display the result. Mathemaucs | Number 1 @ Addition | Number 2 Subtraction | Result CQ Multiplicaon | | O_Division 1 Refresh Close | J (18 marks) QUESTION S jent Number, Age Create a database table called Student that has the fields: Stud Date of Birth and Course. a form in VB.Net and link 1 tionality to the buttons. o the database table using DataGrid as below Design Add func! ENROLMENT Student Number age DATAGRID ————— Date of Birth ay Course Je Siki a et Liste oo] oe) (14 marks) e database table togeuher with Your code and interface. Print thy fen

You might also like