Get premium membership and access revision papers, questions with answers as well as video lessons.

Bit 2203: Advanced Programming Question Paper

Bit 2203: Advanced Programming 

Course:Bachelor Of Information Technology

Institution: Dedan Kimathi University Of Technology question papers

Exam Year:2011



KIMATHI UNIVERSITY COLLEGE OF TECHNOLOGY
UNIVERSITY EXAMINATIONS 2010/2011
THIRD YEAR FIRST SEMESTER EXAMINATION FOR BACHELOR OF SCIENCE INFORMATION TECHNOLOGY
BIT 2203: ADVANCED PROGRAMMING
DATE: 11TH April, 2011 TIME: 11.00AM – 1.00PM
====================================================================================================== ===================================================================
Instructions: Answer Question ONE (1) and any other TWO questions

Question 1 (30 marks)
(a) Describe the functions below as used in programming, stating their specific use:
(i) Friend
(ii) Constructor
(iii) Destructor
(iv) Overloading functions (8 marks)
(b) Write a class named Students having a single attribute and two methods show how the class can instantiate an object (8 marks)
(c) Describe 5 possible containers used in C++ (5 marks)
(d) Describe 3 sets of design requirements that must be fulfilled during development of a container (6 marks)
(e) What is vector and why is it better to use than an array? (3 marks)




Question 2 (20 marks)
(a) Explain two ways of creating a vector in C++ (6 marks)
(b) Create a vector, myVector, then show how three elements 1,2,3 each at a show how you can add three elements 1,2,3 (5 marks)
(c) Using an example, explain how you would add a million items to a vector (5 marks)
(d) Write a single C++ statement to remove the last item from a vector, myVector (1 mark)
(e) The following functions are used in a vector container, describe the use of each.
(i) .front()
(ii) .swap(vector <T> )
(iii) .erase(iterator) (3 marks)

Question 3 (20 marks)
(a) Describe any 5 typical functions that are provided by the iterator class (5 marks)
(b) List any five objectives of a container class (5 marks)
(c) Putting all the requirement considerations in mind, design a container class of your choice showing all that should be included. (10 marks)

Question 4 (20 marks)
(a) Make a comparison and contrast of the following design patterns, with regards to intent and problems area.
(i) Factory and Singleton
(ii) Adapter and Composite
(iii) Observer and State (9 marks)
(b) Using the Observer pattern, separately indicate the methods that one would use in the Observable and observable classes. (8 marks)
(c) Name any 3 container classes. (3 marks)


Question 5 (20 marks)
(a) Describe the process involved in component-based software development. (6 marks)
(b) Describe in details the advantages of using component rather than containers(5 marks)
(c) Discuss the two components that deal with the following array errors
i) Reallocation errors
ii) Algorithmic array errors. (6 marks)
(d) What is a component? (Discuss in detail) Give 3 facilities that may be used as components. (3 marks)






More Question Papers


Popular Exams


Mid Term Exams

End Term 1 Exams

End Term 3 Exams

Opener Exams

Full Set Exams



Return to Question Papers