9/27/2014

FCT1033 Nested Loop Exercise


  1. nested loop is a loop within a loop, an inner loop within the body of an outer one. How this works is that the first pass of the outer loop triggers the inner loop, which executes to completion. Then the second pass of the outer loop triggers the inner loop again. This repeats until the outer loop finishes.
Show output of the following flowchart.
Flowchart 1
Flowchart 2


FCT1033 Iteration Exercise 28 Sept 14

Masalah yang boleh di selesaikan dengan pengaturcaraan komputer boleh di kelaskan kepada 3 bahagian:-
1. Sequence
2. Selection
3. Iteration.

Posting pada kali ini masih membincangkan jenis yang ke tiga iaitu Iteration.

Camkan (identify) 3 perkara di bawah terhadapt pseudocode dan flowchart yang di berikan:-

i) The initialization of the loop control
ii) The loop repetition condition.
iii) The update of the loop control.


Flowchart 1

Pseudocode 1

I. set counter to 1
II. print counter
III. increase counter by 1
IV. repeat steps 2,3 until counter equals to 10


Pseudocode 2

I. Get a value for n.
II. Give p the value 1.
III. While n is positive
3.1 Multiply p by n
3.2 Substract 1 from n
IV. Print p

9/22/2014

BCS3473 Object Oriented Analysis and Database Design. Review Question

Review Questions for Chapter 1, Chapter 2 and Chapter 3 
Object Oriented System Analysis and Design, Simon Bennet.
Selected Question: 1.1,1.2,,1.7,1.10,1.11

Selected Question: 2.1,2,2,2.4,2.7

Selected Question: 3.1,3.2,3.3,
--------------------------------------------------------
Please download course plan and  lecture slide

9/21/2014

BCS 2233 Lab Week 3

A. Write a java program based on the following algorithm ( pseudocode / Flowchart)

Algorithmn 1

1.PROMPT user to enter length and width
2.READ length and width
3. CALCULATE perimeter and area
       perimeter = 2 * (length + width)
       area = length * width
4. OUTPUT perimeter and area


Algorithmn 2
























FCT1033 Iteration Exercise

1. Show output of the following flowchart:-
Flowchart 1

Flowchart 2

Flowchart 3


2. Draw a flowchart for a program to print 10 to 20

3. Draw a flowchart for a program to print 20 down to 10

4. Show output of the following pseudocode:-

I. set counter to 1
II. print counter
III. increase counter by 1
IV. repeat steps 2,3 until counter equals to 10
pseudocode 1

I. count assigned zero
II.While count < 5
III. Display "I love computers!"
IV. Increment count
V. End while 
pseudocode 2

I.Display “ I love Computers!”
II.Repeat step 1 four times 
pseudocode 3

5. Write a pseudocode for a program to print 10 to 20

6. Write a pseudocodefor a program to print 20 down to 10


9/11/2014

FCT1033 Assignment 2

Design an algorithm (pseudocode or flowchart) for the following problems:-

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


CPA                                     Status
2.0 - 4.0                             Satisfactory
1.7 - 1.9                             Conditional
0.0 - 1.6                             Failed (Terminated)
                 
2. An electric supply company charges the following rates for its customers:-


No. of unit consumed                              Charges/unit (RM) 
1-200                                                         0.
218
201 -300                                                    0.334
301-600                                                     0.516
601-900                                                     0.546
>=901                                                        0.571

*http://www.tnb.com.my/tnb/residential/pricing-and-tariff/tariff-rates.html

Due Date 25/9/2014

9/10/2014

FCT1033 Lab 11 Sept 2014

 Copy, Compile and Run the following C++ program. What is the output when input are:-

1.00
1.20
1.30
1.35
1.39

#include cstdlib  <--pls check="" line="" span="" this="">

#include iostream <- span=""><--pls check="" line="" span="" this="">

using namespace std;

int main(int argc, char *argv[])
{
    int sen50, sen20, sen10, sen5, sen1;
    int intRM;
    double RM;
    cout<<"Sistem Penukaran Duit Syiling \n Sila masukkan jumlah wang anda:\n";
    cin>>RM;
    intRM=int(RM*100);               // tukar Ringgit kepada sen
   
    sen50=intRM/50;                  // dapatkan jumlah sen50
    intRM = intRM%50;                // dapatkan lebihan dari sen50
   
   
    sen20=intRM/20;                  // dapatkan jumlah sen20
    intRM = intRM%20;                // dapatkan lebihan dari sen20
   
   
    sen10=intRM/10;                  // dapatkan jumlah sen10
    intRM = intRM%10;                // dapatkan lebihan dari sen10
   
    sen5=intRM/5;                    // dapatkan jumlah sen5
    sen1 = intRM%5;                  // dapatkan lebihan dari sen5
   
    cout<<" Bilangan duit syiling yang anda perolehi adalah : ";
    cout<<" 50 Sen:"<
    cout<<" 20 Sen:"<
    cout<<" 10 Sen:"<
    cout<<" 5 Sen:"<
    cout<<" 1 Sen:"<
    system("PAUSE");
    return EXIT_SUCCESS;
}



Draw flowchart for the program above

BCS3473 Object Oriented Analysis and Database Design. Week 1 Activity. UML

1. What is UML?

2. What is the purpose of UML?

3. Who is using UML?

4. Who create UML?

*5. List and Explain different types of UML Diagram.

*6. List at least three(3) software mainly   used to design UML Diagram?





9/08/2014

BCS3473 Object Oriented Analysis and Database Design

Tajuk biasanya menggambarkan isi kandungannya. Memahami dan menghayati setiap perkataan yang ada dalam tajuk membolehkan kita mendapat gambaran awal keseluruhan cerita dan memandu pemahaman menjadi lebih mudah.

Mari bermula dengan bertanyakan Pak Cik Google " What is Object Oriented Analysis and Design "


(WIKI)
Object-oriented analysis and design (OOAD) is a popular technical approach to analyzing, designing an application, system, or business by applying the object-oriented paradigm and visual modeling throughout the development life cycles to foster better stakeholder communication and product quality.

 (BUSINESSDICTIONARY)
The use of modeling to define and analyze the requirements necessary for success of a system. Object-oriented analysis is a process that groups items that interact with one another, typically by class, data or behavior, to create a model that accurately represents the intended purpose of the system as a whole. Object-oriented analysis does not factor implementation limitations into the model.


 Soalan kedua juga untuk Pakcik Google " What is Object Oriented Database"


(SEARCHORACLE.TECHTARGET)
An object-oriented database management system (OODBMS), sometimes shortened to ODBMS for object database management system), is a database management system (DBMS) that supports the modelling and creation of data as objects.

(COMTECHDOC)
Object oriented databases are also called Object Database Management Systems (ODBMS). Object databases store objects rather than data such as integers, strings or real numbers. Objects are used in object oriented languages such as Smalltalk, C++, Java, and others. Objects basically consist of the following:
  • Attributes - Attributes are data which defines the characteristics of an object. This data may be simple such as integers, strings, and real numbers or it may be a reference to a complex object.
  • Methods - Methods define the behavior of an object and are what was formally called procedures or functions.

9/07/2014

BCS2233 Class/ Lab Activity Week 1 (7-11 sept 2014)

Pelajar di berikan bahan-bahan berikut:-


1. Slide Introduction to Java Programming, Y. Daniel Liang. Edisi 8
2. Video Introduction to Java Programming, Y. Daniel Liang. Edisi 8
3. JDK (java development kit)
4. Editor JCreator Professional (free version boleh di dapati dari web berikut http://www.jcreator.org/)
5. Editor Eclipse

The activities for the first lab are as follows.

1. Write a simple java program using basic text editor Notepad
2. Compile your program using javac command
3. Run compiled java program using java command

Repeat the above activities using advanced java editor such as JCreator and Eclipse. Follows instruction as given in VideoNotes.

Video Notes

Chapter 1 - Introduction to Computers, Programs, and Java
Chapter 1.1 - Your First Java Program
Chapter 1.2 - Compile and Run a Java Program (continued from 1.1)

FCT1033 Selectively

1.Write a program to input an integer. If an input is positive (0 and above) print “ Positive” otherwise print “Negative”.


2.Write a program to input an integer. If an input is even print “Even” otherwise print “Odd”.


3.Write a program to input an integer. State whether your input is Positive or Negative; Odd or Even.



4.Suppose you want to associate noise loudness measured in desibles with the effect of the noise. The Following table shows the relationship between noise levels and human perceptions of noise.


Loudness in Decibles (db)
Perception
50 or lower
Quite
51-70
intrusive
71-79
Annoying
91-110
Very Annoying
Above 110
Uncomfortable

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

Marks
Grade
Marks
Grade
80-100
A
35-39
C-
70-79
A-
30-34
D+
64-69
B+
25-29
D
58-63
B
0-24
E
52-57
B-


46-51
C+


40-45
C











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


CPA
Status
2.00<=CPA<=4.00
Satisfactory
1.70<=CPA<2 .00="" o:p="">

Conditional
CPA <1 .70="" o:p="">
Failed (Terminated)




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