10/03/2015

DCT1083 OOP: Assignment 3


1
Design a class named Fan to represent a fan. The class contains:
  1. Three constants named SLOW, MEDIUM, and FAST with values 1, 2, and 3 to denote the fan speed.
  2. An int data field named speed that specifies the speed of the fan (default SLOW).
  3. A boolean data field named on that specifies whether the fan is on (default false).
  4. A double data field named radius that specifies the radius of the fan (default 5).
  5. A string data field named color that specifies the color of the fan (default blue).
  6. A no-arg constructor that creates a default fan.
  7. The accessor and mutator methods for all four data fields.
  8. A method named toString() that returns a string description for the fan. If the fan is on, the method returns the fan speed, color, and radius in one combined string. If the fan is not on, the method returns fan color and radius along with the string "fan is off" in one combined string.
Draw the UML diagram for the class. Implement the class. Write a test program that creates two Fan objects. Assign maximum speed, radius 10, color yellow, and turn it on to the first object. Assign medium speed, radius 5, color blue, and turn it off to the second object. Display the objects by invoking their toString method.



2) Create a base class named Point consisting of x and y data members representing point coordinates. From this class, derive a class named Circle with another data member named radius. For this derived class, the x and y data members represent a circle’s centre coordinates. The member method of the Point class should consist of a constructor that set the value for x and y to 0, an area() method that return 0, and distance() method that returns the distance between two points, (x1,y1) and (x2,y2), where



Additionally, the derived class should has an overided method named area() that return’s a circle area

Area = 3.14 x radius2.

Draw UML diagram for the class Point and class Circle.

Due date :  15/10/2015


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   





8/19/2015

DCT1083 OOP: Assignment 2

A. You are required to provide:-

(i) Algorithm (Flowchart or  Pseudocode)  and
(ii) Java program for each of the following problems.


1.    Read 10 integers and find the total of positive number and negative number.

2.    Write a 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.


B. Write a method that computes the commission, using the following rate table . The header of the method is:

public static double computeCommission(double salesAmount)

Sales Amount                    Commission Rate
$0.01–$5,000                      8 percent
$5,000.01–$10,000            10 percent
$10,000.01 and above       12 percent

7/14/2015

DCT1093 OOP. Selamat Hari Raya. Maaf Zahir & Batin

/**
 * @(#)MaafRaya0_0.java
 */
 import java.util.Scanner;
public class MaafRaya0_0 {
  
    public static void main(String[] args) {
        String answer;
        boolean maaf=false;
        Scanner input = new Scanner(System.in);
        System.out.println("Selamat Menyambut Hari Raya");
        do {
            System.out.println("Mohon Maaf Zahir & batin : ya / tidak");
            answer = input.next();
            if (answer.equals("ya")){
                maaf=true;    }
        }while(maaf!=true);
       System.out.println("Terima Kasih kerana sudi maafkan kami, 0-0 ya. ");   
    }
}
 

6/23/2015

DCT1093 Object Oriented Programming

Pelajar Diploma Information Technology (DIT) akan mengambil subjek Object Oriented Programming (di sebut OOP).

Berikut adalah bahan-bahan pengajaran bagi subjek berkenaan:-

1) Perancangan Pengajaran

Sila klik di sini untuk ' Lesson Plan  '

 




2) Buku Rujukan 
Y. Daniel Liang, Introduction to Java™ Programming, Brief Version, 9 Edition. 2013. Pearson Education. Sila cari di perpustakaan TATIUC, pelajar boleh samada menggunakan edisi 9 atau edisi 8. 'Power point slide boleh di dapati dari link di sini.
Buku Rujukan (Edisi 8)





Buku Rujukan (Edisi 9)


4. Perisian
 
 Bagi membangunkan aplikasi java dalam pc masing-masing . Pelajar perlu melakukan 'installation' JDK (java development kit) dan mana-mana editor untuk java (seperti NetBeans, Eclipse, BlueJ ).


5. Contoh Penilaian
Quiz
Assignment
Test
Final Exam



5/15/2015

BCS2233 OOP: Solution for Assignment3 (Q2 and Q3)

Jawapan untuk Assignment 3.

Soalan 2 a) 

class time {
double secs, mins, hours;
time(){
secs=0; mins=0; hours=0;
}
public void showdata(){
System.out.Println(“Saat =” +secs);
System.out.Println(“Minit =” +mins);
System.out.Println(“Jam =” +hours);
}

Soalan 2 b)  

class rectangle {
double height,length;
date(){
height=0; length=0;
}
public void showdata(){
System.out.Println(“Tinggi =” +height);
System.out.Println(“Panjang =” + length);


Soalan 3

class point {
int x,y;

point(){
x=0;y=0;

double area(){
return 0;
}

double distance(int x1 ,int y1, int x2, int y2) {
return Math.sqrt((x2-x1)*(x2-x1)-(y2-y1)*(y2-y1));
}

}

class circle extends point {
int radius;

double area() {
return (3.14 * (radius* radius));
}

}
UML diagram  for the class Point and class Circle



5/07/2015

BCS 3822 Final Year Project 1

Pelajar tahun 2 BCSC akan mengambil BCS 3822 Final Year Project 1 pada semester depan (sem 1 15/16). Bagi melancarkan proses berkenaan- pelajar di minta untuk mencadangkan tajuk yang sesuai pada semester ini (sem 2 2014/2015).

Berikut adalah contoh tajuk-tajuk projek yang sedang di siapkan oleh pelajar BCSC dan BCBM.


1
Learning Numbers in Multiple Language
2
Phonetic Alphabet Application Android
3
Booking Ticket Football Online System
4
Car Rent Booking Online
5
Android Application of Navigation SP Bumi’s Bus Towards TATIUC Students
6
Android SP Bumi Bus Booking Ticket
7
e-Attendance (Android)
8
Asma Ul-Husna Mobile Zikir
9
Personal Water Meter Calculation Using Android Application
10
Doa-doa Harian (Android)
11
Mobile Application for Taxi Booking
12
The Basic of Iqra’ Learning for Beginner
13
Rosdi Farm Web System
14
My Calendar Tracker
15
Health Monitor
16
Broiler Farm Calculator for Android Application


17
Final Year Project Information System
18
e-Maintenance Hostel System
19
PMIT Fees Collection System
20
Workshop Inventory System
21
Laboratory Information System for FTKK
22

23
Research Information System
24
TATIUC Online Summon System
25
Online Ordering System at Wannur’s Restaurants
26
Management and Notification Event System for TATIUC Student
27
Chinta Hair Saloon Online System
28
eTajweed (Basic Knowledge of Reciting Al-Quran)
29
Interactive Application Software for Pre-School Using JAVA
30
e-Appointment System
31
Hotel Registration
32
TATIUC Shortest Route Guidance Using Dijkstra Algorithm
33
Online Transport Booking at TATIUC




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