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

1 Func

The document discusses the syllabus for module 1 of an object-oriented programming course using Java. It covers topics like software engineering, the software development life cycle, waterfall model phases, approaches to software design including procedural and object-oriented design.

Uploaded by

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

1 Func

The document discusses the syllabus for module 1 of an object-oriented programming course using Java. It covers topics like software engineering, the software development life cycle, waterfall model phases, approaches to software design including procedural and object-oriented design.

Uploaded by

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

CST 205 Object

Oriented Programming
Using Java
SYLLABUS OF MODULE 1
SOFTWARE ENGINEERING
● Software : Software is a collection of instructions that enable
the user to interact with a computer , its hardware or
perform tasks.
● There are two types of software
1. System Software
2. Application Software
● Examples of system software are Operating System, Compilers,
Interpreter, Assemblers, etc.
● Examples of Application software are Microsoft Word,
Microsoft PowerPoint , etc.
SOFTWARE ENGINEERING
● Software engineering discusses systematic and cost-effective
techniques for software development. These techniques help develop
software using an engineering approach.
Software life cycle
● The life cycle of a software represents the series of identifiable
stages through which it evolves during its life time.
● A Software development life cycle (SDLC) model (also called
software life cycle model and software development process model)
describes the different activities that need to be carried out for the
software to evolve in its life cycle.
Classical Waterfall Model
● In fact, it is hard to put this model into use in any non-
trivial software development project.
● All other life cycle models can be thought of as being
extensions of the classical waterfall model.
Classical Waterfall Model
Classical waterfall model is
intuitively the most obvious and
simple way to develop a software.
Phases of the classical waterfall model
Feasibility study
● The main focus of the feasibility study stage is to determine whether
it would be financially and technically feasible to develop the
software.
Requirements analysis and specification
● The aim of the requirements analysis and specification phase is to
understand the exact requirements of the customer and to document
them properly.
● This phase consists of two distinct activities, namely requirements
gathering and analysis, and requirements specification.
Phases of the classical waterfall model
Design
● The goal of the design phase is to transform the requirements
specified in the SRS document into a structure that is suitable
for implementation in some programming language.
● In technical terms, during the design phase the software
architecture is derived from the SRS document.
● Two distinctly different design approaches
 Function-oriented design(Procedural design approach)
 Object-oriented design approach
Phases of the classical waterfall model
Coding and unit testing
● The purpose of the coding and unit testing phase is to translate a
software design into source code and to ensure that individually
each function is working correctly.
● The coding phase is also sometimes called the implementation
phase, since the design is implemented into a workable solution.
● The end-product of this phase is a set of program modules that
have been individually unit tested.
● The main objective of unit testing is to determine the correct
working of the individual modules.
Phases of the classical waterfall model
Integration and system testing
● During the integration and system testing phase, the different
modules are integrated in a planned manner.
● Integration of various modules are normally carried out
incrementally over a number of steps.
● Finally, after all the modules have been successfully integrated
and tested, the full working system is obtained.
● System testing is carried out on this fully working system
Phases of the classical waterfall model
Maintenance
● Maintenance is carried out to correct errors that were not
discovered during the product development phase.

● Maintenance is carried out to improve the performance of the


system, or to enhance the functionalities of the system based on
customer’s requests.
APPROACHES TO SOFTWARE DESIGN

● The goal of the design phase is to transform the requirements


specified in the SRS document into a structure that is suitable for
implementation in some programming language.
● Two distinctly different design approaches are popularly being
used at present
● Procedural or Function-oriented Design
● Object-oriented Design
Procedural or Function-oriented Design
● The traditional design approach is in use in many software
development projects at the present time.
● This traditional design technique is based on the data flow-
oriented design approach.
● It consists of two important activities; first structured analysis of
the requirements specification is carried out where the detailed
structure of the problem is examined.
● This is followed by a structured design step where the results of
structured analysis are transformed into the software design.
Procedural or Function-oriented Design
● During structured analysis, functional decomposition of the
system is achieved. That is, each function that the system needs
to perform is analysed and hierarchically decomposed into
more detailed functions.
● During structured design ,all functions identified during
structured analysis are mapped to highlevel design.
● The high-level design stage is normally followed by a detailed
design stage. During the detailed design stage, the algorithms
and data structures for the individual modules are designed.
Function-oriented Design
Salient features of the function-oriented design approach:
1. Top-down decomposition
● A system, to start with, is viewed as a black box that provides certain
services to the users of the system (also known as high-level functions)
● Application of divide and conquer principle. Through this each high-
level function is independently decomposed into detailed functions.
● Graphical representation of the analysis results using data flow diagrams.
(DFD)[hierarchical graphical model of a system]
● During structured design phase the results of the structured analysis (that
is, the DFD model) is converted into a structure chart.
Function-oriented Design
Function-oriented Design :Design of Library Management System
Function-oriented Design
● Consider a function create-new-library member which essentially creates
the record for a new member, assigns a unique membership number to him,
and prints a bill towards his membership charge.
● This high-level function may be refined into the following subfunctions:
 assign-membership-number
 create-member-record
 print-bill
● Each of these subfunctions may be split into more detailed subfunctions and
so on.
Function-oriented Design
2.Centralised system state
● The system state can be defined as the values of certain data items
that determine the response of the system to a user action
● For example, in the library management system, several functions
such create-new-member , delete-member, update-member-record
share data such as member-records for reference and updation:
● Such data in procedural programs usually have global scope and
are shared by many modules.
Function-oriented Design
Object-oriented Design
● In the object-oriented design (OOD) approach, a system is viewed as
being made up of a collection of objects (i.e. entities).
● Each object is associated with a set of functions that are called its
methods.
● Each object contains its own data and is responsible for managing it.
● The data internal to an object cannot be accessed directly by other
objects and only through invocation of the methods of the object.
● The system state is decentralised since there is no globally shared data
in the system and data is stored in each object.
● For example, in a library automation software, each library member may be
a separate object with its own data and functions.
Object-oriented Design
Object-oriented Design
● The object-oriented design paradigm makes extensive use of the
principles of abstraction and decomposition
● Objects decompose a system into functionally independent
modules. Objects can also be considered as instances of
abstract data types (ADTs).
● Three important concepts associated with abstract data
types (ADTs)
 Abstraction
 Data type
 Data structure
Object-oriented Design
Data abstraction
● This means that any entity external to the object (that is, an
instance of an ADT) would have no knowledge about how
data is exactly stored, organised, and manipulated inside the
object.
● The entities external to the object can access the data internal
to an object only by calling certain well-defined methods
supported by the object.
● The data of objects are encapsulated within the methods. The
encapsulation principle is also known as data hiding.
Object-oriented Design
Data type
● A type is a programming language terminology that refers to anything that
can be instantiated.
● For example, int, float, char etc., are the basic data types
● Class is a used defined datatype in java.[or Abstract Datatypes]
Data structure:
● A data structure is constructed from a collection of primitive data items.
● Just as a civil engineer builds a large civil engineering structure using
primitive building materials such as bricks, iron rods, and cement;
● A programmer can construct a data structure as an organised collection of
primitive data items such as integer, floating point numbers, characters, etc.
Object-oriented design VS Function oriented
design
● In function-oriented design methods available to the users of
the system such as issuebook ,display-book-details, find-
issued-books, etc., But in OOD, real-world entities such as
member, book, book-register, etc.
● Another example in OOD, an employee pay-roll software is
not developed by designing functions such as update-
employee-record, get-employee-address,etc., but by
designing objects such as employees, departments, etc.
Object-oriented design VS Function oriented
design
● In OOD, state information exists in the form of data distributed
among several objects of the system. In contrast, in a procedural
design, the state information is available in a centralised shared data
store.
● For example, while developing an employee pay-roll system, the
employee data such as the names of the employees, their code
numbers, basic salaries, etc., are usually implemented as global data
in a traditional programming system; whereas in an object-oriented
design, these data are distributed among different employee objects
Case study
Automated fire-alarm system
Automated fire-alarm system—customer
requirements

● The owner of a large multi-storied building wants to have a


computerised fire alarm system designed, developed, and installed
in his building.
● Smoke detectors and fire alarms would be placed in each room
● The fire alarm system would monitor the status of these smoke
detectors.
Automated fire-alarm system—customer
requirements
● Whenever a fire condition is reported by any of the smoke
detectors, the fire alarm system should determine the location at
which the fire has been sensed and then sound the alarms only
in the neighbouring locations
● The fire alarm system should also flash an alarm message on
the computer console.
● After a fire condition has been successfully handled, the fire
alarm system should support resetting the alarms by the fire
fighting personnel.
Function-oriented approach:
● In this approach, the different high-level functions are first
identified, and then the data structures are designed
Function-oriented approach:
The functions which operate on the system state are:
 interrogate_detectors();
 get_detector_location();
 determine_neighbour_alarm();
 determine_neighbour_sprinkler();
 ring_alarm();
 activate_sprinkler();
 reset_alarm();
 reset_sprinkler();
 report_fire_location();
Object-oriented approach
● In the object-oriented approach, the different classes of objects
are identified.

● Subsequently, the methods and data for each object are


identified.

● Finally, an appropriate number of instances of each class is


created.
Object-oriented approach
 class detector
attributes: status, location, neighbours
operations: create, sense-status, get-location,
find_neighbours
 class alarm
attributes: location, status
operations: create, ring-alarm, get_location, resetalarm
 class sprinkler
attributes: location, status
operations: create, activate-sprinkler, get_location,
reset_sprinkler
Procedural Oriented Object-Oriented
Programming Programming

In procedural programming, the In object-oriented programming,


program is divided into small parts the program is divided into small
called functions. parts called objects.

Procedural programming follows Object-oriented programming


a top-down approach. follows a bottom-up approach.

Object-oriented programming
There is no access specifier in has access specifiers like
procedural programming. private, public, protected, etc.

Adding new data and functions is Adding new data and function is
not easy. easy.

Procedural programming does not Object-oriented programming


have any proper way of hiding data provides data hiding so it
so it is less secure. is more secure.
Procedural Oriented
Programming Object-Oriented Programming

In procedural programming, Overloading is possible in object-


overloading is not possible. oriented programming.

In procedural programming, In object-oriented programming,


there is no concept of data the concept of data hiding and
hiding and inheritance. inheritance is used.

In procedural programming, the In object-oriented programming,


function is more important than data is more important than
the data. function.

Procedural programming is used Object-oriented programming is


for designing medium-sized used for designing large and
programs. complex programs.

Code reusability absent in Code reusability present in object-


procedural programming, oriented programming.

Examples: C, FORTRAN, Examples: C++, Java, Python, C#,


Pascal, Basic, etc. etc.
Object-oriented design VS Function oriented
design
● Assignment

● Differences between Procedural and Object Oriented


Programming.
[Explain with an case study –Banking process]

You might also like