Saturday 22 September 2018

0 LAB

Assalamualaikum and hye everyone.

My name is Dinie Filzahie Binti Kamaruddin and taking instrumentation science course. So this semester i'm going  to learn conputer programming 1 subject.

On 18th September 2018, I attend my first lab in computer programming 1 subject. In this first lab, we have been introduce in programming environment . As a student who has zero knowledge about programming i find out that programming is quite interesting as i can even create a folder by using command prompt and typing out the command. What i learnt is if i want to create a new folder using command prompt i have to command by typing 'mkdir your_name' . Command 'cd' is use if you want to go back to your parent directory. After getting used with some of coding and the command, i learnt to write, compile and run a simple computer program written in java.


As i know javac function is used to compile the code which we have written for a program.
During lab, we have been told by lecturer before using the javac we have to check if the pc we use has the java file or not. In this part, i'm a little bit lost since i do not what to do next. So after figure out why my javac is not found or cannot be recognized , i have to set the path for my java. There are some steps to do to which is i already know and learnt from google and my friends in the lab. Then i proceed my simple java program using notepad and typing all the code that instructed in lab manual and name the file "MyFirstJavaProgram.java. so to compile this java program i have to command javac MyFirstJavaProgram. To run the program i typing out the command "java MyFirstJavaProgram".
The result will come out  according to the program that i have coded.




This is the result from my java program. I started by organized my files in specific folder. I save my java program in lab0 folder. By following all the steps in lab manual i managed to make my 'hello world' appear. Not to forget, i make some mistakes during my first lab. As i succesfully run the java program, i started again with different code of output and failed. I figured out that i make a spelling error and wrong current directory. Then i know even we coded wrongly we also cannot run our program. So coded carefully and make sure to follow step by step . can't wait for next lab !


Xinyee

LAB5

hallo ! i'm back for the reflection of lab5 :) so, the topic for lab5 in week 6 is switch statement, logical operators and conditional...