LAB Exercise 2012
LAB Exercise 2012
2. Set the properties for all controls on the form 3. Write the event procedure code for every command button object : +, -, *, / Reset Exit calculate all the operation clear the input and calculation displays end the programmed
Page 1 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
Questions:
1. Add the following Main Menu items to the menu bar you have already designed in this section: 2 Marks Edit View 2. On your Edit Menu, place the following menu items: Undo Cut Copy Paste 3. On your View Menu, place the following menu items: View Textboxes View Labels View Image 4. Just like you did with the Exit menu item, Change the Name property of ALL menu items. Do not leave them on the defaults of "MenuItem1", "MenuItem2", etc. (You should change the Name property to something relevant, and use the prefix mnu. For example, the Undo item could have the Name mnuUndo.) 2 Marks 5. 6. Add an underline shortcut for ALL menu item 4 Marks 3 Marks 4 Marks
Add a key combination shortcuts per drop down menu for ALL menu item (you already have one on the File menu, so this doesn't count) 2 Marks
Page 2 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
7.
Write code to display a message box whenever a menu item is clicked, or its shortcut used. The message box should explain what the menu item will do when it's fully implemented. 3 Marks
Total : 20 Marks
Page 3 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
Questions:
1. Create a program that will calculate total of calories for every food classes (protein , carbohydrate and fat ) and then total up the calories of all the food classes. The number of calories per gram of carbohydrate, fat and protein are 4, 7 and 9. The program will allow user to enter the number of grams for every food class. Use the module variable and constant. An interface as shown below; containing group box, label, textbox and command button. 20 Marks Output
Total : 20 Marks
Page 4 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
10 marks
3. Put another button by writing the code using Select Case 10 marks
Page 5 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
Questions:
1. Write a program using repetition structure that will produce the output as shown below.(Refer Activity 5A)
1 X 10 = 10 3 X 10 = 30 5 X 10 = 50 7 X 10 = 70 9 X 10 = 90 11 X 10 = 110 13 X 10 = 130
10 Marks 2. Write a program to calculate average for several numbers based on the user prompt in text box. Use Input box as your input and display the output in Message Box. (Refer Activity 5B) 10 Marks Total : 20 Marks
Page 6 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
Each lab exercise should follow the below guidelines: Criteria Completeness - User interface must be neat and user friendly. Suitability of objects/controls - Suitable objects/controls Objects and properties plan - Use prefix name Functionality - Completed application must be able to run with no bugs. Total : Marks 6 4 4 6 20 Marks
Page 7 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
Questions:
1. Create a Form as shown below:
2 Marks In the above Form, the user is invited to enter values into three Textboxes. The first Textbox is for whatever times table that user wants. The second Textbox asks for the starting value of the times table. The third Textbox is for the end number of the times table. In other words, 1 times 4, 2 times 4, 3 times 4, right up to 12 times 4.
Page 8 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
The point is that the user can enter any values that they like. We won't know until they are entered, and the button is clicked. Up until now, we've used an array with a fixed size.
2. Write a code to make a program can print the times table depends on user needs. 15 Marks. 3. You must use values ReDim into your code to make your program functioning well. ReDim is functioning to reset an array in your application. You then specify the new values. Like this: ReDim numbers(endAt) 1 Mark
4. When you're finished, run your program and test it out. Click the button and the times table should appear in the List Box.
2 Marks
Total : 20 Marks
Page 9 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
Questions:
1. Create a form name = frmLogin, on that form should be having 2 text boxes (User name and Password) and two buttons ( Login and Cancel). 5 Marks
2. When user click on Login button, message box will be appear if user does not key in the username and password. While the Cancel button for clear text boxes. 10 Marks 3. Give the definition of function 4. Give the difference between function and sub. 2 Marks 3 Marks
Total : 20 Marks
Page 10 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
Questions: 1. Create a form requires a user to key in Name, Subject, Mark, Grade by using appropriate objects . Then it can be saved in the Ms Access database as result.mdb/result.accdb Use add, delete, update and search buttons. Use also next, previous, movefirst and movelast buttons.
2. 3. 4.
Each lab exercise should follow the below guidelines: Criteria Completeness - User interface must be neat and user friendly. Suitability of objects/controls - Suitable objects/controls Objects and properties plan - Use prefix name Functionality - Completed application must be able to run with no bugs. Total : Marks 6 4 4 6 20 Marks
Page 11 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
Questions:
1. Create a class called Customer that creates the variables for the following information: i. A customer ID as integer ii. The customer status as Boolean (N for new and O for old) iii. Total purchases for the year. 5 Marks 2. Create properties for each variable. 5 Marks 3. What is the difference between an object and class? 5 Marks 4. Give the definition for properties and method. 5 Marks
Total : 20 Marks
Page 12 of 11
POLITEKNIK TUANKU SYED SIRAJUDDIN DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION FP613 - .NET TECHNOLOGY LABORATORY EXERCISES
Questions:
1. Create one more class name as "third" and it function name is getProduct(). This function need to product a three variable as follow s=Me.X * Me.Y * Me.Z. ,then modify the code in step 5 to get the value of product in function getProduct(). 20 Marks Each lab exercise should follow the below guidelines: Criteria Completeness - User interface must be neat and user friendly. Suitability of objects/controls - Suitable objects/controls Objects and properties plan - Use prefix name Functionality - Completed application must be able to run with no bugs. Total : Marks 6 4 4 6 20 Marks
Page 13 of 11