10/29/2012

BCS2233 OOP Exercise Loop

EXERCISE LOOPING

1.Draw the program flowchart for finding the sum of first 100 even numbers starting from 0.

2.Draw the program flowchart 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.

10/21/2012

BCS1233 AD LAB 22 OKT 2012

1.Read 10 integers and find the total of even number and odd number entered.

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


Solution for no 1

Masalah-Masalah Rutin 'FYP'

Pelajar Diploma TATiUC telah pun sampai kepada minggu 14 sem 1 2012/2013 pada hari ini. Suasana cemas pasti menyelubungi pelajar tahun akhir yang mengambil 'Final Year Project' - FYP. Minggu ini present projek!. 

Di sini saya tuliskan beberapa masalah-masalah rutin yang di alami oleh pelajar:-

1. Tidak Dapat Membezakan Skop dan Objektif. 
    Walaupun ada kaitan tapi keduanya mempunyai perbezaan. Pelajar boleh google atau buka buku System Analysis and Design, atau mana-mana buku Project Management. Masalah ini biasanya berlaku di awal semester ketika pemilihan tajuk atau peringkat 'proposal'

2. Gantt Chart untuk Supervisor semata-mata
    Pelajar membuat Gantt Chart semata-mata untuk di tunjukkan kepada supervisor dan merasakan tiada kene-mengena dengan aktiviti yang bakal di lakukan.

3. Database Design Salah
    " Saya masukan semua field dalam satu table supaya senang nak coding" - jawapan yang biasa saya dapat bila tanya " kenapa hanya buat 1 table". Hmm...susah nak komen tapi yang pastinya pelajar tak  nampak rasional  kenapa perlu buat banyak table. 

4. Memilih bahasa pengaturcaraan
   Pilihlah bahasa yang sesuai dengan projek dan pelajar mempunyai tempat untuk merujuk- samada kepada senior atau lain-lain. Connection kepada database dan boleh view data adalah langkah pertama untuk berjaya dalam aplikasi yang anda bangunkan.

5. Tak tau nak start tulis Program.
 Pembangunan sistem memerlukan beberapa tools. Minta tolong rakan-rakan atau supervisor untuk mengenalpasti SDK (System Development Kit), Platform, Software serta Programming Editor adalah amat-amat di sarankan. 

6. Jarang Berjumpa Supervisor
   Jika pelajar tidak berjumpa supervisor namun pada akhirnya dapat menyiaplan projek - ia adalah berita gembira untuk supervisor. Tapi banyak kes- pelajar 'hilang' di pertengan semester dan muncul 3 hari sebelum presentation dengan mengadu masalah. Sukar untuk di selesaikan, lebih-lebih lagi bila berkait dengan isu no 3 iaitu Database Design Salah.


 

10/17/2012

DCT1033 QUIZ 3 (Solution)

Quiz 3 -Jawapan Pelajar. Markah Penuh 10

DCT1033 TEST 2

TEST 2


4.  Write a program statement that will do the following to array B shown below:

int  B[15];
for(j=0;j<=14;j++)
{
B[j]=j;
 } 
        I.            Print all elements of array B.
      II.            Print all elements of array B in reverse order (14,13,12,11,10 ...0)
    III.            Replace the value of third elements with 100. 
    IV.            Copy the value of last elements into the first one.
      V.            Find the sum of the first five elements.
 
4. Write function declaration for the following function:

                   I.            Computing a sales commission, given the sales amount and the commission rate.
                II.            Printing the calendar for a year, given the year.
             III.            Computing a square root.
             IV.            Testing whether a number is odd, and returning true if it is.
                V.            Printing a message a specified number of times.

10/15/2012

BCS2233 OOP TEST 1 TRIAL

 latihan individu - tak perlu hantar
Chapter 1
1.1     Define hardware and software.
1.2     Define machine language, assembly language, and high-level programming language.
1.3     What is an operating system?
  
1.4     What is a comment? What is the syntax for a comment in Java? Is the comment ignored by the compiler?
   
1.5     Identify and fix the errors in the following code:

1 public class Welcome {
2   public void Main(String[] args) {
3     System.out.println('Welcome to Java!);
4   }
5 }

    
Chapter 2                                                                   

  2.1 Which of the following are invalid identifiers, why?



a)      one

b)      hello

c)       my Window

d)      JAVA

e)      1234

f)       hello,there

g)      acct122

h)      DecafeLattePlease



2.2   Write an "Evaluation Tree" for the  following expressions:



a)      3 + 5 / 7

b)      3 * 3 + 3 % 2

c)       3 + 2 / 5 + -2 * 4

d)      2 * (1 + -(3/4) / 2) * (2 - 6 % 3)



2.3 Write an algorithm (flowchart or pseudocode) for the following problem:-



(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)



Chapter 3



3.1 Suppose x = 3 and y = 2, show the output, if any, of the following code. What is the output if x = 3 and y = 4? What is the output if x = 2 and y = 2? Draw a flowchart of the following code:

if (x > 2) {
  if (y > 2) {
    int z = x + y;
    System.out.println("z is " + z);
  }
}
else
  System.out.println("x is " + x);

 

3.2 Write an algorithm (flowchart or pseudocode) for the following problem:-
 (Computing the perimeter of a triangle) Write a program that reads three edges for a triangle and computes the perimeter if the input is valid. Otherwise, display that the input is invalid. The input is valid if the sum of any two edges is greater than the third edge. 

10/10/2012

DCT1033 LAB IOMANIP and ARRAY

 1. Show output of the following programs:-



2.  Write a program statement that will do the following to array B shown below:
int  B[15];
for(j=0;j<=14;j++)
{
B[j]=j;
 } 

2.1 Print all elements of array B.
2.2 Print all elements of array B in reverse order (14,13,12,11,10 ...1)
2.3 Replace the value of third elements with 100. 
2.4 Copy the  value of last elements into the first one.
2.5 Find the sum of the first five elements.
2.6 Find the sum of element 10 to element 15
2.7 Read 15 integers from the user, store into array B and find the largest 


10/07/2012

BCS1233 AD Assignment 1

1. Define the following terms:-
1.1Algorithm
1.2Flow Chart
1.3Pseudocode

2. There are several types of flowchart, briefly explain each of them.
 
3,Give three benefits of flowchart.

4.What is the limitation of flowchart.

 5.Write an algorithm (Flowchart and Pseudocode) to input temperature in Fahrenheit and output the corresponding temperature in Centigrade. The formula for conversion is as follows.
C= 5/9 x (F - 32)

 
6. A student’s letter grade is calculated according to the following schedule:

Numerical grade
Letter grade
90-100
A
80-89
B
70-79
C
60-69
D
0-59
F

Write an algorithm (Flowchart and Pseudocode)  that accepts a student’s numerical grade, converts the numerical grade to an equivalent letter grade, and displays the letter grade.

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


8. SATU Terengganu charges the following rates for its customer:-


JADUAL PERKIRAAN KOD TARIF BEKALAN AIR
Enakmen PA. 51 Fasal 16 (UPEN.TR.5/115, DUN. TR. 15/25 SK.1)
MULAI 1 MAC 1997

Kod Jenis
Bacaan
Penggunaan Caj
Minima (RM)
Kuantiti M3
(Meter Padu)
Caj
Setiap M3
10 Rumahtangga 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


Draw a flowchart to calculated the net amount of the bill for each consumer and print it.

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