[go: up one dir, main page]

0% found this document useful (0 votes)
11 views18 pages

Lesson 6 Coding

Uploaded by

himashibhagya418
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views18 pages

Lesson 6 Coding

Uploaded by

himashibhagya418
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Software Engineering

Implementation
Lesson 6
Learning Outcomes

Student should able to


• Describe coding concepts
• Identify good coding
practices
Implementation

Road map
(1)What is implementation ?
(2) Choosing the correct language
(3) Evolution of programming
languages

(4) Good coding practices


(1) What is Implementation ?

1. Transforms the design specification


to source code that can be
executed
computer.on a
2. This is the final stage of the series of
front end activities we have been
dealing with.

3. Coding is relatively straight forward


given
a design specification.
4. Coding is a minor activity compared to
the other phases of development.
5. A good design may be spoiled by
the bad choice of a language.
6. However a bad design cannot be
corrected through coding.

7. Choice of the language and the coding


style
are important issues to consider.
8. The programmer translates the design
into
source code of the chosen
programming language.
9. The language translator converts
the source code in to executable
code in several steps.
10. Certain design issues may not be
supported by the language in which
case the coder may choose to
violate design
11.Although design quality should not be
compromised because of a
language issue, design approach
may depend on the language choice.
(2) Choosing the correct language
Language characteristics
1. Technical characteristics (Supports the design to
be translated to an executable version)
2. Psychological characteristics (Supports the
coding process)
3. Engineering characteristics (Supports the
software development process)
(1) Technical characteristics
1. Type of the system
2. Modularity support (The extent to
which the language supports
information hiding and modularity)
3. Control structures (How the
language allows control flow to be
defined)
(2) Psychological
characteristics
1. Consistency (The language should
use consistent notation)
2. Readability (The language should
help to produce unambiguous and
clear source
code)
3. Expressiveness (How powerful
the language constructs are )
4. Separation of concerns (This is
promoted by structured programming)
(3) Engineering characteristics
1. Correspondence with the design
2. Availability and efficiency of compilers
3. Portability
4. Development support
5. Maintainability support
6. Application area
7. Expertise required
8. The adequacy of the computational
model
(3) Evolution of programming
languages
1. Machine Language.
2. Assemblers
3. Fortran, Cobol, Algol, Basic, and Pascal
4. Fourth generation languages (logic
languages like Prolog, object oriented
languages like C++, Java, domain specific
languages like MATLAB, Query languages
such as SQL)
Language Features

Language Features Strengths Weaknesses

C Procedural Close to hardware/OS Poor exception


Weak by type checking Fast and efficient handling support
Very low level applications can be Memory handling
Pointers built leads to unreliable
Widely used code
Flexible

C++ OO extension to C All those of C and As for C


Weak type checking OO concepts of
Flexible Polymorphism
Pointers Inheritance (single
and multiple)
Encapsulation
COBOL Procedural Suited for batch Language run time
Strong I/O handling transaction processing system required
Defined standard Old –many features
added later
Language Features

Language Features Strengths Weaknesses

FORTRAN Procedural Suited for scientific Old- many modern


Strong arithmetic support computing where languages provide
through libraries significant numerical most of the features
processing required

Java OO Platform independent Requires own


Better type checking than C Dynamic runtime environment
but still reasonably weak downloading of Controlled by a
Standard defined by the classes commercial
Sun Microsystems Good user interface organisationm
and network support
through libraries
Ideal for network
applications
Pascal Procedural Good teaching Not widely used in
Strong type checking language industry
Well structured
programming
Language Features
Language Features Strengths Weaknesses

Visual Basic Simple procedural Suited for small Performance


language applications and Complex data
Interpreted prototyping structures cannot be
Extensive Windows Some OO modelled
programming concepts
support
Prolog Logical language Suitable for Intelligent Numerical
systems operations
Visual C++ C++ programming Support for Windows Portability of code
environment for MS programming
Windows User inteface design
Some code generation
Language Features
Language Features Strengths Weakness
es
.NET NET is the Microsoft Web Good for developing integrated
services strategy to connect business solutions (distributed)
information, people, Agile development, quickly
systems, and devices build and security enhanced
through software solutions.

C# The first component New primitive types: Decimal,


oriented language in C/C++ SQL, ..
family No memory leaks and stray
Integrated documentation pointers
using XML Error handling
No header files Interoperability:
Can be embedded in web MS C# implementation talks
pages to XML, SOAP,COM and any
.NET language
(4) Good coding practices

1. Coding should be done with an aim


toward maintenance.
2. This could be done by adhering to
coding standards (standards allow the
design rationale to be reflected in the
code, and consistent code to be
produced)
3. Documentation (comments, pre &
post conditions, and references)
4. Understandable identifiers (here there
is a trade off between speed and
readability)
1. Indentation and organization (this should
be done to reflect the logical structure of
the program)
2. Explicit declarations
3. Use of characters, spaces and colors
effectively so as to promote
readability
4. Breaking complicated expressions to
simple ones (This not only enhances
readability but also increases the
chances of efficient compilation)
Question : Identify what languages are the
most appropriate in the following situations.
(1) Program to implement a pocket
calculator on a PC.
(2) Develop a web application for buying and
selling vehicles over the internet
(3) Develop a knowledge based system
for skin disease diagnosis
(4) Develop a prototype interface
(5) Develop the back end of an inventory
system
(6) Writing an operating system
utility

You might also like