Friday 14 December 2018

LAB 3

Dinie is here !

So do you know what topic it is for Lab 3?
The topics are problem solving, data types and selection.

So what is data types? i have mentioned in previous post that the example of data types are Byte, Long, String and others. Let me share the information one of data types. So we know that number consists of integer, decimal, whole number and number also have minimum value maximum value. To create a program we have to make sure what kind of variable that we have. If the variable is an integer the data type is byte, if the variable is decimal the data type is double. You have to identify the variable to know the data type. This is basically the basic/primitive data type.

As usual, in this lab i trace the program given. This time is different as we are using different data type and we need to make sure the program is using the correct data type. Then i need to correct if the data type is wrong.

This time, the question for creating a program for the problem is quite difficult. This is beacuse the problem given quite difficult. I took a longer time than before as i need to learn more about the terms terms such as data types, relational and comparison operators to test some kind of relations between two entities such as ==, -= and etc. This kind of comparison operators is used in certain kind of program.

During lab 3, i have learnt to declare, initialize and use appropriate data types in program. To specify alternative paths of program's execution i have to use selection statement. Then after knowing and master all of this i have to write and practice more to run this simple computer program. Exercise in this lab manual is verry helpful !

No comments:

Post a Comment

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...