Thursday 20 September 2018


Lab0


PART1-REFLECTION

For the first programming lab which is my very first programming class ,I find it was quite exciting since it was outside our comfort zone which is Physics.It is a subject which need you to compile,run a program and many more.So,it takes much more effort and skills in order to excel in this course.

Basically the first lab is about the introduction to computer program.The purpose of the first lab to familiarise ourself with lab and the programming environment.Other than that,it's suppose to make us to write,compile and run simple computer program written in java.

For the first part of the lab,we are instructed to open the command prompt to familiarise ourself with the command prompt.From there I learn on how to create a folder just by giving command and without manually making the folder.All we need to do is give the command in the command prompt,and it will be automatically appear.In order to make a directory,we command 'mkdir_name of directory',then we make a folder by the name of Lab0 and by command 'notepad' in the cmd,we need to save it into the file Lab0.After commanding in the cmd,we need to check wether the file does exist in the computer.I find it a little bit difficult to understand for the first time,after few times trying,finally i get what we need to actually do.

So,this is what i get from it,


FIGURE 1


After completed for the first part,we proceed to second task that is running and compiling simple program.For this part there are some mistakes that I make, that causes some error when I wanted to run the program.Few mistakes that occur during the lab;
1)I do not named the file correctly,where i dont put '.java' behind the file,so it cant be recognised by the system.
2)When I tried to change the settings for the path of the computer,i dont use the correct notations,causing it to be not recognised when i try to run the program.

After fixing all the mistakes above,i get the below result;
Figure 2



After we run the java program,there are still some error occur as you can see at the above figure since there are some part of the program execution was not accurately typed.This is because,we need to follow certains method to make sure that the program is working properly.We need to make sure the main method,execute statement,and the tracing execution is accurately used.If we miss even one single notations,wether it is the sensitive case of the alphabet,or the notations such as commas,semicolon,there will be error occur when we try to run the java.After few mistakes,at last i can run the java.For the proper trace of program execution



figure 3




PART2-HOW DOES COMPUTER STORE IMAGE AND MUSIC

The computer will store them by converting the human language into the computer language.It was by converting them into binary by using some process of encoding and decoding.It will turn into
8-bits,12-bits depending on how large the file was.For image,the colors will be represented by JPEG,PNG and GIF. Represent color of each pixel. Use run-length encoding to compress size.For Music,sample less frequently  use fewer bits to represent the sample.




Link to the next person:
dnflzhe.blogspot.com
























No comments:

Post a Comment