0% found this document useful (0 votes)
12 views

Unit7 Software Programming Bba

Uploaded by

Aleezah Anis
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Unit7 Software Programming Bba

Uploaded by

Aleezah Anis
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Software Programming

Unit# 7
BY: Qudsia Jamil
• Creating Computer Programs
• Hardware and Software Interaction
• How Program Solve Problems
• Programming Languages
• World Wide Web Development Languages
• Programming Processes
Creating Computer Programs

• Program: set f instructions given to computer to perform a specific task.


• some common extensions for program Files include the following:
• Executable Files:
– An executable (.cxe, .com) file is the part of a program that actually sends commands to the processor. In fact, when you run a program,
you are running the executable file. The processor executes the commands in the file—thus the name executable file. Executable files
usually (but do not always) have the filename extension .exc.
• Dynamic Link Library Files:
– A dynamic link library I.dll) file is a partial .exc file. A .dll file will not run on its own; instead, its commands arc accessed by another
running program. Bccausc .dll files can contain parts of an executable program, they provide programmers with an effective way of
breaking large programs into small, replaceable components. This feature makes the entire program easier to upgrade. In addition, .dll
files also can be shared by several programs at one rime.
• Initialization Files :
– An initialization (.ini) file contains configuration information, such as the size and starting point of a window, the color of the background,
the user's name, and so on. Initialization files help programs start running or contain information that programs can use as they run.
Although initialization files are still in use, many newer programs store user preferences and other program variables in the Windows
Registry—a spccial database that holds information about the computer's user, installed programs, and certain hardware devices.
• Help Files :
– A help (.hip. .chin) file contains information in an indexed and cross-linked format. By including a help file, programmers can provide the
user with online help information
• Batch Files.
– A batch (.bai) file automates common or repetitive tasks. A batch file is a simple program that consists of an unformatted text file
containing one or more operating system commands. If you type a batch file’s name at a command prompt, your operating system will
execute the com* mands in the file.
Hardware/Software Interaction’

• A program’s instructions execute at the hardware level,


mainly on the CPU. The program, for example, may tell
the CPU to retrieve a specific piece of information from
memory. If the program tells the CPU to play a sound
file, then the program generates an interrupt.
• An interrupt is a signal to the CPU to execute a series
of preprogrammed steps as a response to the
interrupt.
• In this case the hardware would send the sound file to
the audio output device.
code
• The term code refers to statements that are written in
any programming language, as in machine code or
higher-level code
• Compilers and Interpreters;
– A compiler converts all the source code into machine code,
creating an executable file. The output of the compiler is
called object code.
– An interpreter also converts source code to machine code.
Instead of creating an executable object code hie, however,
the interpreter translates and then executes each line of
the program, one line at a time.
Compiler, interpreter and linker
• Compiler:
 Transform source code into object code(binary code).
 Program written in HLL and compiler is used to execute program which
is specially designed for that specific language.
 Compiler fist scan program and identify errors and then translate it
into object code.
 Read whole program and translate it once and then execute.
• Interpreter:
 Read one line of code in HLL and translate it and after that run object
code.
Compiler, interpreter and linker(Cont.)

• Linker: it links one or more files generated by


compiler and combine them into single unit to
execute the program.
Planning a Computer Program

• Two planning tools that programmers often use are input-


processing-output (IPO ) charts and pseudocode.
• The IPO chan helps the programmer determine what is needed
to write the pro* gram. It consists of three columns. In the first
column, the programmer lists what data is needed to solve the
task. In the last column, the programmer lists the desired
output. The middle column is the hard part. Here the
programmer lists the steps needed to get the desired output.
Typically the steps are written in pseudocode.
• Pseudocode is natural language statements that look like
programming codc. The idea is to write in English what needs to
happen in code
IPO Chart
Heuristics
• Sometimes, no algorithm exists to solve a
problem. In these cases, programmers rely on
heuristics to help solve problems or perform
tasks.
• Heuristics are like algorithms; they are a set of
steps for finding the solution to a problem. But
unlike an algorithm, a heuristic does not come
with a guarantee of finding the best possible
solution.
Object Oriented Programing
• Object-oriented language (OOL) is a high-level computer programming
language that implements objects and their associated procedures
within the programming context to create software programs.
• Object-oriented language uses an object-oriented programming
technique that binds related data and functions into an object and
encourages reuse of these objects within the same and other programs.
• Object oriented programing allows programmer to decompose a
problem into related subgroups. Each sub group a self contained object
that include its own code and data that relates to that object. Each
object can receive data and send message to other object.
• All oop language share three common traits i.e. encapsulation,
polymorphism, inheritance.
Types of Programing language
• High level Programing language
• Low level Programing language
1. Low level Programing language: comprises instructions
directly understood by computer. Programs written in low
level language are directly executable on the computing
hardware without any interpretation or translation. Use very
small memory and run quickly.
 Machine language
 Assembly language
Machine language
• Fundamental language for computers
• Programs were written in machine language in
0,1 form.
• Todays programs are written in high level
language however programs are processed in
machine language and then executed.
Assembly language

• It uses letters, words and symbols instead of binary digits.


• Easier than machine language.
• Mnemonics code: abbreviation of word used in assembly language.
• A program written in assembly language is called source program.
• Source program then converted into machine language by assembler.
Assembly language (cont.)
• Important elements of assembly language include label, opcode and
operand.
• Label= identifies each instruction and distinguished one from another.
• Opcode= computer operation to be performed.
• Mnemonics= identifies specific operations
Assembly language (cont.)
Assembly language (cont.)
High Level Language
• Uses English and mathematical operations for its program constructions.
• In HLL, each statement is equal to large number of assembly language
commands and instructions that perform complex computing operation.
• Without considering machine architecture programmer concentrate on
logic of applications.
• It is machine independent and program oriented
• Easy to learn.
• Less time and effort to write program in HLL.
• Debugging of program is also easy.
• Program written in HLL, needs to be translate in low level language. For
this purpose compiler and interpreter are used.
Commonly used HLL
• Procedure oriented languages (1950-1960): 3rd generation
languages. It consists of English statements used for development
of program. Based on the concept of procedural call.
• Procedure: series of steps executed by computer. Procedure
includes routines, subroutines, functions or methods.
 Fortran
 Cobol
 C language
• Object oriented languages:
 Java
 C++
Fourth generation language 1970-1990
(cont.)
• Visual programming languages: Visual programming is a type
of programming language that lets humans describe processes using
illustration. Whereas a typical text-based programming language makes
the programmer think like a computer, a visual programming language lets
the programmer describe the process in terms that make sense to
humans.
• A event can be a mouse click, a button press and drop down menu
selection for windows activity.
Fourth generation language 1970-1990
(cont.)
• Authoring Environments. Authoring environments are special-
purpose programming tools for creating multimedia
applications, computer-based training programs, Web pages,
and so on. One example of an authoring environment is
Macromedia Director (which uses the Lingo scripting language
• Sun Studio One. Sun Studio One is a visual editor for Java and
Swing applets. An applet is a program that runs inside of a
Web page. Studio One provides a complete IDE as well as
several wizards to automate common tasks such as creating an
applet. Studio One has an advantage over other Java
environments: it is developed by Sun, the creators of Java.
Fifth-Generation Languages
• Fifth-generation languages (5GLs) are actually
something of a mystery. Depending on which expert
you ask, they may or may not even agree that 5GLs
exist. Some experts consider the more advanced
authoring environments to be 5GLs, while others do
not. In principle, a 5GL would use artificial
intelligence to create software based on your
description of what the software should do. This
type of system is proving more difficult to invent
than the code it was intended to create.
World Wide Web Development Languages

• Web development is the process of building websites and applications for


the internet, or for a private network known as an intranet.
• It includes web designing, Web content development and client and
server side coding.
• HTML: Hypertext Markup Language is the standard markup language for
documents designed to be displayed in a web browser. Publish various of
documents on internet in a platform independent way, create links within
same document, include graphics multimedia in web page.
– Html tags are used.
– Text editor like Notepad is used to write the program.
– Dreamweaver, Microsoft front page.
• Extensible HTML (XHTML). XHTML displays websites on mobile phones
and other devices.
HTML Code
World Wide Web Development Languages (cont.)

• Extensible Style Sheet Language (XSL).


– Extensible Style Sheet Language (XSL) is one of the XM L technologies. Its
purpose is to display and format XM L documents for HTML browsers like
Internet Explorer. The XSL document is composed of several rules that dictate
how the document should be formatted. Once the XM L document is opened in a
browser, the XSL rules are applied. The user secs only a normal HTML page.
Using XSL it is relatively simple to have one XM L document with several different
views.
• Extensible Markup Language Mobile Profile (XHTML MP).
– In recent years, more and more people have begun using tiny deviccs (such as
PDAs) to connect to the Internet using a wireless technology, such as cellular
modems. This demand has created the need for new development environments
such as Extensible Markup Language Mobile Profile (XHTML MP), formerly
known as Wireless Markup language (WML). Web designers can use WML
World Wide Web Development Languages
(cont.)
• Extensible Markup Language (XM L).
– A next-gcneration Web content development language.
Extensible Markup Language (XM L) typically refers to a new
markup language
– allows developers to describe a page in such a way that one
source document can be presented in several different formats
such as a Web page, a printable document, and a PDF file.
– In structure, XML looks like HTML, but the developer is free to
create new tags. XM L is not a replacement for HTML. XM L
needs HTML and other technologies to properly display its
data.
World Wide Web Development Languages
(cont.)
• Dreamweaver: Dreamweaver is an HTML editor that allows the developer to visually write
Web pages. Developers can use Dreamweaver to create forms, tables, and other
components for HTML pages
• Flash: Macromedia's Flash is a development tool for creating very sophisticated Web
pages, which can include moving graphics, animation, sound, and interactivity.
• Director. Macromedia’s Director is a full-fledged multimedia authoring environment that is
part of the Macromedia Shockwave Studio suite of programs. Director gives multimedia
program and Web developers the ability to create
• Active Server Pages (ASP). Active Server Pages (ASP) is Microsoft's entry into the Web
scripting arena. Based on Visual Basic, ASP is particularly good at accessing Microsoft
databases. The most current version is ASP.NET
• Practical Extraction and Reporting Language (Perl), one of the first scripting languages,
originating on UNIX systems as a way to automate administrative tasks.
• Hypertext Preprocessor (PHP). Hypertext Preprocessor (l’l IP) is a very popular scripting
language. It runs on UNIX/Linux or Windows servers. PHP is especially good at reading
databases such as Oracle and MySQL.
The Systems Development Life Cycle for Programming

• Programs are the building blocks of information systems. When they create
software products, programmers follow a processor life cycle—that is similar to
the life cycle for entire information systems.
• Phase 1: Needs Analysis.
– Needs analysis is the stage when a need or problem is identified and understood
– programmer looks at the program design to see what the user needs for an interface
and starting point and what the user needs the program to do.
– Typically, the end-user should have a lot of input in the needs analysis stage.
• Phase 2: Program Design.
– Program design is the stage at which programmers begin roughing out the logic they
will use when the actual coding begins.
– Many tools are used in the program design process, although programmers often rely
on whiteboards and the backs of napkins.
– Three of these design tools are IPO charts (for structured programming), circles and
message pipes (object-oriented programming), and pseudocode
• Artificial intelligence (AI) can be defined as a program or machine that can
solve problems or recognize patterns. A more ''pure” definition of AI might be
a computer or program that can fool a human into thinking he or she is dealing
with another human. Even applications such as word processors and e- mail
make use of AI concepts. Regardless of the actual task, artificial intelligence is
used in two basic areas:
– Problem Solving. In problem solving, the artificial intelligence program must look at a
problem or collection of data and determine what to do next. For example, a bank may
use an artificial intelligence system to look at your credit history and lifestyle before
deciding whether
– Pattern Recognition. In pattern recognition, the artificial intelligence program must look
for repeated or known occurrences of data. Examples include artificial vision and
speech recognition. Of course, many artificial intelligence programs combine elements
of both areas to solve a problem. For example, a data compression utility must look for
repeated patterns in the data and then decide how to rewrite the data to eliminate the
duplications.
• Phase 3: Development.
– Development (also called coding) involves writing
and testing source code.
– The software development phase is similar to the
system life cycle's development phase, but instead
of determining the system’s overall layout, the
programmer writes the code that implements the
user’s requirements.
– The programmer write source code in a text editor
• Phase 4: Implementation.
– Implementation involves installing software and allowing users to test it.
– This step often includes a lot of documenting, both inside the codc and in the
form of manuals for the users.
– Certainly the implementation stage is when any misconceptions the programmer
had about the codc arc found and fixed.
• Phase 5: Maintenance.
– Maintenance starts as soon as the program is installed.
– Work continues on products for several reasons.
– Some minor bugs may not have been fixed at the time the program was released.
– The programmers also may add major new functioning, in response to either
market demands or user requests.
– This is the longest phase of the program development life cycle, sometimes
spanning many years.

You might also like