2020 Practice of Computer Proposed Question
2020 Practice of Computer Proposed Question
Peace-Work-Fatherland Peace-Work-Fatherland
…………... …………...
MINISTRY OF HIGHER EDUCATION MINISTERE DE L’ENSEIGNEMENT SUPERIEUR
…………... …………...
NATIONAL COMMISSION FOR THE COMMISSION NATIONAL D’ORGANISATION
ORGANIZATION OF THE HIGHER DE L’EXAMEN DU HND
NATIONAL DIPLOMA EXAM (HND) ……………
……………
Students are required to have the following software installed in their computers:
Code block, for C and C++ programing
Visual Studio, for Event programming
Netbeans or Eclipse or JBlue for Java
Wamp or Xampp for database
I- C- programming (15mks)
Consider the sequence Sn=∑𝑖=𝑛 𝑛 1 2 3
𝑖=1 (𝑥 )= 𝑥 + 𝑥 + 𝑥 + ⋯ + 𝑥
𝑛
i. Write a C code that allows the user to input a real value 0<x<1, calculate the value of
n=N such that SN <=1. N and 𝑆𝑁 will be displayed. (5mks)
ii. An error message (ERROR: the value of x is too small) that permits the user to
know that the value of x was too small which would permit the program to enter
an infinite loop was entered would also be printed. This would occur if the
program attempts to do more than 50 iterations. (5mks)
iii. Define an array called sum and put all the values of Si, 1<=i<=N. The program
would print out the values of Si both vertically and horizontally.
(5mks)
iv. Write another set of codes on the same program that deletes the kth value in
the array where k<N and display the terms of the table where k<N. (5mks)
Page 1 of 5
function in this two variables. Clearly show how inheritance is exhibited by sufficiently
commenting the program. Use either C++ or Java.
III- Event programming (15mks)
1- Create in ASP.NET a page as below:
NB: The Reset button is used to clear the Login and Password text fields.
Following the relational schema provided above where the attributes underlined are primary keys and
those with the symbol (*) denotes foreign keys, consider developing a relational database using
MySQL
Page 2 of 5
2- In the web page created above, include external CSS implementation to your form.
(3mks)
3- Write a simple JavaScript function that, when the user clicks on the submit button,
displays all the information filled in the form inside a dialog box message. (7mks)
Materials required:
Equipment needed:
2 workstation
2 Ethernet cables (cat 6e)
Page 3 of 5
1 switch
1. What type of connection is required for this type of network?
2. Prepare the cables for the network
3. Connect the workstation to hub/switch
a. Plug the hub or its AC adapter into a power outlet. Plug the cable
from the workstation into any port of the hub, except the first.
b. After the workstation have booted, check the green link light on the
back of each NIC and the green lights on the used ports of hub to
verify that there is a good physical connection between the hub and
the NIC in the workstations.
c. What is the probable cause if the link light is not on?
4. Check the TCP/IP protocol settings.
a. Use the control panel and double-click on network.
b. Select the TCP/IP protocol, which matches your NIC, from the
configuration tab
c. Click on properties, check the IP address and subnet mask for your
workstation on the IP address tab.
d. Since we are only making an internal network, an intranet, the IP
address can be set to just anything. For this lab, we will use the
address 200.150.100.0 and each workstation will use a different last
value for its host ID number. For example host 1 will be set to static
IP address 200.150.100.1
e. Set the default subnet mask on each workstation to 255.255.255.0
5. Check the network connection with the ping utility.
a. Click on start, Programs and then the MS-DOS Prompt.
b. Enter the ping command followed by the IP address of your own PC
Page 4 of 5
c. Report for the IP address of your neighbor. How was the result
different?
Page 5 of 5