Week 1 Flashcards

1
Q

Sebuah algorithm harus:

A
  1. Jelas, tepat, dan tidak ambigu
  2. memberikan solusi yang tepat pada semua cases
  3. Memiliki akhir dari eksekusi pada algoritma tersebut
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

6 Steps in modularisation?

A
  1. Define the problem
  2. Group the activities into modules
  3. Construct a hierarchy chart
  4. Establish the logic of the mainline of the algorithm, using pseudocode
  5. Develop the pseudocode for each successive module in the hierarchy chart
  6. Desk check the solution algorithm
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

7 Step dalam program development?

A
  1. Define the problem
  2. Outline the solution
  3. Develop the outline into an algorithm
  4. Test the algorithm for correctness
  5. Code the algorithm into a specific programming language
  6. Run the program on the computer
  7. Document and maintain the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The common characteristics of pseudocode?

A
–  Statements are written in simple English
–  Each instructions is written on a separate line
–  Keywords and indentation are used to signify particular control structures
–  Each set of instructions is written from top to bottom, with only one entry and one exit
–  Groups of statements may be formed into modules, and the module given a name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Six Basic Computer Operations

A
  1. A computer can receive information
  2. A computer can put out information
  3. A computer can perform arithmetic
  4. A computer can assign a value to a variable or memory location
  5. A computer can compare two variables and select one of two alternative actions
  6. A computer can repeat a group of actions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Six Basic Computer Operations

A
  1. A computer can receive information
  2. A computer can put out information
  3. A computer can perform arithmetic
  4. A computer can assign a value to a variable or memory location
  5. A computer can compare two variables and select one of two alternative actions
  6. A computer can repeat a group of actions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

6 langkah untuk desk checking solution algorithm?

A
  1. Choose simple input test cases that are valid. Two or three test
    cases are usually sufficient
  2. Establish what the expected result should be for each test case
  3. Make a table on a piece of paper of the relevant variable names within the algorithm
  4. Walk the first test case through the algorithm, line by line, keeping a step – by – step record of the contents of each variable in the table as the data passes through the logic
  5. Repeat the walk-through process using the other test data cases, until the algorithm has reached its logical end
  6. Check that the expected result established in step 2 matches the actual result developed in step 5
How well did you know this?
1
Not at all
2
3
4
5
Perfectly