Life long sharing . . .

Archive for November 2015

method1

1. Method returning value:

Lesson10-code1

What is the result for the above codes?

2. Method without returning value:

Lesson10-code2

What is the result for the above codes?

The next topic we are going to learn is way parameters is being passed. For Java, parameter is passed by value.

Lesson10-note2

In some other programming language, parameter can be passed by reference. Try to think it from a

1. What is the value of a and b after swapping?

Lesson10-code3

2. What is the name of dogA and dogB at the end of the program? And Java passes by ??

Lesson10-code5

Lesson10-note3

In changeName() method, the code modifies the name field of the object.

In changeDog() method, the method reference points to a new object.

3. What is the value of array after swapping?

Lesson10-code4

Lesson10-note6

Try to add in the missing codes in the below program.

Lesson10-code7

Lesson10-note4

Lesson10-code6

What is the output of the above codes?

Lesson10-note5

Source: http://www.tutorialspoint.com/java/java_methods.htm

Going through the guideline in answering BM Penulisan Bahagian A extracted from this book IMG_20151130_0003

with my girls. I find it very useful, giving them a clearer picture how to tackle the question and also things they should avoid. And after reading through it, you can see that the Kata Kerja vocabs is very important.

IMG_20151130_0001 IMG_20151130_0002

Click to download the pdf: Penulisan-BhgA-Teknik-Menjawab.pdf

Click to download: mix-collective-nouns.pdf

who-whom-whose

“Mom, what is ‘浪子回头’? What is ‘浪子’?” asked Ling.

“ee…” suddenly it came to me, “Just like Xu Tai Yu in  《我的少女时代》.”

“Oh …, got it.” grinned Ling and Ying.

We went for this Taiwan movie “Our Times” 《我的少女时代》 which told a high school girl Lin Zhen Xin’s story back in the 80s. And  Xu Tai Yu is the school’s notorious gangster boss. He was previously a bright student, but because of one accident, he blamed himself so much that he gave up on himself, chose to become a gangster. Part of the story is how Lin Zhen Xin helped Xu Tai Yu to return to the right track of his life, and Xu Tai Yu even made it to the top 10 of the school.

Very nice movie to watch with your teens, and I like the movie song sung by Hebe:

I miss my school days, I miss the water ball fight, the roller skates, the ride on the motor bike, ….Have the urge to watch it again. 😛

This might be helpful for SJKC children. Sharing it here.

Click to download: Peribahasa with mandarin.pdf

Lesson7-note1

Lesson7-note2

Lesson7-note4

Loop Control Statements:

Lesson7-note3

What do you think is the output of the above two programs?

 

 

 

Source: http://www.tutorialspoint.com/java/java_loop_control.htm


Archives

November 2015
M T W T F S S
« Oct   Dec »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 178 other followers