Showing posts with label 13/14 SEM 1 DCT2112. Show all posts
Showing posts with label 13/14 SEM 1 DCT2112. Show all posts

8/27/2013

DCT2112 Programming Practical

.
Consider the following flowchart and answer the questions:
  1.         I.          Labels the selection part and looping part.
  2.       II.         What value can be used to terminate the looping?
  3.     III.         What  value can make each selections equal to T (TRUE)?
  4.     IV.         Write a java program for the flowchart and test it with various type of input (integer).
  5.       V.         Briefly explain your program.
  6.  VI.  Any improvement you would like to suggest for the given flowchart?






7/16/2013

DCT 2112 Programming Practical. Flowchart Exercise 17/7/13


An electric supply company charges the following rates for its customers:-

No. of unit consumed                              Charges/unit (RM)
1-200                                                           2.50
201 - 500                                                     3.50                                                  
over 501                                                       5.00

If the consumer pays his bill within 15 days from the bill date, 10% discount is given
. If he makes the payment after 15 days from the bill date, 5% surcharge is levied. Draw a flowchart to calculated the net amount of the bill for each consumer and print it.

the above flowchart not considered the calculation of discount and levied

7/15/2013

DCT 2112 Programming Practical. Flowchart Exercise

Write an algorithm  for a program that 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.)


*Flowchart di atas masih lagi belum memenuhi  kehendak soalan supaya cetak "average" bagi semua nilai yang di masukkan.

7/11/2013

DCT 2112 Programming Practical - LAB 10/7/13 (solution)

Solution for DCT 2112 Programming Practical - LAB 10/7/13


Question 1
Question 3
 


Question 4

Write a program that read length and width of a rectangle and output it perimeter and area


7/09/2013

DCT 2112 Programming Practical - LAB 10/7/13

Write an algorithm (Flowchart) for the following problems:-

1. Write program that calculates mileage reimbursement for a salesperson at a rate of RM 0.65 per kilometer. Your program should interact with the user in this manner :












7/08/2013

DCT 2112 Programming Practical

DCT 2112 Programming Practical ialah subjek yang akan mengasah kemahiran pelajar dalam pengaturcaraan. Berdasarkan suatu masalah - pelajar di kehendaki membina algorithma dan seterusnya menulis aturcara java. 


Dalam subjek ini - pelajar akan di minta membuat persembahan (presentation) terhadap algorithma dan aturcara yang telah di bina (secara berkumpulan). 

Pelajar di minta memberi perhatian yang lebih pada subjek  DCT 1093 Object Oriented Programming (oleh Puan Izzah Inani) kerana bahasa java akan di ajar di sana.

Bahan-bahan pengajaran adalah seperti berikut:-


2. Nota Kuliah (slide power point)
Sila guna bahan rujukan bagi subjek DCT 1093 Object Oriented Programming atau buku berikut :-
Y. Daniel Liang, Introduction to Java™ Programming, Brief Version, 8 Edition. 2011. Pearson Education. 
Chapter 1 Introduction to Computers, Programs, and Java (download)
Chapter 2 Elementary Programming (download)
Chapter 3 Selections (download)
Chapter 4 Loops (download)
Chapter 5 Methods (download)
Chapter 6 Arrays (download)

3. Perisian
Bagi menulis pseudocode - pelajar boleh menggunakan mana-mana word processing seperti microsoft, manakala untuk membina flowchart - microsoft visio adalah di cadangkan.

Bagi menulis aturcara java - pelajar boleh menggunakan dua software iaitu: 1) JDK (java development Kit)  2) Editor seperti jcreator atau Netbeans. Jcreator Version standard boleh di download dari link berikut, manakala untuk version professional boleh di dapati dari saya.

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