Case Study Set 1 Questions
Case Study Set 1 Questions
1. During an interview in a company, the top manager list the following words:
algorithm, link list, stack, queue, programming language
a. Write short note on the following word: link list, stack, queue,
programming language
(4marks)
2. explain the principle of binary search algorithm (3 marks)
b) Giving the list below, show all necessary steps involve in searching the
location of 31 using binary search algorithm. (3marks)
2 5 8 12 16 23 38 56 72 91
c) demonstrate that the complexity of binary search array is really O(logn)
(5marks)
II. EVENT PROGRAMMING (10 MARKS)
1. Define visual basic and event. (2marks)
2. State and explain the two main steps to develop a program in visual basic? (04mark)
3. What is the difference between console.writeline() and console.write() in visual
basics? (2Marks)
4. What is the significance of console.readkey() function in visual basics? (2marks)
Page 1 of 4
III. STRUCTURED PROGRAMMING (20 MARKS)
1. What are some of the advantages of using functions in c programs? (3marks)
2. What is main disadvantage of using arrays in programming? (2marks)
3. Write a program that prompts the user to input a decimal integer and display its
binary equivalent. (5 marks)
4. Write a c program using arrays to print the 3 by 3 matrix shown below. Note that
the program should ask the user to enter the array elements. (10marks)
Page 2 of 4
2. Give examples of DDL, DCL and DML as used in SQL (2marks)
3. The questions below concerns the table below
a) What is the cardinality and degree of the relation (2marks)
b) List the attributes and choose a suitable primary key attribute for the relation
(2mark)
c) Write an SQL command to create the table below. The table name should be
student_info (1mark)
d) Write an SQL command to select all students with gpa greater than 2.7
(1.5mark)
e) Write an SQL command to select names of all the students (1mark)
f) Write an SQL command to add a fifth record to the table with ID ST002,
Name John, gpa 3.0 (1.5mark)
g) Write an SQL command to change the gpa of Suzy from 3.2 to 3.4 (1mark)
Page 3 of 4
3. What is the most appropriate OSs you think can be installed in both computers and
the central computer so as to ensure that proper file sharing and resource access
should be ensured (2 + 2 =2 mrks)
4. List all the various networking tools you will need in course of this activity to
ensure that these two computers communicate with the central machine (3 mrks)
5. Which other name can be given to the central machine (2mrks)
6. Which other name can be given to the two computers connected to the central
machine (1mrks)
7. Which stand will you use to prepare your cables and why? (1mrks)
8. LIST all the necessary configurations you think should be put in place and the
various ping commands to ensure that the computers are on a network and can
communicate and share resources (3 mrks)
Page 4 of 4