1 of 5

Logic Development (Class 6)

Sheikh Thanbir Alam

2 of 5

KISS Principle

DRY Principle

K = Keep

I = It

S = Simple

S = Stupid

D = Don’t

R = Repeat

Y = Yourself

3 of 5

NASA’s coding commandments

  1. Maximum length of a function (60 Lines)
  2. Maximum length of a class (500 Lines)
  3. Variable name must be meaningful.
  4. Do not use dynamic memory allocation after initialization.
  5. The return value of non-void functions must be checked by each calling function, and the validity of parameters must be checked inside each function.

4 of 5

Practice Exam

Print Fibonacci numbers from 0 to 100

  1. Brainstorming with team mates.
  2. Create an Algorithm
  3. Write Pseudocode / Draft
  4. Write Code
  5. Code Review

Input:

0 & 100

Output:

0, 1, 1, 2, 3, 5, 8, …………. 89

5 of 5