1st - Philadelphia University

advertisement
Faculty of Information Technology
Department of CIS
Examination Paper
Philadelphia University
Lecturer
: Mrs. Eman Alnaji
Coordinator : Miss. Reem AlQaqa
Internal Examiner: Dr. Ali Fouad
Visual Programming (761220)
Date: 9-4-2014
First Exam
I
Second Semester of 2014-2015
Time: 60 minutes
Information for Candidates
1. This examination paper contains four questions, totaling 22 marks (2 bonus)
2. The marks for parts of questions are shown in square brackets.
Advice to Candidates
1. You should attempt all questions.
2. You should write your answers clearly.
I. Basic concepts
Objective: The aim of the questions in this part is to evaluate your knowledge and skills concerning with the basic
concepts of windows programming using .NET environment
Question1: Choose the correct answer of the following:
[5 Marks, 1 Mark each]
1. The purpose of the Visual Studio Express 2012 for Windows Desktop is to
a) create a program.
b) run a program.
c) debug a program.
d) All of the above.
2. The StretchImage property is used to:
a) change the size of the image to fit the PictureBox
b) change the size of the PictureBox to fit the image
c) find a medium between the PictureBox and the image
d) make the picture as large as possible while still maintaining quality
3. GroupBoxes and Panels are used to:
a) bundle a bunch of controls into one package
b) allow more than one RadioButton to be true at the same time if the radio buttons are on
different GroupBoxes or Panels
c) organize the form in a more orderly fashion
d) All of the above
4. MouseUp and MouseDown events are used when the mouse moves up or down.
a) true
b) false
5. What does the ReadOnly property indicate?
a) the number of the control cannot change
b) the user cannot click the buttons to select a number into the control
c) the user cannot type data into the control
d) all of the above
1
II. Familiar Problem Solving
Objective: The aim of the questions in this part is to evaluate that the student has some basic knowledge of the
key aspects of the lecture material and can attempt to solve familiar problems.
Question2: Answer the following:
[Total: 6 Marks]
1. Write a C# code that shows a button named “button1”.
(1 mark)
2. Write a C# code that concatenates the values of two textboxes, “t1” and “t2” and displays the new
value in textbox “t3”
(1 mark)
3. Display the image which has the location (c:\\mypictures\\tulip.bmp) in a picturebox named pb.
(1 mark)
4. In the form displayed below, change the font size of the label to 20 and the font style of the label to
bold when the mouse enters within the label borders.
- Note: write down the event handler:
(2 marks)
5. In the form displayed below,
a. specify the property that makes the button looks this way (i.e. the button covers the whole
form area) (0.5 Mark)
b. And specify the value of this property. (0.5 Mark)
2
Question3: Apply the following:
[Total: 6 Marks]
1. Design the following form.
2. Specify 2 types of control items used in this form.
1-
(2 Marks)
2-
3. Write a c# code that does the following :
When the user checks the show seat row checkbox:
(2Marks)
a. The below message will appear if the person’s age is below 20 and has a ticket with letter “z”
written on it.
b. Otherwise the message “sit anywhere” will appear.
c. If the ok button is pressed clear both textboxes.
(1 Mark)
3
III. Unfamiliar Problem Solving
Objective: The aim of the question in this part is to evaluate that student can solve familiar problems with ease
and can make progress toward the solution of unfamiliar problems, and can set out reasoning and explanation in
clear and coherent manner of the topics related to the function.
Question4:
Create an empty form, as displayed below, then write a c# code that changes the background color of the
form to green, when the user writes the word “green” on the keyboard (Hint: the word should not appear
anywhere on the form)
[3 Marks]
Good Luck 
4
Download