
\documentclass[11pt]{article}
\setlength{\textwidth}{5.5in}
%\setlength{\evensidemargin}{-0.5in}
\usepackage{TRmydraft} % title page report
\usepackage{wmff} % algorithm
\usepackage{yprob} % algorithm listing, code, report exercises

\usepackage{graphicx}

\pagestyle{myheadings}
\markright{Programs and Software Development\hfill}

\begin{document}

\reptitle{\bf Programs and Software Development}
\author{Dr. Jos\'e M. Garrido}

%\date{February, 2009}

\subtitle{{}}
\subsubtitle{}


\authoraffil{Department of Computer Science} 
 
%
%\halftitlepage
%

\titlepage

\mdraft
%\maketitle
%\newpage
%\tableofcontents
%\newpage

 
\section{Programs}

The hardware in a computer system is driven and controlled by software\index{software}, which consist of the set of programs that execute in the computer. These  control, manage the hardware, and carry out system and user tasks. 

A program consists of data descriptions and instructions to manipulate this data.
The types of programs that carry out system tasks are known as {\it system programs}\index{system programs} and control the activities and functions of the various hardware components. An example of system programs is the operating system, such as Unix, Windows, MacOS, OS/2, and others.

User programs\index{application programs}, also known as {\it application programs}\index{application programs}, carry out tasks that solve specific problems for the users. These programs execute under control of the system programs. Application programs are developed by individuals and organizations for solving specific problems.

%\newpage

\section{Programming Languages}

A programming language\index{programming language} is a set of syntax and semantic rules for writing programs. It is a formal notation that is used to write the data description and the instructions of a program. The programming language's syntax rules describe how to write sentences. The semantic rules describe the meaning of the sentences. These two types of rules must be consistent. There are several levels of computer programming languages, basically low-level and high-level languages.


\subsection{Assembly Languages}

The symbolic machine languages are also known as assembly languages and are low-level programming languages. In these languages, various mnemonic symbols represent operations and addresses in memory. These languages are hardware dependent; there is a different assembly language for every computer type. Assembly language is still used today for detailed control of hardware devices; it is also used when extremely efficient execution is required.

\subsection{High-Level Programming Languages}

A high-level programming language\index{high-level programming language} provides a programmer the facility to write instructions to the computer in the form of a program. A programming language must be expressive enough to help programmers in  the writing of programs for a large family of problems.

High-level programming languages are hardware independent and more problem-oriented (for a given family of problems). These languages allow more readable programs, and are easier to write and maintain. Examples of these languages are Pascal, C, Cobol, FORTRAN, Algol, Ada, Smalltalk, C++, Eiffel, and Java. 

Simula was the first object-oriented language developed in the mid-sixties and used to write simulation models. The original language was an extension of Algol. In a similar manner, C++ was developed as an extension to C in the early eighties.

Java was developed by Sun Microsystems in the mid-nineties and has far more capabilities than any other object-oriented programming language to date, unfortunately, it has a relatively low-level syntax.

Languages like C++ and Java can require considerable effort to learn and master. Several newer and experimental, higher-level, object-oriented programming languages have been developed. Each one has a particular goal. One such language is {\em OOSimL}\index{OOSimL} (Object Oriented Simulation Language); its main purpose is to develop simulation models, make it easier to learn object-oriented programming principles, and help students transition to Java.

\subsection{Compiling a Program}

A program written in a programming language is compiled or translated to an equivalent program in machine language, which is the only programming language that the computer accepts for processing. 

In addition to {\em compilation}\index{compilation}, another step known as {\em linking}\index{linking} is required before a program can be executed. Programming languages like Java, require compilation and interpretation. This last step involves execution of the compiled program.

Two special programs are needed, the compiler and the interpreter. The Java compiler checks for syntax errors in the source program and translates it into {\em bytecode}\index{bytecode}, which is the program in an intermediate form. The Java bytecode is not dependent on any particular platform or computer system. To execute this bytecode, the Java Virtual Machine (JVM), carries out the interpretation of the bytecode.

\subsection{Compiling OOSimL Programs}

Programs written in OOSimL (an object-oriented language that is higher level than Java), are  compiled with the OOSimL compiler. This is a translator that checks for syntax errors in the language, and translates the program from OOSimL to Java. This compiler is a special program that is freely available from the following Web page:

\begin{quote}
\begin{verbatim}
http://science.kennesaw.edu/~jgarrido/oosiml.html
\end{verbatim}
\end{quote}


The OOSimL compilation is illustrated in Figure~\ref{fig:oosimltool}. Appendix A explains in further  detail how to use the OOSimL compiler\index{OOSimL compiler}.

\begin{figure}[h]
\vspace{.2in}
\centereps{3.5in}{0.463in}{figs/oosimlcomp.eps}
\caption{OOSimL Compilation}
\label{fig:oosimltool}
%\vskip\baselineskip
\vspace{0.1in}
\end{figure}

\section{Software Development}

The main goal of software development is to solve a given real-world problem. This involves the following general tasks:
\begin{enumerate}
\item
 Understanding and describing the problem in a clear and unambiguous form
\item
 Designing a solution to the problem
\item
 Developing a computer solution to the problem.
\end{enumerate}

\subsection{Software Life Cycle}

A software development process involves carrying out a sequence of activities. These activities represent the life of the software from birth to retirement. In most cases, the development process is also known as the {\em software life cycle}. 

The software life cycle\index{software life cycle} basically consists of the following phases:

\begin{enumerate}
\item
Software development
\item
Operational activities that applies the software in the problem environment

\item
Maintenance activities that report defects in the software and the subsequent fixes and releases of new versions of the software

\item
Software retirement when it can no longer be maintained.

\end{enumerate}
 
The simplest model of the software life cycle  is the {\em waterfall model}\index{waterfall model}. This model represents the sequence of phases or activities to develop the software system through  installation and maintenance of the software. In this model, the activity in a given phase cannot be started until the activity of the previous phase has been completed.

Figure~\ref{fig:waterfall} illustrates the sequence of activities or phases involved in the waterfall model of the software life cycle. 

\begin{figure}[h]
\vspace{.2in}
\centereps{3.0in}{2.714in}{figs/waterfall.eps}
\caption{The waterfall model}
\label{fig:waterfall}
%\vskip\baselineskip
\vspace{0.1in}
\end{figure}


The various phases of the software life cycle are the following:


\begin{enumerate}
\item
  Analysis that results in documenting the problem description and  what the problem solution is supposed to accomplish.  
 \item
  Design, which involves describing and documenting the detailed structure and behavior of the system model.
\item
  Implementation of the software using a programming language. 
 \item
  Testing\index{testing} and verification of the programs. 

 \item 
  Installation and maintenance\index{maintenance} that results in delivery, installation and maintenance of the programs. 

\end{enumerate}

In practice, the waterfall model is argued by many to be very inconvenient and difficult to use, mainly because for any non-trivial project, to get one phase of a software product's lifecycle completed and correct before moving on to the next phases. 


There are some variations proposed for the waterfall model of the life cycle. These include returning to the previous phase when necessary. Recent trends in system development have emphasized an iterative approach, in which previous stages can be revised and enhanced.  

A more complete model of software life cycle is the {\em spiral model\/}\index{spiral model} that incorporates the construction of {\em prototypes}\index{prototypes} in the early stages. A prototype is an early version of the application that does not have all the final characteristics. Other development approaches involve prototyping and rapid application development (RAD).




\end{document}
