COMPUTER PROGRAMMING
INTRODUCTION TO COMPUTER PROGRAMMING
1) Introduction to Computer Programming.
2) Computer, Hierarchy of Computer, Compiler.
3) Interpreter, High level language, Features of C language.
Program
Software
Compiler
Interpreter
Modular programming/Structured Programming
Non structured programming
Need of Programming language
Difference between structured and object oriented programming
Advantages of object oriented programming
COMPUTER PROGRAMMING
INTRODUCTION TO COMPUTER PROGRAMMING
1) Introduction to Computer Programming.
2) Computer, Hierarchy of Computer, Compiler.
3) Interpreter, High level language, Features of C language.
Program
Software
Compiler
Interpreter
Modular programming/Structured Programming
Non structured programming
Need of Programming language
Difference between structured and object oriented programming
Advantages of object oriented programming
Introduction to C Programming
Content :
Introduction
-Types of programming language
-Machine Language
-Assembly Language
-High Level Language
Introduction to C programming
-Basic Structure of C Program
-Simple program in C programming
You can get more from our website:
www.programmingcampus.com
Today, coding is a hot topic as everyone wants to get involved with programming for the future. In this two part series, day one will uncover tools you can use to learn about programming and get started without having any coding experience. Learn the theories of code and basic frameworks. Day two will focus on outlining bigger frameworks from web to application; and which languages can accomplish which goals.
Going further, it is important to have a basic understanding of computer programming. Although you may not become a computer programmer, knowing the basics can help you work more efficiently with software and be able to troubleshoot issues when they arise.
I was thinking, it will be really great for me to my first upload in the series of better education on internet.
In this presentation I had been contain the contents about Programming language and its Process
What is a Computer Program?
A computer program is a set of instructions or statements to be carried out by the computer's CPU.
Evolution of Programming Language (1950s)
Categories of Programming Language
-> Machine Language
-> Assembly Language
-> High level Language
Overview of operators in C
System Development Life Cycle for Programming
*Thank You*
Low level, High level and Middle level programming languages
,Bug and Debugging ,difference between compiler and interpreter,instructions and program,source code and object code ,language translators
Introduction to C Programming
Content :
Introduction
-Types of programming language
-Machine Language
-Assembly Language
-High Level Language
Introduction to C programming
-Basic Structure of C Program
-Simple program in C programming
You can get more from our website:
www.programmingcampus.com
Today, coding is a hot topic as everyone wants to get involved with programming for the future. In this two part series, day one will uncover tools you can use to learn about programming and get started without having any coding experience. Learn the theories of code and basic frameworks. Day two will focus on outlining bigger frameworks from web to application; and which languages can accomplish which goals.
Going further, it is important to have a basic understanding of computer programming. Although you may not become a computer programmer, knowing the basics can help you work more efficiently with software and be able to troubleshoot issues when they arise.
I was thinking, it will be really great for me to my first upload in the series of better education on internet.
In this presentation I had been contain the contents about Programming language and its Process
What is a Computer Program?
A computer program is a set of instructions or statements to be carried out by the computer's CPU.
Evolution of Programming Language (1950s)
Categories of Programming Language
-> Machine Language
-> Assembly Language
-> High level Language
Overview of operators in C
System Development Life Cycle for Programming
*Thank You*
Low level, High level and Middle level programming languages
,Bug and Debugging ,difference between compiler and interpreter,instructions and program,source code and object code ,language translators
Language translators Of Programming in Computer scienceRaianaTabitha
Computer is just a dumb machine made up of different electronic components. It is like a box which cannot do anything by itself. It is the user who tells the computer “what it has to do?”
Why Programming?
If we need our computer to perform some task, we first have to teach the computer in detail “how it will accomplish ??
Why Programming? Programming is more about problem solving skills than writing the code itself.
•Programming teaches you how to understand, analyze and solve the problems. It enhances your analytical reasoning abilities and helps you cope with daily real life problems as well.
•Hence learning to program is important because it develops analytical and problem solving abilities.
Programming Language
12
•A programming language is an artificial language designed to communicate instructions to a computer.
Programming Language
A formal computer language that includes a controlled vocabulary and set of grammatical rules designed to instruct a computer how to perform specific tasks. Programming languages are used to create programs to control the behavior of a machine or to express algorithms. The description of a programming language is usually split into two components: syntax (form) and semantics (meaning).
•A programming language is a notation for writing
computer programming language, any of various languages for expressing a set of detailed instructions for a digital computer. Such instructions can be executed directly when they are in the computer manufacturer-specific numerical form known as machine language, after a simple substitution process when expressed in a corresponding assembly language, or after translation from some “higher-level” language. Although there are many computer languages, relatively few are widely used.
Language types
Machine and assembly languages
A machine language consists of the numeric codes for the operations that a particular computer can execute directly. The codes are strings of 0s and 1s, or binary digits (“bits”), which are frequently converted both from and to hexadecimal (base 16) for human viewing and modification. Machine language instructions typically use some bits to represent operations, such as addition, and some to represent operands, or perhaps the location of the next instruction. Machine language is difficult to read and write, since it does not resemble conventional mathematical notation or human language, and its codes vary from computer to computer.
Assembly language is one level above machine language. It uses short mnemonic codes for instructions and allows the programmer to introduce names for blocks of memory that hold data. One might thus write “add pay, total” instead of “0110101100101000” for an instruction that adds two numbers.
Algorithmic languages
Algorithmic languages are designed to express mathematical or symbolic computations. They can express algebraic operations in notation similar to mathematics and allows it.
DISCLAIMER: This Presentation is made for educational purposes only.
Introduction to Computer Programming, Computer Language, History of Computer Language, Hierarchy of High-Level Languages, Algorithm, Data Types and Arduino
C Programming Lecture 1 - Introduction to C.pptxMurali M
CENTURION UNIVERSITY OF TECHNOLOGY AND MANAGEMENT
ANDHRAPRADESH
SUBJECT NAME: (FULL NAME)
SUBJECT CODE: CUTM1046
MODULE NO:
S.No WRT
1 Explain in detail about intrinsic and extrinsic semiconductors with neat diagrams. 8
2 Explain about PN junction diode operation and draw V-I characteristics. 8
3 Derive PN junction diode current equation. 8
4 Explain about carrier concentration of fully injected light illumination on semiconductor bar and 8
5 What is hall effect ??, derive hall coefficient by drawing neat diagram and write the applications of it. 8
6 Explain about Zener diode and avalanche breakdown in detail. 8
7 Design all the logic gates using diodes and explain the operation with truth tables. 8
8 Draw half wave rectifier circuit, explain its operation and explain all the parameters of half wave rectifier. 8
9 Draw full wave rectifier circuit, explain its operation and explain all the parameters of full wave rectifier. 8
10 Draw energy band diagrams of PN junction diode and define diffusion length and life time of the carrier. 8
11 Explain about half wave rectifier 4
12 Explain about full wave rectifier 4
13 Explain PN junction characteristics 4
14 Explain about Light Emitting Diode 4
15 Explain Zener diode characteristics 4
16 i) Define ionic bond and covalent bond
ii) Explain intrinsic semiconductors 4
17 Explain about extrinsic semiconductor 4
18 Explain about hall effect in detail 4
19 Draw AND and OR logic gates using Diodes 4
20 Draw energy band diagram of PN junction diode. 4
This slides present a knowledge of computer, memory, programming languages etc. That is required before learning C programming language.
http://www.learnbywatch.com
Want to know how programming works? how it helps the human being with their everyday work? well you can easily find the answers to those questions that are in your minds. Programming, well it is a kind of software that can make games, applications, movies and a lot more. For a start, programming can help us students with our home works and such stuffs. and now, we can learn more about the different languages used in programming, program life cycle, rules and symbols used and its level. Let us discover how programming works!
1. What are the differences between a DBMS and RDBMS?
2. Explain the terms database and DBMS. Also, mention the different types of DBMS.
3. What are the advantages of DBMS?
4. Mention the different languages present in DBMS
5. What do you understand by query optimization?
6. Do we consider NULL values the same as that of blank space or zero?
7. What do you understand by aggregation and atomicity?
8. What are the different levels of abstraction in the DBMS?
9. What is an entity-relationship model?
10. What do you understand by the terms Entity, Entity Type, and Entity Set in DBMS?
11. What are relationships and mention different types of relationships in the DBMS
12. What is concurrency control?
13. What are the ACID properties in DBMS?
14. What is normalization and what are the different types of normalization?
15. What are the different types of keys in the database?
16. What do you understand by correlated subqueries in DBMS?
17. Explain Database partitioning and its importance.
18. What do you understand by functional dependency and transitive dependency in DBMS?
19. What is the difference between two and three-tier architectures?
20. Mention the differences between Unique Key and Primary Key
21. What is a checkpoint in DBMS and when does it occur?
22. Mention the differences between Trigger and Stored Procedures
23. What are the differences between Hash join, Merge join and Nested loops?
24. What do you understand by Proactive, Retroactive and Simultaneous Update?
25. What are indexes? Mention the differences between the clustered and non-clustered index
26. What do you understand by intension and extension?
27. What do you understand by cursor? Mention the different types of cursor A cursor is a database object which helps in manipulating data, row by row and represents a result set.
28. Explain the terms specialization and generalization
29. What do you understand by Data Independence?
30. What are the different integrity rules present in the DBMS?
31. What does Fill Factor concept mean with respect to indexes?
32. What is Index hunting and how does it help in improving query performance?
33. What are the differences between network and hierarchical database model?
34. Explain what is a deadlock and mention how it can be resolved?
35. What are the differences between an exclusive lock and a shared lock?
=>Concept of Governance
=>Risk and Control (GRC) as applicable to IT operational risk
=>Importance of documentation
=>DATA FLOW DIAGRAM for every application
=>Review of changes in the Data flow, reporting, etc.
=>Parameters for review
=>Importance of review on SLA compliance
=>Reporting to IT Strategy committee, Board etc.
Importance of Data - Where to find it, how to store, manipulate, and characterize it
Artificial Intelligence (AI)- Introduction to AI & ML Technologies/ Applications
Machine Learning (ML), Basic Machine Learning algorithms.
Applications of AI & ML in Marketing, Sales, Finance, Operations, Supply Chain
& Human Resources Data Governance
Legal and Ethical Issues
Robotic Process Automation (RPA)
Internet of Things (IoT)
Cloud Computing
What is Data ?
What is Information?
Data Models, Schema and Instances
Components of Database System
What is DBMS ?
Database Languages
Applications of DBMS
Introduction to Databases
Fundamentals of Data Modeling and Database Design
Database Normalization
Types of keys in database management system
Distributed Database
CASE (COMPUTER AIDED SOFTWARE ENGINEERING)
CASE and its Scope
CASE support in software life cycle documentation
project management
Internal Interface
Reverse Software Engineering
Architecture of CASE environment.
SOFTWARE RELIABILITY AND QUALITY ASSURANCE
Reliability issues
Reliability metrics
Reliability growth modeling
Software quality
ISO 9000 certification for software industry
SEI capability maturity model
comparison between ISO and SEI CMM
Software Testing
Different Types of Software Testing
Verification
Validation
Unit Testing
Beta Testing
Alpha Testing
Black Box Testing
White Box testing
Error
Bug
Software Design
Design principles
Problem partitioning
Abstraction
Top down and bottom up-design
Structured approach
Functional versus object oriented approach
Design specifications and verification
Monitoring and control
Cohesiveness
Coupling
Fourth generation techniques
Functional independence
Software Architecture
Transaction and Transform Mapping
SDLC
PDLC
Software Development Life Cycle
Program Development Life Cycle
Iterative model
Advantages of Iterative model
Disadvantages of Iterative model
When to use iterative model
Spiral Model
Advantages of Spiral model
Disadvantages of Spiral model
When to use Spiral model
Role of Management in Software Development
Software Lifecycle Models / Software Development Models
Types of Software development models
Waterfall Model
Features of Waterfall Model
Phase of Waterfall Model
Prototype Model
Advantages of Prototype Model
Disadvantages of Prototype model
V Model
Advantages of V-model
Disadvantages of V-model
When to use the V-model
Incremental Model
ITERATIVE AND INCREMENTAL DEVELOPMENT
INCREMENTAL MODEL LIFE CYCLE
When to use the Incremental model
Rapid Application Development RAD Model
phases in the rapid application development (RAD) model
Advantages of the RAD model
Disadvantages of RAD model
When to use RAD model
Agile Model
Advantages of Agile model
Disadvantages of Agile model
When to use Agile model
Introduction to software engineering
Software products
Why Software is Important?
Software costs
Features of Software?
Software Applications
Software—New Categories
Software Engineering
Importance of Software Engineering
Essential attributes / Characteristics of good software
Software Components
Software Process
Five Activities of a Generic Process framework
Relative Costs of Fixing Software Faults
Software Qualities
Software crisis
Software Development Stages/SDLC
What is Software Verification
Advantages of Software Verification
Advantages of Validation
Cloud Computing
Categories of Cloud Computing
SaaS
PaaS
IaaS
Threads of Cloud Computing
Insurance Challenges
Cloud Solutions
Security of the Insurance Industry
Cloud Solutions
Insurance Security in the Insurance Industry with respect to Indian market
Application Software
Applications Software
Software Types
Task-Oriented Productivity Software
Business Software
Application Software and Ethics
Computers and People
Software:
Systems and Application Software
Identify and briefly describe the functions of the two basic kinds of software
Outline the role of the operating system and identify the features of several popular operating systems
Discuss how application software can support personal, workgroup, and enterprise business objectives
Identify three basic approaches to developing application software and discuss the pros and cons of each
Outline the overall evolution and importance of programming languages and clearly differentiate among the generations of programming languages
Identify several key software issues and trends that have an impact on organizations and individuals
Programming Languages
A formal language for describing computation?
A “user interface” to a computer?
Syntax + semantics?
Compiler, or interpreter, or translator?
A tool to support a programming paradigm?
Number Codes and Registers
2’s complement numbers
Addition and subtraction
Binary coded decimal
Gray codes for binary numbers
ASCII characters
Moving towards hardware
Storing data
Processing data
More from Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU (20)
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
2. 2
Computer Programs
• Software refers to programs that make the
computer perform some task.
• A program is a set of instructions that tells
the computer what to do.
• When you have written a program, the
computer will behave exactly as you have
instructed it. It will do no more or no less
than what is contained in your specific
instructions.
3. 3
Writing Programs
• Learning to write programs requires two skills.
– You need to use specific terminology and punctuation
that can be understood by the machine; that is, you need
to learn a programming language.
– You need to develop a plan for solving a particular
problem. This planor algorithmis a sequence of steps
that, when followed, will lead to a solution of the
problem.
4. 4
Solving Problems
• Initially, you may think that learning a language is
the more difficult task because your problems will
have relatively easy solutions. Nothing could be
further from the truth!
• The single most important thing you can do as
a student of computer science is to develop the
skill to solve problems.
• Once you have this skill, you can learn to write
programs in several different languages.
5. 5
What Is a Computer Language?
• A microprocessor is designed to “understand” a
set of commands called an “instruction set”
• All instructions must be provided to the CPU in its
native language, called machine language.
• All data transmission, manipulation, storage, and
retrieval is done by the machine using electrical
pulses representing sequences of binary digits.
• If eight-digit binary codes are used, there are 256
numbered instructions from 00000000 to
11111111.
6. 6
Machine Language
• Instructions for adding two numbers would consist
of a sequence of these eight-digit codes from
00000000 to 11111111.
• Instructions written in this form are referred to as
machine language.
• It is the native language that the CPU “speaks”
and “understands”.
• It is possible to write an entire program in
machine language. However, this is very time
consuming and difficult to read and understand.
7. 7
Programming Languages
• Fortunately, special languages have been
developed that are more easily understood (than
machine language).
• These special languages are called programming
languages.
• These languages provide a way to write computer
programs that are understood by both computers
and people.
• Programming languages have their own
vocabulary and rules of usage.
• Some languages are very technical, while others
are similar to English.
8. 8
Assembly Language
• The programming language that is most like
machine language is assembly language.
• Assembly language uses letters and numbers to
represent machine language instructions.
• An assembler is a program that reads the codes the
programmer writes in assembly language and
“assembles” a machine language program based
on those codes.
• However, assembly language is still difficult to
read.
9. 9
Comparing Machine Language &
Assembly Language
• For example, the machine code for adding
two integers might be:
010000110011101000111101010000010010101101000010
• While the assembly language code might
be:
LOAD A
ADD B
STORE C
– This causes the number in A to be added to the number in B, and
the result is stored for later use in C.
10. 10
Low Level Languages
• Machine Language and Assembly Language are
both called low-level languages.
• In a low-level language, it is necessary for the
programmer to know the instruction set of the
CPU in order to program the computer.
• Each instruction in a low-level language
corresponds to one or only a few microprocessor
instructions.
11. 11
High Level Languages
• A high-level language is any programming
language that uses words and symbols to make it
relatively easy to read and write a computer
program.
• In a high-level language, instructions do not
necessarily correspond one-to-one with the
instruction set of the CPU.
• One command in a high-level language may
correspond to many microprocessor instructions.
12. 12
High Level Languages 2
• Many high-level languages have been
developed. These include:
• FORTRAN, COBOL, BASIC, Logo,
Pascal, C, C++, Java, and others.
• These languages simplify even further the
terminology and symbolism necessary for
directing the machine to perform various
manipulations of data.
13. 13
Advantages Of
High Level Languages
• High Level Languages:
– Reduce the number of instructions that must be written.
– Allow programs to be written in a shorter amount of
time than a low-level language would take.
– Reduce the number of errors that are made, because…
• The instructions are easier to read.
– Are more portable (the programs are easier to move
among computers with different microprocessors).
14. 14
Advantages Of
Low Level Languages
• Low Level Languages:
– Instructions can be written to enable the
computer to do anything that the hardware will
follow.
– Require less memory
– Run more quickly
15. 15
High Level Language Examples
• Consider the following programs that add two numbers
together:
BASIC
10 I = 3
20 J = 2
30 K = I + J
Pascal
program AddIt;
var
i, j, k : integer;
begin
i := 3;
j := 2;
k := i + j;
end.
C++
int main( )
{
int i, j, k;
i = 3;
j = 2;
k = i + j;
return 0;
}
LOGO
to add :I :J :K
MAKE “I :3
MAKE “J :2
MAKE “K :I + :J
end
16. 16
Interpreters and Compilers
• Programmers writing in a high-level language enter
the program’s instructions into a text editor.
• The files saved in this format are called text files.
• A program written in a high-level language is called
source code.
• The programs are translated into machine language
by interpreters or compilers.
• The resulting machine language code is known as
object code.
17. 17
Interpreters
• An interpreter is a program that translates the
source code of a high-level language into machine
language.
• Each instruction is interpreted from the
programming language as needed (line by line of
code).
• Every time the program is run, the interpreter must
translate each instruction again.
• In order to “run” the program, the interpreter must
be loaded into the computer’s memory.
18. 18
Compilers
• A compiler is another program that translates a
high-level language into machine language.
• A compiler makes the translation once so that the
source code don’t have to be translated each time
the program is run.
– The source code is translated into a file called an object
file.
– A program called a linker is used to create an
executable program.
– Most modern compilers let you compile and link in a
single operation, and have an “IDE” (Integrated
Development Environment) to enter text, debug,
compile, link, and run programs.
19. 19
Debug
• Bug: An error in coding or logic that causes a
program to malfunction or to produce incorrect
results.
• Debug: To detect, locate, and correct logical or
syntactical errors in a program.
• Folklore attributes the first use of the term “bug”
to a problem in one of the first electronic
computers that was traced to a moth caught
between the contacts of a relay in the machine.
http://www.microsoft.com/canada/home/terms/2.7.1.
1_B.asp
20. 20
Programming Languages:
First Generation
• Generation 1 – Late 1940s to Early 1950s:
Machine Languages
– Programmers entered programs and data
directly into RAM using 1s and 0s
– Several disadvantages existed:
• Coding was error prone, tedious, and slow
• Modifying programs was extremely difficult
• It was nearly impossible for a person to decipher
someone else’s program
• Programs were not portable
21. 21
Programming Languages:
Second Generation
• Generation 2 – Early 1950s to Present:
Assembly Languages
– Uses mnemonic symbols to represent
instructions and data
– Assembly language is:
• More programmer friendly than machine language
• Tedious to use and difficult to modify
• Since each type of computer has its own unique
assembly language, it is not portable
22. 22
Programming Languages:
Third Generation
• Generation 3 – Mid-1950s to Present:
High-Level Languages
– Designed to be human friendly – easy to read,
write, and understand
– Each instruction corresponds to many
instructions in machine language
– Translation to machine language occurs through
a program called a ‘compiler’
– Examples: FORTRAN, COBOL, BASIC, C,
Pascal, C++, and Java
23. 23
Basic Approaches of
Programming
• High-level programming languages utilize
two different approaches
– Procedural approach
• Examples: COBOL, FORTRAN, BASIC, C, C++,
and Pascal
– Object-oriented approach
• Examples: Smalltalk, C++, and Java
24. 24
What Is a Program?
• Program
– A list of instructions written in a special code,
or language.
– The program tells the computer which
operations to perform,
– and in what sequence to perform them.
– Garbage In, Garbage Out (G.I.G.O.)
– Get what you asked for, not necessarily what
you want.
25. 25
Why Programming?
• To Develop Problem Solving Skills
– It is very important to develop problem
solving skills. Programming is all about
solving problems.
– Requires creativity and careful thought.
– Analyze the problem and break it down into
manageable parts (modules, procedures,
functions)
• It’s also rewarding!
26. 26
Program Development
• Planning is a critical issue
– Don’t type in code “off the top of your head”
• Programming Takes Time
– Plan on writing several revisions
– Debugging your program
• Programming requires precision
– One misplaced semi-colon will stop the
program
27. 27
Exercise in Frustration
• Plan well (using paper and pencil)
• Start early
• Be patient
• Handle Frustration
• Work Hard
• Don’t let someone else do part of the program for
you.
• Understand the Concepts Yourself!
• Solve the problem yourself!
28. 28
Step 1
Good Programming Habits
• 1. Analysis
– Is the computer the appropriate tool for solving
this problem?
– Would the problem be better solved with
human interaction or paper and pencil?
– Sometimes human judgment is preferable.
29. 29
Step 2
Good Programming Habits
• 2. Specification of the Problem
– Formulate a clear and precise statement of what
is to be done (clear and unambiguous).
– Know what data are available
– Know what may be assumed
– Know what output is desired & the form it
should take
– Divide the problem into sub problems
– Doesn’t discuss “how to” solve the problem
yet.
30. 30
Step 3
Good Programming Habits
• 3. Develop an Algorithm
– Algorithm:
• a finite sequence of effective statements that when applied to
the problem, will solve it.
– Effective Statement:
• a clear unambiguous instruction that can be carried out.
– Algorithms should have:
• specific beginning and ending that is reached in a reasonable
amount of time (a finite amount of time).
– This is done before sitting down at the computer.
31. 31
Step 3.5
Good Programming Habits
• 3.5 Document the Program
– Programming Style
• Upper / Lower Case, Indenting, format
– Comments
– Descriptive Identifier Names
• Variables, Constants, Procedures, Functions
– Pre & Post Conditions
• For each Procedure and Function
– Output
32. 32
Step 4
Good Programming Habits
• 4. Code the Program
– After algorithms are correct
– Desk check your program
• Without the computer,
just paper and pencil
• 4.1 Type and Run the Program
– Look for errors
• Syntax Errors (semi colon missing, etc.)
• Logic Errors (divide by zero, etc.)
33. 33
Step 4.2
Good Programming Habits
• 4.2 Test the Results
– Does it produce the correct solution?
– Check results with paper and pencil.
– Does it work for all cases?
• Border, Edge, Extreme Cases
– Revise the program if not correct.
– The coding process is not completed until the
program has been tested thoroughly and works
properly (recheck the specifications).
34. 34
Step 5
Good Programming Habits
• 5. Interpretation
– The program may execute without any obvious
errors.
– It may not produce the results which solve the
problem.
• G.I.G.O Get what you ask for,
not what you want.
• Recheck your program with the original
specifications
35. 35
Top Down Design
• Subdivide the problem into major tasks
– Subdivide each major task into smaller tasks
• Keep subdividing until each task is easily solved.
• Each subdivision is called stepwise
refinement.
• Each task is called a module
• We can use a structure chart to show
relationships between modules.
36. 36
Top Down Design 2
Structure Chart
Sub task Sub task Sub task
Main Task
37. 37
Top Down Design 3
• Pseudocode
– is written in English with C++ like sentence
structure and indentations.
– Major Tasks are numbered with whole numbers
– Subtasks use decimal points for outline.
39. 39
Writing Programs
• Vocabulary
– reserved words
• have a predefined meaning that can’t be changed
– library identifiers
• words defined in standard libraries
– programmer supplied identifiers
• defined by the programmer following a well defined
set of rules
40. 40
Writing Programs 2
• Words are CaSe SeNsItIvE
– For constants use ALL CAPS (UPPERCASE)
– For reserved words and identifiers use
lowercase
• Syntax
– rules for construction of valid statements,
including
• order of words
• punctuation
41. 41
Writing Code
• Executable Statement
– basic unit of grammar
• library identifiers, programmer defined identifiers,
reserved words, numbers and/or characters
– A semicolon terminates a statement in many
programming languages
• Programs should be readable
noformat.cpp format.cpp
42. 42
The Use of Comments
• Comments should be included to help make
the program more clear to someone reading
the code other than the author.
• Use comments after the header to explain
the function of the program, & throughout
the program
43. 43
Test Programs
• Test programs are short programs written to
provide an answer to a specific question.
• You can try something out
• Practice the programming language
• Ask “what if” questions
• Experiment: try and see