2/28/2015

BCS1333 OS: Quiz 1 & Assignment 1

QUIZ 1

Please submit before 4.00pm to BP36 (Bilik Pensyarah 36 , Blok Akademik B, Aras 4.)


  1. The service provided by an Operating System can be divided into two main categories. Briefly describe the two categories and discuss how they differ.





  1. List five services provided by an Operating System that are designed to make it more convenient for users to use computer system.





ASSIGNMENT 1
DUE DATE : 15/3/2015
In Group with 4-5 members.

1. [CHAPTER 1] The issue of resource utilization shows up in different forms in different
types of operating systems. List what resources must be managed
carefully in the following settings:

a. Workstations connected to servers
b. Handheld computers (Smart phone)


2.[CHAPTER 1]Briefly  define Timesharing System and Single-User Workstation (PC).
Under what circumstances would a user be better off using a timesharing
system rather than single-user workstation?

3. [CHAPTER 1]Describe the differences between symmetric and asymmetric multiprocessing.
What are three advantages and one disadvantage of multiprocessor
systems?

4. [CHAPTER 2]Describe three general methods for passing parameters to the operating
system.

5. [CHAPTER 2]What is the relationship between a guest operating system and a host
operating system in a system like VMware? What factors need to be
considered in choosing the host operating system?

2/23/2015

DCT1093 OOP: Class and Object

Rewrite the following java program using OOP approaches.
import java.util.Scanner;

public class demooop {
   
    public static void main(String[] args) {
   
    Scanner input = new Scanner(System.in);
    System.out.println("Sila masukkann tinggi dan lebar segitiga: ");
   
    int tinggi= input.nextInt();
    int lebar= input.nextInt();
    double luas = 0.5 *(tinggi*lebar);
    double ukurlilit = Math.sqrt((tinggi*tinggi) +(lebar*lebar));
        System.out.println("tinggi: "+tinggi);
        System.out.println("lebar: "+lebar);
        System.out.println("luas: "+luas);
        System.out.println("ukurlilit: "+ukurlilit);

   
   
    }
}


identify suitable object, data and method.

DCT1093 OOP: Object

Consider the following java program:-


PROGRAM  NO 1------------------------------------------------------------------------------------------------
import java.util.Scanner;
public class calculateAreadanPerimeterofBox {
  
    public static void main(String[] args) {
        Scanner input= new Scanner(System.in);
        System.out.println("Sila Masukkan nilai tinggi dan lebar segiempat!");
        int tinggi = input.nextInt();
        int lebar =input.nextInt();
      
        int luasSegiempat=tinggi*lebar;
        int perimeterSegiEmpat = 2*(tinggi+lebar);
      
        System.out.println("Luas Segi Empat=" +luasSegiempat );
        System.out.println("Perimeter Segi Empat=" +perimeterSegiEmpat );

    }
}

PROGRAM  NO 1 --------------------------------------------------------------------------------------------------
import java.util.Scanner;
 class segi4{
 int tinggi;
   int lebar;
  
   void getInput(){
           Scanner input= new Scanner(System.in);
           System.out.println("Sila Masukkan nilai tinggi dan lebar segiempat!");
           tinggi = input.nextInt();
           lebar =input.nextInt();
   }
  
   int kiraLuasSegiempat(){
           return tinggi* lebar;
   }
  
   int kiraPerimeterSegiempat(){
        return 2*(tinggi+ lebar);
   }
  
   void printOutput(){
        System.out.println("Luas Segi Empat=" +kiraLuasSegiempat() );
        System.out.println("Perimeter Segi Empat=" +kiraPerimeterSegiempat() );
   }
 }
public class calculateAreadanPerimeterofBox2 {
  
    public static void main(String[] args) {
       
        segi4 segiEmpat1 = new segi4();
        segiEmpat1.getInput();
        segiEmpat1.printOutput();
    }
}

2/22/2015

BCS2233 OOP: Assignment 1

Assignment 111

You are required to provide:-
(i)           Algorithm (Flowchart or Pseudo code) and
(ii)        Java program for each of the following problems.

1. 1 1.(Converting feet into meters) Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305 meters.

1. 2 2.(Finding the largest) Write a program that input two integers and find the largest.

1. 3 3.SATU Terengganu charges the following rates for its customer:-
Penggunaan
Caj
Minima (RM)
Kuantiti M3
(Meter Padu)
Caj
Setiap M3
0 - 20.00
RM0.42
RM4.00 sebulan
20.1 - 40.00
RM0.65
40.1 - 60.00
RM0.90
60.1 ke atas
RM1.00

Input the amount of water used and calculate the net amount for a customer.


Due date :  9/3/2015 (2 Weeks)

2/12/2015

DCT1093 OOP: 'Groups' untuk Tugasan 2

Berikut adalah kumpulan yang telah di bentuk oleh pelajar. Kumpulan berkenaan telah di nomborkan ialah 'Group1, Group2,Group3, Group4,Group5, Group6,Group7 dan Group8'.

  • Setiap 'Group' perlu menjawab 2 soalan sahaja iaitu 1 daripada Section A dan 1 daripada Section B.
  • Nama pertama secara 'automatik' di lantik sebagai ketua 'Group'


    • 'Group' 1 akan menjawab soalan 1 daripada Section A dan soalan 1 daripada Section B.
    • 'Group' 2 akan menjawab soalan 2 daripada Section A dan soalan 2 daripada Section B dan begitulah seterusnya.
    • Sila rujuk soalan anda di sini.
    • Tarikh hantar adalah pada 26/2/2015
    • Temuduga untuk setiap kumpulan akan di buat pada minggu berikutnya. Pastikan setiap ahli kumpulan benar-benar memahami jawapan yang di hantar.

    • Moga di permudahkan urusan pelajar semua



    BCS2233 OOP: Markah Quiz 1


    Berikut adalah markah quiz 1 yang di adakan pada 12/2/2015 Khamis.

    No. Matric No. Course quiz 1 12/2/15 (16M)
    1  13B07002  BCNS 16
    2  13B07003  BCNS 16
    3  13B07004  BCNS 16
    4  13B07006  BCNS 16
    5  13B07008  BCNS 16
    6  13B07010  BCNS 14
    7  13B07011  BCNS 14

    2/09/2015

    DCT1093 OOP : Assignment 2

        Tugasan 2 adalah dalam bentuk kumpulan.
        1 kumpulan boleh terdiri daripada 4 atau 5 orang.
        Sila beri nama kumpulan pada 12/2/2015.
        Setiap kumpulan perlu menjawab 2 soalan sahaja. Satu soalan dari Section A dan satu soalan dari Section B. Penentuan soalan akan ditentukan oleh pensyarah.

    SECTION A - LOOPING


    1. (Conversion from kilograms to pounds) Write a program that displays the following table (note that 1 kilogram is 2.2 pounds):

    Kilograms Pounds

    1         2.2

    3         6.6

    ...

    197       433.4

    199       437.8


       

    2.(Conversion from miles to kilometers) Write a program that displays the following table (note that 1 mile is 1.609 kilometers):

    Miles    Kilometers

    1        1.609

    2        3.218

    ...

    9        14.481

    10       16.09


       

    3. (Finding the highest score) Write a program that prompts the user to enter the number of students and each student's score, and finally displays the highest score.


     
    4. (Finding the highest score) Write a program that input 15 students name and score and finally displays the student with the highest score.


     
    5. (Summing a series) Write a program to sum the following series:

    10+20+30+40+50……100

      

    6. (Counting positive and negative numbers) Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, Your program ends with the input 0.
    For example, if you entered 1, 2, -7 and 0  the output should be

    Positive numbers=2

    Negative numbers =1
       

    7.(Counting positive and negative numbers) Write a program that reads 20 number of integers, determines how many positive and negative values have been read


       

    8.(Counting odd and even of positive  numbers) Write a program that reads an unspecified number of integers, determines how many odd and even values have been read. Your program ends with the input is negative (any negative number). Display the average as a floating-point number.

    For example, if you entered 1, 2, 0 and -1  the output should be

    Odd numbers=1

    Even numbers =2

       

    9.(Finding numbers divisible by 5 and 6) Write a program that displays all the numbers from 100 to 1000, ten per line, that are divisible by 5 and 6.




    SECTION B – METHOD
    Write method headers for the following methods:

    1.    Computing a sales commission, given the sales amount and the commission rate.
    2.    Computing the discount, given the price and discount amount (percentage).
    3.    Printing the calendar for a month, given the month and year.
    4.    Computing a square root.
    5.    Computing an average of four integers.
    6.    Testing whether a number is even, and returning true if it is.
    7.    Printing a message a specified number of times.
    8.    Computing the monthly payment, given the loan amount, number of years, and annual interest rate.

    9.    Finding the corresponding uppercase letter, given a lowercase letter.

    2/08/2015

    BCS2233 OOP: LAB WEEK 3


    Programming Exercises


    2.1 (Converting Fahrenheit to Celsius) Write a program that reads a Fahrenheit degree in double from an input dialog box, then converts it to Celsius and displays the result in a message dialog box. The formula for the conversion is as follows:
    celsius = (5/9) * (fahrenheit - 32)

    Hint


      In Java, 5 / 9 is 0, so you need to write 5.0 / 9 in the program to obtain the correct result.



    2.2 (Computing the volume of a cylinder) Write a program that reads in the radius and length of a cylinder and computes its volume using the following formulas:

    area = radius * radius * p
    volume = area * length


    2.3 (Converting feet into meters) Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305 meters.

    2.4 (Converting pounds into kilograms) Write a program that converts pounds into kilograms. The program prompts the user to enter a number in pounds, converts it to kilograms, and displays the result. One pound is 0.454 kilograms.

    2.5* (Calculating tips) Write a program that reads the subtotal and the gratuity rate, and computes the gratuity and total. For example, if the user enters 10 for subtotal and 15% for gratuity rate, the program displays $1.5 as gratuity and $11.5 as total.

    2.6** (Summing the digits in an integer) Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer. For example, if an integer is 932, the sum of all its digits is 14.
    Hint


      Use the % operator to extract digits, and use the / operator to remove the extracted digit. For instance, 932 % 10 = 2 and 932 / 10 = 93

    2/07/2015

    BCS1333 OS: Chapter 1 Exercises

    PART A




    PART B


    1.2 The issue of resource utilization shows up in different forms in different
    types of operating systems. List what resources must be managed
    carefully in the following settings:
    a. Mainframe or minicomputer systems
    b. Workstations connected to servers
    c. Handheld computers

    1.3 Under what circumstances would a user be better off using a timesharing
    system rather than a PC or single-user workstation?

    1.5 Describe the differences between symmetric and asymmetric multiprocessing.
    What are three advantages and one disadvantage of multiprocessor
    systems?

    1.6 How do clustered systems differ from multiprocessor systems? What is
    required for two machines belonging to a cluster to cooperate to provide
    a highly available service?

    1.9 How are network computers different from traditional personal computers?
    Describe some usage scenarios in which it is advantageous to
    use network computers.

    1.10 What is the purpose of interrupts? What are the differences between a
    trap and an interrupt? Can traps be generated intentionally by a user
    program? If so, for what purpose?

    1.11 Direct memory access is used for high-speed I/O devices in order to
    avoid increasing the CPU´s execution load.
    a. How does the CPU interface with the device to coordinate the
    transfer?
    b. How does the CPU know when the memory operations are complete?
    c. The CPU is allowed to execute other programs while the DMA
    controller is transferring data. Does this process interfere with
    the execution of the user programs? If so, describe what forms of
    interference are caused.

    1.13 Give two reasons why caches are useful.What problems do they solve?
    What problems do they cause? If a cache can be made as large as the
    device for which it is caching (for instance, a cache as large as a disk),
    why not make it that large and eliminate the device?


    2/05/2015

    DCT1093 OOP: QUIZ 1 dan Quiz 2 (DCNT)


    No. Matric No quiz 1  (15) 18/12/14 QUIZ 2 (10) 5/2/14
    1  14A01029    
    2  14A05001 12  
    3  14A05002 11 3
    4  14A05003 14 L
    5  14A05007   L
    6  14A05012 12 10
    7  14A05013    
    8  14A05014   L
    9  14A05015 14 L
    10  14A05016 14 9
    11  14A05018 13 3
    12  14A05019 12 L
    13  14A05022 12 L
    14  14A05023 12 L
    15  14A05024 13 L
    16  14A05026 12 L
    17  14A05029 14 L
    18  14A05030 11 3
    19  14A05033 13 L
    20  14A05036 12 L
    21  14A05041   L
    22  14A05042    
    23  14A05045 13 9
    24  14A05046 14 3
    25  14A05047 13 L
    26  14A05048 12 L
    27  14A05051    
    28  14A05054 11 L
    29  14A05055 13 L
    30  14A05059 12 L
    31  14A05061 12 L
    32  14A05062 11 L
    33  14A05063 11 L
    34  14A05067 12 L
    35  14A05068 12 10
    36  14A05069    
    37  14A05070 11 L
    38  14A05071 11 L
    39  14A05072 14 L
    40  14A05074    
    41  14A05076 12 L
    42  14A08016    
    43  14A09068 10 L
    44  14A12008 12 3
    L= Hantar Lambat

    2/04/2015

    DCT1093 OOP: Keputusan Test 1

    No. Matric No TEST 1 (100) GRADE
    1  14A01029 0.0 E
    2  14A05001 58.9 B
    3  14A05002 E
    4  14A05003 51.8 B-
    5  14A05007 48.2 C+
    6  14A05012 90.2 A
    7  14A05013 0.0 E
    8  14A05014 55.4 B-
    9  14A05015 44.6 C
    10  14A05016 E
    11  14A05018 51.8 B-
    12  14A05019 48.2 C+
    13  14A05022 46.4 C+
    14  14A05023 32.1 D+
    15  14A05024 55.4 B-
    16  14A05026 83.9 A
    17  14A05029 60.7 B
    18  14A05030 71.4 A-
    19  14A05033 58.9 B
    20  14A05036 50.0 C+
    21  14A05041 48.2 C+
    22  14A05042 0.0 E
    23  14A05045 55.4 B-
    24  14A05046 55.4 B-
    25  14A05047 71.4 A-
    26  14A05048 51.8 B-
    27  14A05051 0.0 E
    28  14A05054 71.4 A-
    29  14A05055 51.8 B-
    30  14A05059 80.4 A
    31  14A05061 60.7 B
    32  14A05062 82.1 A
    33  14A05063 73.2 A-
    34  14A05067 51.8 B-
    35  14A05068 89.3 A
    36  14A05069 0.0 E
    37  14A05070 50.0 C+
    38  14A05071 37.5 C-
    39  14A05072 32.1 D+
    40  14A05074 0.0 E
    41  14A05076 60.7 B
    42  14A08016 0.0 E
    43  14A09068 85.7 A
    44  14A12008 64.3 B+


    Gred Jumlah
    A 6
    A- 4
    B+ 1
    B 5
    B- 9
    C+ 6
    C 1
    C- 1
    D+ 2
    D 0

    BCS2233 OOP Chapter 2 Exercise


    1. Match the following Statement / Name to its description. [8M]



    No
    Statements

    Description
            I.             
    x = 1;

    Increment
          II.             
    int x = 1;

    Addition
        III.             
    double radius;

    Declaring Variables
        IV.             
    final int SIZE = 3;

    Declaring and Initializing
          V.             
    +

    Assignment Statements
        VI.             
    *

    Remainder
      VII.             
    %

    Multiplication
    VIII.             
    ++

    Constants


    2. Show an evaluation tree for the following expressions: [6 marks]


                        I.            10 + 2 - 4


                      II.            3 + 3 * 3 % 2



                    III.            3 + 2 / 5 +2 * 4

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