Sunday, November 11, 2018

Lab4 & Lab5

Assalamualaikum, in this entry I would like to share about the lab4 and lab5. In the lab4 there is only one question which is to create our own adventure game. In this lab we need to use multi way and nested selection. means that player need to choose between two option, then form the option, we need to create another scene consequences from the player answer. there need to be two endings.

Next is about lab5, in this lab we need to know how to use switch statement, logical operator combine with Boolean expression and conditional operator. switch statement is like the if - else statement, the difference is that switch does not use 'if ', the use 'break' to separate the command. for the conditional operator, it also same as the if-else statement, but the difference is that conditional operator combine the if and else result in the same statement. for example :

score = ( x > 10 ) ? 3 * scale : 4 * scale;

from this statement, we can figure out that    
 if (x > 10) 
score = 3*scale
else
score = 4*scale;

that is all i want to share for this entry. thank you.

Test one is being held in this same week. For test one basically is not too difficult but it become difficult because there is not enough time to properly look through the questions and I answer the questions hurriedly. For me, the time for the test should be extent 30 minutes approximately.


p/s: link to Atika`s blog
ssk3100.blogspot.com

No comments:

Post a Comment