3/17/2013

BCS1243 PP: Contoh Test 1


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

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

      II.            2. Java is one of language that support object oriented programming. ( T / F)
    IV.            3. 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)

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


        I.            5. An identifier is a sequence of characters that consist of letters, digits, underscores (_), and dollar signs ($).( T / F)

B. Match the following Statement / Name to its description.


No
Statements

Description
        I.             
x = 1;

Constants
      II.             
int x = 1;

Addition
    III.             
double radius;

Declaring and Initializing
    IV.             
final int SIZE = 3;

Multiplication
      V.             
+

Assignment Statements
    VI.             
*

Remainder
  VII.             
%

Declaring Variables


C. Answer the following questions


         I.            What is debugging? [2 marks]




       II.            What is the difference between a constant and a variable? [2 marks]

 
D. Which of the following are invalid identifiers, why? [7 marks]

                     I.            one
                   II.            hello_there
                 III.            hello,there
                 IV.            my    Window
                   V.            JAVA
                 VI.            1234
               VII.            acct122 
E. Evaluate the following expressions: [4 marks]

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

F. 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<=10; i++)
System.out.Println(i);


I.                    Write a for statement to print integer 50 to 60. (3 marks)


II.                  Write a for statement to print the following output. (3 marks)
2               4           6             8             10


3/16/2013

BCS1333 OS: Exercise Chapter 4 (Threads)

[aktiviti untuk 17 mac. sila jawap soalan 1 hingga 4)
The process model introduced in Chapter 3 assumed that a process was an
executing program with a single thread of control. Many modern operating
systems now provide features for a process to contain multiple threads of
control.

1. What is threads?
2. What is multi threading?
3. Explain four benefits of multi threading.
4. Briefly describe (or sketch)  Multi Threading Model available (many-to-one,one-two-one and many-to-many)

5. Provide one programming examples in which multi threading does not
provide better performance than a single-threaded solution
Answer:  Any kind of sequential program is not a good candidate
to be threaded. An example of this is a program that calculates an individual
tax return.

6. Consider a multiprocessor system and a multi threaded program written
using the many-to-many threading model. Let the number of user-level
threads in the program be more than the number of processors in the
system.Discuss the performance implications of the following scenarios.
a. The number of kernel threads allocated to the program is less than
the number of processors.
b. The number of kernel threads allocated to the program is equal
to the number of processors.
c. The number of kernel threads allocated to the program is greater
than the number of processors but less than the number of user level
threads.


3/10/2013

DCT1133 Chapter 5 OS



1.What is preventive maintenance and what is the purpose of preventive maintenance?


2. List any three (3) roles of an operating system.

3. There are two types of user interfaces – CLI and GUI. Briefly explain each of them

4. The following applications are used extensively for post installation modifications: Msconfig and Regedit. Briefly explain each of them.

3/05/2013

BCS1243 Assignment 2


1. A University has 3000 students. These students are divided in four catogeries:

i) B. Tech
ii) M. Tech
iii) M.S
iv) Ph.D

Write an algorithm and java program for finding the percentage of the students in each category.

 2. Write an algorithm  and a java program  that prompts the user to enter the number of students and each student's name and score, and finally displays the student with the highest score


 3. Write an algorithm  and a java program reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values, not counting zeros. Your program ends with the input 0. Display the average as a floating-point number. (For example, if you entered 1, 2, and 0, the average should be 1.5.)

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