Friday, September 13, 2013

VB Wage Exercise

Here is the VB Wages Exercise.

Friday, July 5, 2013

Coursework Marks for July 2013 Exam

Here are your coursework marks for the following subjects:
Your final coursework marks are in green.

Please note that the marks here are unofficial. Official marks/grades are only released by the Exam Department.

Tuesday, April 30, 2013

Coursework Marks for May 2013 Exam


Here are your coursework marks for the following subjects:
Your final coursework marks are in green.

Please note that the marks here are unofficial. Official marks/grades are only released by the Exam Department.

Monday, September 3, 2012

Splitting of IT102N into two groups

For Diploma in IT students taking my IT102N class, please note that the class has been divided into two different groups.

The grouping are as follows:
Group Alpha
Tuesdays 8.30 - 10.30 (Lab 3.3)
Thursdays 8.30 - 10.30 (Lab 3.3)

Students in Group Alpha:

  1. Lim Jia Wei (April)
  2. Eric Chong Jian Guang
  3. Neo Yeong Khai
  4. Ng Kin Wai
  5. Lam Chee Hong
  6. Chik Von Thai
  7. Chia Kim Li
  8. Chok Foo Yiek
  9. Tee Yih Henn
  10. Tay Hao Han
  11. Kantha Balan
  12. Navinthraj a/l Muturaja
  13. Jivishwaran a/l Sagar
  14. Malcolm Louise Frank
  15. Yessaya Neema Henry
  16. Choo Wai Hoong
  17. Wong Pin Fu
  18. Charlie Wing Tiong Tat
  19. Kok Chun Kit
  20. Gunasundar a/l Balasubramaniam
  21. Foo Yeau Ming
  22. Dhashern Sivalingam
  23. Ashwin Nair
  24. Srivanan a/l Periasamy
  25. Tee Wei Siong


Group Bravo
Wednesdays 15.00 - 17.00 (Lab 3.3)
Thursdays 15.00 - 17.00 (Lab 3.3)

Students in Group Bravo:

  1. Indera Izzwan bin Mohd Fuad
  2. Chan Wei Sik
  3. Tan Eng Tian
  4. Aaron Chan Yin Feng
  5. Iyanda Mayowa Jelili
  6. Lim Chi Kwan
  7. Daanes a/l Chadrashekar
  8. Dharshini a/p Raju
  9. Lim Jia Wei (June)
  10. Lim Khang Loon
  11. Chong Jun Jie
  12. Ojelade Oludareb
  13. Jeya Sharma a/l Manoharan
  14. Mohamad Loqman 
  15. Muhammad Omar Sha'azza
  16. Hea Chun Wei
This arrangement has been discussed in class previously and will take immediate effect. If I have accidentally left anyone out of the lists above, please do inform me directly.

Tuesday, January 31, 2012

3IS0212N: Information Systems download link

You can download the lecture slides for 3IS0212N here. Just click on the link below. However, be forewarned - it's a 71 MB file!

3IS0212N lecture slides

Please let me know if there are problems with this link.

Updated 6 March 2012 - The link to the Assignment Questions

Thursday, November 17, 2011

1CIT0101 Exercise

Question 1


a) What is a variable? How are they used in computer programs?

(3 marks)


b) What is output by the following lines of code?

divisor = 5;
value = ( 8 * 4 * 2 + 16 ) / 2 + 4;
cout << value << “ % ” << divisor << “ = ”
       << value % divisor;

(5 marks)


c) Write a complete C++ program to calculate and display the coordinates of the midpoint of the line connecting the two points whose coordinates are (3, 7) and (8, 12). Use the fact that the coordinates of the midpoint between two points having coordinates (x1, y1) and (x2, y2) are ((x1 + x2)/2, (y1 + y2)/2). The display produced by your program should be:
The x coordinate of the midpoint is xxx.xx
The y coordinate of the midpoint is xxx.xx

where xxx.xx denotes that the calculated value should be placed in a field wide enough for three places to the left of the decimal point, and two places to the right of it.

(12 marks)
(Total: 20 marks)


Question 2

a) Under what circumstances would the default case in a switch statement execute? What would happen under those circumstances if there is not a default case?

(4 marks)

b) What does the following program print?

1 #include
2 #include
3 using namespace std;
4
5 int main()
6 {
7 int y;
8 int x = 1;
9 int total = 0;
10
11 while ( x <= 10 )
12 {
13 y = pow(x, 2);
14 cout << y << endl;
15 total += y;
16 x++;
17 }
18
19 cout << "Total is " << total << endl;
20 return 0;
21 }

(4 marks)
(Total: 12 marks)



Question 3

a) For the following code segment, determine if there is an error in the code. If there is an error, identify the line where the error has occurred, specify the nature of the error, and then write the corrected code. If the code does not contain an error, write “no error”.

The following while loop should compute the product of all integers between 1 and 5, inclusive:

1 int i = 1;
2 int product = 1;
3
4 while (i <= 5);
5 product += i;

(6 marks)


b) Four experiments are performed, each experiment consisting of three test results. Write a complete C++ program using a nested for loop to enter each experiment’s test results and then compute and display the average of the test results for each experiment.

Sample output:

Experiment 1

Enter test result: 23.2
Enter test result: 31
Enter test result: 16.9
Experiment 1 average: 23.7



Experiment 2

Enter test result: 34.8
Enter test result: 45.2
Enter test result: 27.1
Experiment 2 average: 35.7



Experiment 3

Enter test result: 19.4
Enter test result: 16.8
Enter test result: 10
Experiment 3 average: 15.4



Experiment 4

Enter test result: 36.9
Enter test result: 39
Enter test result: 49.2
Experiment 4 average: 41.7

(14 marks)
(Total: 20 marks)

Thursday, May 5, 2011

Coursework Marks for May 2011 Exam

Here are your coursework marks for the following subjects:
Your final coursework marks are in green.

Please note that the marks here are unofficial. Offical marks/grades are only released by the Exam Department.