software development techniques - topic 01
Post on 18-Dec-2014
1.355 Views
Preview:
DESCRIPTION
TRANSCRIPT
Topic 1 : Introduction to Module
Er. Pradip Kharbuja
What will you learn?
1. Software Development Concept
2. Pseudo code
3. Flowchart
4. Algorithm
5. Data Representation
6. Desk Checking
Compiled By: Er. Pradip Kharbuja
What will you learn? (Contd.)
7. Iteration
8. Selection
9. Functions
10.Array
11.Objects & Classes
12.Data Structures
13.Testing and Debugging
Compiled By: Er. Pradip Kharbuja
Terminologies
1. Input
2. Output
3. Pseudo Code
4. Flowchart
5. Algorithm
Compiled By: Er. Pradip Kharbuja
Terminologies
1. Input
The process of bringing information into a computer program
This may be from the user, or from another source such as a file
2. Output
Displaying or storing information outside the computer program
To the screen, or perhaps to another location or to store in file.
Compiled By: Er. Pradip Kharbuja
Terminologies
3. Algorithm
A method or logic or some calculations or step-by-step procedure to solve the given problem.
An algorithm is procedure consisting of a finite set of unambiguous rules (instructions) which specify a finite sequence of operations that provides the solution to a problem.
Compiled By: Er. Pradip Kharbuja
Terminologies
4. Pseudo Code
It’s not real programming code, but it helps to write the real code.
Pseudo code is a way to describe the algorithm in order to transform the algorithm into real source code.
We write it before we write computer code because it allows us to ensure that the logic is correct.
Compiled By: Er. Pradip Kharbuja
Terminologies
5. Flowchart
• A flowchart is a type of diagram that represents an algorithm or process.
• The diagrammatic representation illustrates a solution to a given
problem.
Compiled By: Er. Pradip Kharbuja
Symbols used in Flowchart
Compiled By: Er. Pradip Kharbuja
Terminologies
1. Assembler
2. Compiler
3. Interpreter
4. Compilation
5. Execution
6. High Level Language
7. Low Level Language
Compiled By: Er. Pradip Kharbuja
Write down the following words.
• Software Development Techniques
Compiled By: Er. Pradip Kharbuja
You wrote…. How?
Did I tell you to write with pen?
Did I tell you to write on copy?
Also did I tell to open your pen’s cap before you write?
But you did, because you are intelligent. But computer is stupid.
Compiled By: Er. Pradip Kharbuja
Computer Programming
• Computers are very stupid.
• All they know how to do is add.
• They don’t know how to deal with ambiguity.
• Pick up the thing and put it on the other thing.
• They are extremely obedient.
• And that’s not always a good thing.
• They can’t fill in the blanks.
• You need to tell them everything.
• This makes giving instructions to a computer very tricky.Compiled By: Er. Pradip Kharbuja
Computer Programming (Contd.)
• At its simplest, you can think of a computer program as a list of sequential instructions.
• Buying a copy :
Go out of the home
Go to the stationery shop
Ask for copy
Select copy
Pay for copy
Take copy home
Compiled By: Er. Pradip Kharbuja
Computer Programming (Contd.)
• Computers don’t understand English.
• They only know 1 and 0.
• We usually don’t speak 1 and 0.
• Although, people did once in order to program computers.
• It is known Machine Level Programming Language or Low Level Programming Language
Compiled By: Er. Pradip Kharbuja
Computer Programming (Contd.)
• To simplify the task of giving instructions to a computer, programming languages were created.
• We write things in a language that’s semi-understandable to us.
• The collection of instructions that are to be given to a computer are known as code.
• The rules that govern how a computer program must be put together are called its syntax.
Compiled By: Er. Pradip Kharbuja
Computer Programming (Contd.)
• So... what is a computer program?
• It’s the collection of instructions and information that work together to make the computer do something.
• Programs are made up of algorithms and data.
• An algorithm is a fixed set of operations that is performed (usually) on data.
• Data are the raw facts that the computer program holds.
Compiled By: Er. Pradip Kharbuja
The History of Software Development
• In the beginning, computer programs were written as 1s and 0s.
• This programming language was known as machine code or Machine Level Programming Language or Low Level Programming Language.
• Every different kind of computer had its own machine code.
• So, machine code were machine dependent.
Compiled By: Er. Pradip Kharbuja
The History of Software Development
• Machine code was difficult for humans to work with.
Too much to remember
Too hard to see mistakes
Too difficult to change programs once they had been written
Too low level for people to write well
Compiled By: Er. Pradip Kharbuja
The History of Software Development
• A new kind of programming language, called assembly language, was introduced to make writing machine code easier.
• It is also low level programming language.
• Assembly language used (almost) human readable words to represent collections of 1s and 0s.
• Machine code might need you to write 10110000 01100001
• Assembly language meant all you had to write was MOV AL, 61h
Compiled By: Er. Pradip Kharbuja
The History of Software Development
• The computer itself doesn't understand assembly language.
• It is needed to be converted into machine code.
• This was done through a process called assembling and done by Assembler.
• Every computer has its own version of assembler.
• If you learned how to write code on one computer, you needed to learn a new version of assembler to write code on another – Machine Dependent.
Compiled By: Er. Pradip Kharbuja
The History of Software Development
• Assembly language still wasn’t easy to write program code with.
• Disadvantages of Low level Programming Language
1. Very hard to read or learn.
2. Harder to modify and maintain.
3. Machine dependent or not portable across different devices.
Compiled By: Er. Pradip Kharbuja
The History of Software Development
High Level Programming Language
• easier to read, write, and maintain
• generally machine independent
• makes the process of developing a program simpler and more understandable
• Example : C, Ada, BASIC, COBOL, C++, FORTRAN, LISP, Pascal, Java, PHP, C#.NET
Compiled By: Er. Pradip Kharbuja
The History of Software Development
High Level Programming Language
• The most popular of these was a language called C. It’s still used even today.
• C code was human readable and worked (mostly) across lots of different computers.
• C => C++ => Java
Compiled By: Er. Pradip Kharbuja
Terminologies
• A compiler is a computer program that transforms source code written in a high level programming language into machine code.
• This process is called Compilation.
• You need to compile only once unless any source code is modified
• Once a program has been compiled, it is now ready to execute.
• Execution is the process of loading the program into the computer’s memory.
• This is also known as running a program.Compiled By: Er. Pradip Kharbuja
Assembling and Execution
• A. L. Program = Assembly Level Program
Compiled By: Er. Pradip Kharbuja
A. L. Program A. L. Program A. L. Program
Machine Code Machine Code Machine Code
System 1 System 2 System 3
Assembling
Execution
Compilation and Execution
Compiled By: Er. Pradip Kharbuja
Machine Code Machine Code Machine Code
System 1 System 2 System 3
Compilation
Execution
High Level Program Code
How to Write A Program
• First, decide what information you are going to need to store.
This is data representation
• Decide how you are going to get that information.
This is known as input
• Decide how you are going to manipulate that information.
This is your algorithm.
• Decide how you are going to display that information.
This is known as output.Compiled By: Er. Pradip Kharbuja
Task : Print Hello World
1. Problem Identifying
2. Requirement Analysis
3. Program Design
a. Pseudo Code
b. Flowchart
c. Source Code
4. Output
Compiled By: Er. Pradip Kharbuja
1. Problem Identifying
• Displaying “Hello World” Text
Compiled By: Er. Pradip Kharbuja
2. Requirement Analysis
Output
Hello World
Compiled By: Er. Pradip Kharbuja
3. Program Designa. Pseudo Code
• Start
• Output “Hello World”
• Stop
Compiled By: Er. Pradip Kharbuja
3. Program Design b. Flowchart
Stop
Start
Output
"Hello World"
Compiled By: Er. Pradip Kharbuja
3. Program Design c. Source Code
• - We will do it in programming language : Java / C / C++ / Visual Basic
Compiled By: Er. Pradip Kharbuja
4. Output
• - Output must be shown at 3 times
a. Negative Input
b. Normal Input
c. High Input
- Current Pseudo Code Output
a. Hello World
b. Hello World
c. Hello World
Compiled By: Er. Pradip Kharbuja
Task #1
Input your name and display.
• You must display text “Enter your name : ”
• You must display text “Your name is : ”
Compiled By: Er. Pradip Kharbuja
What you have to do?
1. Problem Identifying
2. Requirement Analysis
3. Program Design
a. Pseudo Code
b. Flowchart
c. Source Code
4. Output
Compiled By: Er. Pradip Kharbuja
Task #1
1. Problem Identifying
• Take user input with displaying text
• Display result with certain text
2. Requirement Analysis
Input Output
Enter your name : n1 Your name is : n1
Compiled By: Er. Pradip Kharbuja
Task #1
3. Program Design
a. Pseudo Code
Start
Output “Enter your name : “
Input n1
Output “Your name is : ”
Output n1
Stop
Compiled By: Er. Pradip Kharbuja
Task #1
3. Program Design
b. Flowchart
Stop
Start
Output
“Enter your name : "
Input n1
Output n1
Compiled By: Er. Pradip Kharbuja
Output
“Your name Is “
Task #1
4. Output
Output 1
• Enter your name : David
• Your name is : David
Output 2
• Enter your name : 124
• Your name is : 124
Output 3
• Enter your name :
• Your name is :Compiled By: Er. Pradip Kharbuja
Task #2
Now take 2 numbers and display them.• You must display text
Enter 1st number :
Enter 2nd number :
The 1st number :
The 2nd number :
Compiled By: Er. Pradip Kharbuja
Task #3
Take following inputs and display them:
1. First Name
2. Last Name
3. Address
4. Phone Number
5. Age
Compiled By: Er. Pradip Kharbuja
Task #4
Take 2 inputs from user and add them.
Compiled By: Er. Pradip Kharbuja
Task #4
1. Problem Identifying
• Take 2 user inputs
• Sum them
• Display the result
2. Requirement Analysis
Input Process Output
n1
n2
n3 = n1 + n2 n3
Compiled By: Er. Pradip Kharbuja
Task #4
3. Program Design
a. Pseudo Code
Start
Input n1
Input n2
n3 = n1 + n2
Output “The sum is : ” + n3
Stop
Compiled By: Er. Pradip Kharbuja
Task #4
3. Program Design
b. Flowchart
Stop
Start
Input n1
Output
“The sum is : “ + n3
Input n2
n3 = n1 + n2
Compiled By: Er. Pradip Kharbuja
Task #4
4. Output
Output 1 (with Negative Input)
-5
-20
The sum is -25
Output 2 (with Normal Input)
10
20
The sum is 30
Output 3 (with High Input)
3000
4000
The sum is 7000
Compiled By: Er. Pradip Kharbuja
Assignment #1
1. Program demonstrating sum, subtraction, multiplication, division
2. Averaging five ages
3. Find the area of rectangle
4. Find the area of circle
Assignment Deadline: 18th August, 2014 before 2:00 PM
Compiled By: Er. Pradip Kharbuja
End of Topic - 1
Compiled By: Er. Pradip Kharbuja
top related