9/16/2015

DCT1083 OOP: Makluman Assignment 2 dan Ujian 1

Assalamualaikum.
Tarikh hantar Assignment 2 adalah pada 23/9/2015.
Assignment 2 boleh di buat berkumpulan seperti Assignment 1.

Ujian 1 akan di buat pada 30/9/2015. Contoh Ujian 1 adalah seperti di bawah:-

1.  Response to the following statements by circling either T (TRUE) or F (FALSE). [10M]

I.    A computer includes both hardware and software. In general, hardware is the physical aspect of the computer that can be seen, and software is the invisible instructions that control the hardware and make it perform tasks.

II.    The machine language is a set of primitive instructions built into every computer.

III.    Assembly languages are English-like and easy to learn and program.

IV.    A compiler is used to translate the High-level languages (source program) into a machine language program.

V.    Java enables users to develop and deploy applications on the Internet for servers, desktop computers, and small hand-held devices.( T / F)

VI.    Java is one of language that support object oriented programming. ( T / F)

VII.    Object-oriented programming (OOP) is a popular programming approach that is replacing traditional procedural programming techniques. ( T / F)

VIII.    Reserved words or keywords are words that have a specific meaning to the compiler and cannot be used for other purposes in the program. ( T / F)

IX.    System.out.println is one of the pre-defined methods in Java. ( T / F)

X.    The main method looks like this: ( T / F)
public static void main(String[] args) {
  // Statements;
}

2. Match the following Statement / Name to its description. [9M]



No    Statements                       Description
I.        x = 1;                               i = i + 8
II.      int x = 1;                         Addition
III.    double radius;                 Declaring and Initializing
IV.    final int SIZE = 3;           Multiplication
V.      +                                     Assignment Statements
VI.     *                                    Keywords
VII.   Char, class, const          Preincrement
VIII.  i += 8                            Constants
IX.     ++counter                      Declaring Variables

3. Give a brief explanation for the following question.


I.    What is Programming? [2 marks]

II.    What is Debugging? [2 marks]

III.    What is the difference between a Constant and a Variable? [2 marks]

4. Which of the following are invalid identifiers, why? [5 marks]

I.    DCIT
II.    DCIT   Students
III.    $matric
IV.    matric_number
V.    1stJAVAProgram


5. Show ‘Evaluation Tree’ for the following expressions: [4 marks]

I.    8 + 2 / 4
II.    6 * 2 + 3 % 2
III.    3 + 2 / 5 + -2 * 4
IV.    2 * (1 + -(3/4) / 2) * (2 - 6 % 3)

6. Evaluate the following Boolean expressions. The value for X,Y and Z are as follows:-
X=1;
Y=2;
Z=3;

I.    XII.    X<0 br="" nbsp="">III.    ((XIV.    ((XV.    ! (X7. Write a java fragment for the following problems.


0.    Write a for statement to print integer 1 to 20. [example]

int i;
For (i=1; i<=20; i++)
System.out.Println(i);


I.    Write a for statement to print integer 1 to 10. [3 marks]


II.    Write a while statement to print integer 1 to 10. [3 marks]


8.    Write a an algorithm and a java program that displays the following table:-
 (note that 1 kilogram is 2.2 pounds):
 [10 marks]
    Kilograms     Pounds   
    1                     2.2      
    3                    6.6      
    ...
    100                220   





Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...