Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

PENYERAHAN DAN PENILAIAN TUGASAN

ASSIGNMENT SUBMISSION AND ASSESSMENT


_________________________________________________________________________
CBOP3203
Object Oriented Programming
MAY 2017 SEMESTER
_________________________________________________________________________

ARAHAN KEPADA PELAJAR / INSTRUCTIONS TO STUDENTS

1. Tugasan ini mengandungi DUA (2) soalan sahaja yang disediakan dalam Bahasa Melayu dan
Bahasa Inggeris / This assignment contains only TWO (2) question that is set in both Malay and
English.

2. Jawab dalam Bahasa Melayu atau Bahasa Inggeris. / Answer in Malay or English.

3. Anda dikehendaki menyerahkan tugasan dalam format MsWord melainkan dinyatakan


sebaliknya. Anda tidak dibenarkan untuk menukar teks/frasa tugasan tersebut kepada format
grafik seperti .jpeg / .gif / print screen / dan lain-lain format berkaitan. /Learners are to submit
assignment only in MsWord format unless specified otherwise. Please refrain from converting
text/phrases into picture format such as .gif / .jpeg / print screen / etc.

4. Muat turunkan templat tugasan versi bahasa yang berkenaan daripada myINSPIRE untuk
penyediaan dan penyerahan tugasan anda. Tugasan anda hendaklah ditaip dengan
menggunakan saiz fon 12 Times New Roman dan langkau baris 1.5. / Download the language
version of the assignment template concerned from the myINSPIRE for preparation and
submission of your assignment. Your assignment should be typed using 12 point Times New
Roman font and 1.5 line spacing.

5. Anda dikehendaki menghantar tugasan SECARA ONLINE melalui myINSPIRE. Sila rujuk kepada
portal untuk arahan mengenai prosedur menghantar tugasan anda secara online. Anda
dinasihatkan menyimpan senaskah tugasan yang diserahkan untuk rujukan sendiri. / You must
submit your assignment ONLINE via the myINSPIRE. Refer to the portal for instructions on the
procedures to submit your assignment online. You are advised to keep a copy of your submitted
assignment for personal reference.

6. Anda hanya boleh menghantar tugasan SEKALI sahaja dalam BEBERAPA FAIL seperti mana
keperluan soalan (1 fail utama dan fail-fail sokongan/lampiran. / You can submit your
assignment ONCE only in a MULTIPLE FILE as per requirement of the assignment (1 main file and
attachment/supporting files).
7. Tugasan anda hendaklah diserahkan antara 10hb Julai 23hb Julai 2017. Serahan selepas 23hb
Julai 2017 TIDAK akan diterima. / Your assignment must be submitted between 10th July until
23th July 2017. Submission after 23th July 2017 will NOT be accepted.

8. Tugasan hendaklah disiapkan secara individu. Anda dilarang meniru tugasan orang lain. Anda
juga dilarang sama sekali memplagiat kerja orang lain sebagai kerja sendiri. /
Your assignment should be prepared individually. You should not copy another persons
assignment. You should also not plagiarise another persons work as your own.

9. Sila ambil maklum tentang PENALTI yang akan dikenakan ke atas penghantaran lewat tugasan
seperti yang tertera di pekeliling pejabat Pendaftar 6/2012 (Rujuk Registrars Announcement di
myVLE) / Please take note that PENALTY will be imposed on late submission of assignment as
specified in the Registrars Office circular 6/2012 (Refer to Registrars Announcement in myVLE)

10. Anda perlu memastikan RESIT yang dikeluarkan bagi penghantaran tugasan disimpan sebagai
bukti penghantaran. Kegagalan mengemukakan resit dalam sebarang isu yang timbul berkaitan
penghantaran tugasan akan mengakibatkan tugasan dianggap TIDAK dihantar / Please ensure
that you keep the RECEIPT issued upon submisson of your assignment as proof of submission.
Your assignment is considered as NOT submitted if you fail to produce the submission receipt in
any dispute arises concerning assignment submission.

PENILAIAN / EVALUATION
Tugasan ini menyumbang sehingga 50% daripada jumlah markah kursus berkenaan dan akan dinilai
berdasarkan kepada Rubrik yang dilampirkan. / This assignment accounts for 50% of the total
marks for the course and shall be assessed based on the Rubrics attached .

Anda akan diberikan maklum balas tentang tugasan ini sebelum Peperiksaan Akhir Semester
bermula. / You would be given feedback on the assignment before the Final Semester Examination
commences.

PLAGIARISME: POTONGAN MARKAH / PLAGIARISM: MARKS DEDUCTION

Amaran: Tugasan yang diserahkan, secara automatik, akan disemak untuk menentukan kadar
pertindihan. Jika plagiarisme dikesan, markah akan dipotong seperti berikut: / Warning: The
submitted assignment will automatically undergo a similarity check. If plagiarism is detected, marks
would be deducted as follows:

% Kumpulan Pertindihan % Potongan Markah (Marks


No.
(Similarities Group) Deduction)
1 0 30 0
120
2 30.01 50 5
122
3 50.01 70 10
124
4 70.01 100 100
126
Tugasan yang dikenal pasti mempunyai pertindihan tugasan bagi mana-mana kumpulan pertindihan
di atas tidak dibenarkan untuk rayuan. Bagi pelajar dalam kategori pertindihan tugasan kumpulan
70.01-100, akses online rayuan semakan semula tugasan bagi subjek berkaitan dilupuskan dari
pilihan rayuan. / Assignments found to have similarities under any of the categories above; will not
be entitled to apply for appeal. For learners who fall into the 70.01-100 similarities group, the access
for online appeal for assignment remarking of the subject will be disabled from the appeal options.
ASSIGNMENT QUESTION / SOALAN TUGASAN

Question 1

In Malaysia, single residents are subjected to the following income tax structure:
Chargeable Income (RM) Amount of Tax (RM)
Below 2,500 0%
2,500 5,000 1%
5,001 10,000 25 plus 3% of the next 5,000
10,001 20,000 175 plus 3% of the next 10,000
20,001 35,000 475 plus 7% of the next 15,000
35,001 50,000 1,525 plus 12% of the next 15,000
50,001 70,000 3,325 plus 19% of the next 20,000
70,001 100, 000 7,125 plus 24% of the next 30,000
Exceeding 100,000 14,325 plus 26% of the next amount

Write a Java program that asks the user to enter the amount of taxable income, then display the
the tax amount that need to be paid.

(20)
Di Malaysia, setiap penduduk adalah tertakluk kepada struktur cukai pendapatan berikut:
Pendapatan Bercukai (RM) Jumlah Cukai (RM)
Kurang daripada 2,500 0%
2,500 5,000 1%
5,001 10,000 25 tambah 3% bagi 5,000 berikutnya
10,001 20,000 175 tambah 3% bagi 10,000 berikutnya
20,001 35,000 475 tambah 7% bagi 15,000 berikutnya
35,001 50,000 1,525 tambah 12% bagi 15,000 berikutnya
50,001 70,000 3,325 tambah 19% bagi 20,000 berikutnya
70,001 100, 000 7,125 tambah 24% bagi 30,000 berikutnya
Melebihi 100,000 14,325 tambah 26% bagi jumlah berikutnya

Tulis aturcara Java yang meminta pengguna memasukkan jumlah pendapatan bercukai dan
kemudiannya memaparkan jumlah cukai perlu dibayar.

QUESTION 2
Consider the following program that creates an object of the Arithmetic class. The Arithmetic class
contains the appropriate methods to perform the arithmetic operations. Based on the program
below, develop the complete Arithmetic class using JAVA.

Pertimbangkan aturcara berikut yang mencipta objek bagi kelas Arithmetic. Kelas Arithmetic
mengandungi metod-metod yang bersesuaian bagi melakukan operasi aritmetik. Berdasarkan
aturcara berikut, bangunkan kelas Arithmetic yang lengkap menggunakan JAVA.
class TestArithmetic {

public static void main (String[] args){

Scanner console= new Scanner (System.in);

System.out.println("Enter first number");


int x1 = console.nextInt();
System.out.println("Enter second number");
int x2 = console.nextInt();
System.out.println("Enter third number");
int x3 = console.nextInt();

System.out.println("x1="+x1);
System.out.println("x2="+x2);
System.out.println("x3="+x3);

Arithmetic ar = new Arithmetic();

int answer1=ar.sum(x1,x2);
int answer2=ar.sum(x1,x2,x3);
int answer3=ar.substract(x1,x2);
double answer4=ar.divide(x1,x2);
int answer5=ar.modulas(x2,x3);
int answer6=ar.multiply(x2, x3);
int answer7= ar.largest(x1, x2, x3);
boolean evenNumber1= ar.isEvenNumber(x2);
boolean evenNumber2= ar.isEvenNumber(x3);

System.out.println("Sum of x1 and x2 is "+answer1);


System.out.println("Sum of x1, x2, x3 is "+answer2);
System.out.println("Subtraction of x1 and x2 is "+answer3);
System.out.println("Division of x1 and x2 is "+answer4);
System.out.println("Modulas division of x2 and x3 is "+answer5);
System.out.println("Multiplication of x2 and x3 is "+answer6);
System.out.println("Largest value among x1, x2 and x3 is "+answer7);
if (evenNumber1)
System.out.println("x2 is an even number");
else
System.out.println("x2 is an odd number");

if (evenNumber2)
System.out.println("x3 is an even number");
else
System.out.println("x3 is an odd number");

}
}
(30 marks/markah)

MUKA SURAT TAMAT / END OF PAGE


ATTACHMENT
ASSIGNMENT RUBRICS
CDOP3203 JAVA PROGRAMMING / MAY 2017

QUESTION 1

Low Fair Above average Excellent


Max
Criteria Weightage 0 1 2 3 4
Marks
Program Completion No Implemented only a small Moderate implementation Most of the task was The task was implemented
for Task: implementation chunk of this task of the task correctly implemented correctly successfully
Get the of the tasks
input
Perform the Tiada Hanya sebahagian kecil Perlaksanaan arahan yang Kebanyakan arahan Arahan dilaksanakan
calculation perlaksanaan arahan dilaksanakan sederhana s ecara betul dilaksanakan dengan betul dengan cemerlang
Display the arahan
output

Kesempurnaan
Aturcara BAGI Tugas: 2.0 8

Mendapatk
an input
Melaksanak
an
pengiraan
Memaparka
n output

Coding Standards 0.5 Wrong coding Codes were not well Codes were organised in Codes were organised Codes written were very 2
organised moderate manner properly well structured and
Piawaian Kod creatively organised
Pengekodan Kod tidak disusun dengan Kod disusun dengan cara Kod disusun dengan baik Kod ditulis dengan sangat
yang salah sempurna sederhana berstruktur dan disusun
dengan kreatif

Runtime The program The program was not The program was The program was The program was
Masa Larian could not be executed due to errors executed but mostly executed mostly with executed with all the
executed at all OR the program was with incorrect output the correct output correct output
executed with the OR the program was AND the program was
correct output but the executed with the executed by fulfilling all
written coding did not correct output but the the requirements as
fulfil all the questions written coding did not stated in the question
requirements fulfil few of the
questions requirements

1.0 Aturcara tidak Aturcara ini tidak Aturcara ini dilaksanakan Aturcara ini dilaksanakan Aturcara ini 4
dapat dilaksanakan disebabkan tetapi kebanyakan dengan kebanyakan output dilaksanakan dengan
dilaksanakan ralat output adalah salah yang betul semua output yang
langsung ATAU aturcara ini betul
dilaksanakan dengan ATAU aturcara ini DAN aturcara ini
output yang betul tetapi dilaksanakan dengan dilaksanakan dengan
kod ditulis tidak output yang betul tetapi memenuhi semua
memenuhi keperluan kodnya ditulis tanpa keperluan yang
soalan memenuhi beberapa dinyatakan dalam
keperluan soalan soalan

Efficiency Wrong solution A difficult and inefficient A logical solution that is Solution is efficient and Solution is efficient,
solution easy to follow but it is not easy to follow understandable and easy
Efisiensi the most efficient to maintain

1.0 Penyelesaian Penyelesaian yang sukar Penyelesaian logikal yang Penyelesaian adalah Penyelesaian adalah 4
yang salah dan tidak berkesan senang diikuti tetapi ianya berkesan dan senang diikuti berkesan, boleh difahami
bukanlah penyelesaian dan senang diselenggara
paling berkesan

Requirement of 0.5 No Incomplete documentation Brief documentation with Good documentation Excellent documentation 2
Documentation documentation & without source code file source code file together with source code and complete with source
(Source Code files & & source code file code file
Document file. file
Document file has
copy of codes, Tiada Dokumentasi yang tidak Dokumentasi yang ringkas Dokumentasi yang Dokumentasi yang
screenshots of the dokumentasi lengkap dan tanpa fail kod bersama dengan fail kod memuaskan bersama cemerlang dan lengkap
program output and dan fail kod sumber sumber dengan fail kod sumber dengan fail kod sumber
program comments) sumber

Keperluan
Dokumentasi
(fail sumber & fail
dokumen. Fail
dokumen
mengandungi salinan
kod, imbasan skrin
output aturcara dan
komen aturcara)
Total 5 20
QUESTION 2

Low Fair Above average Excellent


Max
Criteria Weightage 0 1 2 3 4
Marks
Development of the No Implemented only a small Moderate implementation Most of the task was The task was implemented
class Arithmetic: implementation chunk of this task of the task correctly implemented correctly successfully
Implementation of of the tasks
sum(x1,x2),
sum(x1,x2,x3), Tiada Hanya sebahagian kecil Perlaksanaan arahan yang Kebanyakan arahan Arahan dilaksanakan
substract(x1,x2), perlaksanaan arahan dilaksanakan sederhana s ecara betul dilaksanakan dengan betul dengan cemerlang
divide(x1,x2) arahan
methods

1.5 6
Pembangunan kelas
Arithmetic:
Implementasi metod
sum(x1,x2),
sum(x1,x2,x3),
substract(x1,x2),
divide(x1,x2)

Development of the 1.5 No Implemented only a small Moderate implementation Most of the task was The task was implemented 6
class Arithmetic: implementation chunk of this task of the task correctly implemented correctly successfully
Implementation of of the tasks
modulas(x2,x3),
multiply(x2, x3), Tiada Hanya sebahagian kecil Perlaksanaan arahan yang Kebanyakan arahan Arahan dilaksanakan
largest(x1, x2, x3) perlaksanaan arahan dilaksanakan sederhana s ecara betul dilaksanakan dengan betul dengan cemerlang
methods arahan

Pembangunan kelas
Arithmetic:
Implementasi metod
modulas(x2,x3),
multiply(x2, x3),
largest(x1, x2, x3)
Development of the No Implemented only a small Moderate implementation Most of the task was The task was implemented
class Arithmetic: implementation chunk of this task of the task correctly implemented correctly successfully
Implementation of of the tasks
isEvenNumber(x2)
method Tiada Hanya sebahagian kecil Perlaksanaan arahan yang Kebanyakan arahan Arahan dilaksanakan
perlaksanaan arahan dilaksanakan sederhana s ecara betul dilaksanakan dengan betul dengan cemerlang
1.0 arahan 4
Pembangunan kelas
Arithmetic:
Implementasi metod
isEvenNumber(x2)

Coding Standards Wrong coding Codes were not well Codes were organised in Codes were organised Codes written were very
organised moderate manner properly well structured and
Piawaian Kod creatively organised

1.0 4
Pengekodan Kod tidak disusun dengan Kod disusun dengan cara Kod disusun dengan baik Kod ditulis dengan sangat
yang salah sempurna sederhana berstruktur dan disusun
dengan kreatif

Runtime 1.5 The program The program was not The program was The program was The program was 6
Masa Larian could not be executed due to errors executed but mostly executed mostly with executed with all the
executed at all OR the program was with incorrect output the correct output correct output
executed with the OR the program was AND the program was
correct output but the executed with the executed by fulfilling all
written coding did not correct output but the the requirements as
fulfil all the questions written coding did not stated in the question
requirements fulfil few of the
questions requirements

Aturcara tidak Aturcara ini tidak Aturcara ini dilaksanakan Aturcara ini dilaksanakan Aturcara ini
dapat dilaksanakan disebabkan tetapi kebanyakan dengan kebanyakan output dilaksanakan dengan
dilaksanakan ralat output adalah salah yang betul semua output yang
langsung ATAU aturcara ini betul
dilaksanakan dengan ATAU aturcara ini DAN aturcara ini
output yang betul tetapi dilaksanakan dengan dilaksanakan dengan
kod ditulis tidak output yang betul tetapi memenuhi semua
memenuhi keperluan kodnya ditulis tanpa keperluan yang
soalan memenuhi beberapa dinyatakan dalam
keperluan soalan soalan

Efficiency Wrong solution A difficult and inefficient A logical solution that is Solution is efficient and Solution is efficient,
solution easy to follow but it is not easy to follow understandable and easy
Efisiensi the most efficient to maintain

0.5 Penyelesaian Penyelesaian yang sukar Penyelesaian logikal yang Penyelesaian adalah Penyelesaian adalah 2
yang salah dan tidak berkesan senang diikuti tetapi ianya berkesan dan senang diikuti berkesan, boleh difahami
bukanlah penyelesaian dan senang diselenggara
paling berkesan

Requirement of No Incomplete documentation Brief documentation with Good documentation Excellent documentation
Documentation documentation & without source code file source code file together with source code and complete with source
(Source Code files & & source code file code file
Document file. file
Document file has
copy of codes, Tiada Dokumentasi yang tidak Dokumentasi yang ringkas Dokumentasi yang Dokumentasi yang
screenshots of the dokumentasi lengkap dan tanpa fail kod bersama dengan fail kod memuaskan bersama cemerlang dan lengkap
program output and dan fail kod sumber sumber dengan fail kod sumber dengan fail kod sumber
program comments) sumber
0.5 2
Keperluan
Dokumentasi
(fail sumber & fail
dokumen. Fail
dokumen
mengandungi salinan
kod, imbasan skrin
output aturcara dan
komen aturcara)
Total 7.5 30

You might also like