SCO202 Event Driven Prog
SCO202 Event Driven Prog
QUESTION ONE
a) Explain the role of the following visual studio IDE components
i. Solution explorer (1 mark)
ii. Tool box (1 mark)
iii. Object browser (1 mark)
b) Critically discus the approaches adopted by the .NET framework to support multiple
languages (4 marks)
c) You have been hired by KPLC to design a windows form based application to assist
its clients in billing operation. The application shall capture the current and previous
meter reading then calculate the unit as follows
Units=current reading-previous reading
Based on the units, the application is supposed to calculate customer bill. The bill is
based on the following category
The application should display the customer bill information on a data gridview
control upon the click of a button as follows
Required:
i. Sketch appropriate user Interface to implement the above scenario. (2 marks)
ii. Write appropriate C# code to implement the above business logic. (10 marks)
(10 marks)
a) With respect to .NET framework, explain how the source of a .NET compliant language
is compiled into machine code. Use a diagram to support your arguments. (7 marks)
b) A windows forms application is supposed to enable users to capture information about a
product i.e. product code, name, price and category ID. Based on Category ID, the
program should display category Name and the description on data grid view control.
Assume the following categories exists. Use switch case to make your decisions
QUESTION THREE
a) Compare and contrast .NET and J2EE architectures from the following perspectives
i. Execution engine (3 marks)
ii. Tools support (2 marks)
iii. Language support (2 marks)
b) The salary earned by staff of a company named XYZ is based on three major components
i.e. basic salary, commuter allowance and housing allowance. All employees who work
for overtime hours are paid overtime amount based on the following criteria
Overtime hours Rate in (Ksh)
0-10 1500.00
Over 10 2000.00
(13 marks)
QUESTION FOUR
a) Differentiate between Single Document Interface (SDI) and Multiple Document Interface
(MDI) applications (4 marks)
b) Explain the role played by the two major components of the .Net Framework
(4 marks)
c) Write appropriate C# code to
i. Load an image sleeted using an openFileDialog to a pictureBox known as
‘picsample’ (3 marks)
ii. Run a form known as ‘FrmCustomer’ to the current MDIform (3 marks)
d) Discus any two repetitive control structures supported by C# and how they are
implemented. Use an example for each to demonstrate how it is implemented by the
language (6 marks)
70-100 A Excellent
60-69 B Good
50-69 C Fair
40-49 D Pass
0-39 F Fail
Required:
Write appropriate C# code to implement the above business logic. The program shall accept
the unit name, unit code, semester (1,2,3) academic year, cat marks, project marks and exam
marks. The final mark shall be passed to a method known as grade ( ) which calculates and
returns the grade of the student. The programs produce output in the following format
(13 marks)