Showing posts with label 14/15 SEM 2 DCT1093. Show all posts
Showing posts with label 14/15 SEM 2 DCT1093. Show all posts

3/18/2015

DCT1093 OOP: Markah Quiz1,2,3, Assignment1,2,3 dan Test (yg tertinggi) : UPDATED 26 MAC

Sebarang kesilapan pada markah ini sila maklumkan saya.














No. Matric No QUIZ 1  (15M) 18/12/14 QUIZ 2 (10M) 5/2/14 QUIZ 3 (5M) 12/3/15 QUIZ  (10%) Assgmt 1 (65M) Assgmt 2 (15M) Assgmt 2 (interview) Asgmt 3 (20) ASGMT (30%) TEST 1 (20%) CARRY MARKS (60%)
1  14A01029                    
2  14A05001 12   0 4.0 37 6 2 18 18.9 11.8 34.7
3  14A05002 11 3 5 6.3 61 13 2 20 28.8 9.4 44.5
4  14A05003 14 L 4 6.0 34 10 2 20 19.8 10.4 36.2
5  14A05007   L 5 1.7 61 15 0 20 28.8 9.6 40.1
6  14A05012 12 10 3 8.3 56 5 7 20 26.4 18.0 52.8
7  14A05013       0.0         0 0.0 0.0
8  14A05014   L   0.0 56 5     18.3 11.1 29.4
9  14A05015 14 L 4 6.0 34 10 2 20 19.8 9.8 35.6
10  14A05016 14 9 5 9.3 61 13 2 20 28.8 16.2 54.3
11  14A05018 13 3 0 5.3 37 6 2 18 18.9 10.4 34.6
12  14A05019 12 L 0 4.0 38 9 3 20 21 9.6 34.6
13  14A05022 12 L 4 5.3 54 14 1 20 26.7 9.3 41.3
14  14A05023 12 L 0 4.0 37 6 2 18 18.9 9.8 32.7
15  14A05024 13 L 4 5.7 51 14 1 20 25.8 11.1 42.5
16  14A05026 12 L 5 5.7 58 15 0 20 27.9 16.8 50.4
17  14A05029 14 L 4 6.0 34 10 2 20 19.8 12.1 37.9
18  14A05030 11 3 5 6.3 61 13 2 20 28.8 14.3 49.4
19  14A05033 13 L 4 5.7 34 10 2 20 19.8 11.8 37.3
20  14A05036 12 L 2 4.7 51 14 1 20 25.8 10.0 40.5
21  14A05041   L 2 0.7 38 9 3 20 21 9.6 31.3
22  14A05042       0.0         0 0.0 0.0
23  14A05045 13 9 5 9.0 61 13 2 20 28.8 11.1 48.9
24  14A05046 14 3 0 5.7 37 6 2 18 18.9 11.1 35.6
25  14A05047 13 L 4 5.7 38 9 3 20 21 14.3 41.0
26  14A05048 12 L 1 4.3 47 9 3 20 23.7 10.4 38.4
27  14A05051       0.0         0 0.0 0.0
28  14A05054 11 L 5 5.3 56 15 0 20 27.3 14.3 46.9
29  14A05055 13 L 2 5.0 39 5 2 20 19.8 10.4 35.2
30  14A05059 12 L 2 4.7 39 5 2 20 19.8 16.1 40.5
31  14A05061 12 L 2 4.7 39 5 2 20 19.8 12.1 36.6
32  14A05062 11 L 5 5.3 58 15 0 20 27.9 16.4 49.7
33  14A05063 11 L 2 4.3 39 5 2 20 19.8 14.6 38.8
34  14A05067 12 L 2 4.7 39 5 2 20 19.8 10.4 34.8
35  14A05068 12 10 3 8.3 59 5 7 20 27.3 17.9 53.5
36  14A05069       0.0         0 0.0 0.0
37  14A05070 11 L 2 4.3 40 9 3 20 21.6 10.6 36.6
38  14A05071 11 L 4 5.0 34 10 2 20 19.8 7.7 32.5
39  14A05072 14 L 3 5.7 56 14 1 20 27.3 6.8 39.8
40  14A05074       0.0         0 0.0 0.0
41  14A05076 12 L 0 4.0 37 6 2 18 18.9 12.1 35.0
42  14A08016       0.0         0 0.0 0.0
43  14A09068 10 L 3 4.3 56 5 7 20 26.4 17.1 47.9
44  14A12008 12 3 4 6.3 47 14 1 20 24.6 12.9 43.8

DCT1093 OOP: Solution for Test 1 (No 1 and No 2)

Please click the following links to download test 1 question and answer.Test 1 No. 1
Test 1 No. 2

3/09/2015

DCT1093 OOP: Asgmt 3.

Assignment 3

1. Write a java program to input a length and width of a right triangle and output it area and perimeter. Use object oriented programming techniques based on *following UML class diagram.

*will be discussed in class


2. Write a class for each of the following specifications. In each case, include a constructor that set each member values to 0, a method named inputdata() that will prompt user to enter all values for it member data  and a member method named showdata() that can be used to display member values.

i)     A class named time that has integer data members named secs, mins, and hours.                                                                                        
import java.util.Scanner;
class time{
int secs,mins,hours;


time(){
secs=mins=hours=0;
}
void input_data(){
System.out.println("Sila masukkan saat, minit dan jam");
Scanner input = new Scanner(System.in);
secs = input.nextInt();
mins = input.nextInt();
hours = input.nextInt();
}

void showdata(){
System.out.println("Saat="+secs);
System.out.println("Minit="+mins);
System.out.println("Jam ="+hours);
}
}

public class asgmt3qa {
   
    public static void main(String[] args) {
       
        time mytime = new time();
        mytime.showdata();
        mytime.input_data();
        mytime.showdata();
    }
}

ii)    A class named rectangle that has integer data members named height and length.                                        

3/04/2015

DCT1093 OOP: Markah Untuk 'Assignment 2'

Markah untuk 'Assignment 2' adalah seperti berikut:-


Markah Untuk Assignment 2

Posting Berkaitan

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



    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.

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