Ear 302 2021

You might also like

Download as pdf
Download as pdf
You are on page 1of 2
KENYATTA UNIVERSITY EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN AEROSPACE ENGINEERING EAR 302: COMPUTER PROGRAMMING II 15" SEMESTER 2020/2021 TIME: 2 HOURS INSTRUCTIONS i. This paper consists of FIVE questions li, Question ONE is compulsory and contains 30 marks iii, Attempt any TWO of the remaining four questions. Each question is 20 marks QUESTION 1( 30 MARKS) {a) Define the term data structure and give two examples. [3 marks} (b) Discuss the following terms as used in programming languages. i. Object state Data hiding fii, Inheritance [6 marks} (c) Briefly explain the term exception in programming and explain how it differ with other errors. (Smarks) (4) tllustrate form design for capturing aircrafts partno, name and cost, Write a code snippet for storing data received from user in a data structure. [Smarks} (e) Discuss any three principles of graphical user interface design [6 marks] (f) Write 2 program in C#.net that capture several student names in alist and sort them before displaying in a list box control. [Smarks} INVOLVEMENT IN EXAMINATION IRREGULARITY SHALL LEAD TO DISCONTINUATION Page 1 of 2 QUESTION 2 4 (a), Briefly explain role of FileStream class in C# programming, [2 marks} ) Discuss any three reasons why a programmer would prefer coding. graphical user interface instead of command line interface . (6marks] {Discuss any three advantages of component-based software development approach. (6 marks} (d) Design a graphical user interface form to capture aircraft details as they are booked for repair, Write code to store data in a data structure which enable sorting details before displaying in a data grid view control. QUESTION Vo (a) Discuss any three shortcomings of component-based software development approach. [6 marks} (b) Illustrate multi-tier software architecture . State role of each layer [6 marks) (c)_ Write a C#t.net console based program that capture machinery details such as. [6 marks} machineno,Name,category and market value. Captured data should be displayed in a tabular sorted terme = ° [8marks] QUESTION 4 (a) Outline how user program interact with third party device driver program. (6 marks] (b) Write a code snippet to validate value entered on a textbox to be only characters. [4 marks) (c) Briefly explain how polymorphism concept is implemented in window forms. [4 marks] (d) Write a program that capture several workshop tools’ name in a string, Use foreach.. loop to retrieve all data item and display the same. {6 marks} QUESTION 5 (a) Differentiate between single document interface (SD!) and Multiple document interface (MOI). Give example of common SDI and MDI applications. (6 marks) (b)_ Explain how user program interact with operating system, Write a code snippet to list all fle in list box control. (6 marks] (c)__ Write a Cit,net code for sending engineers details captured on window form. illustrate form design and write code for save changes operation. (8 marks} sere eretreeseeaetetee4 END OF EXAMINATION #+ tes carexesensccnsennenssees |D TO DISCONTINUATION Page 2 of 2 INVOLVEMENT IN EXAMINATION IRREGULARITY SHALL L.

You might also like