Professional Documents
Culture Documents
SOFTWARE DEVELOPMENT FOUNDATIONS AND CONCEPTS 1
SOFTWARE DEVELOPMENT FOUNDATIONS AND CONCEPTS 1
BY JAPHET ADJETEY
Course outline
• Software Developments Foundations and concepts
• Fundamentals of OOP
• Exploring Abstraction , Encapsulation , Polymorphism and Inheritance
INTRODUCTION
Software Engineering:
• The discipline for creating software applications. A systematic approach to the
design, development, testing, and maintenance of software. A lot of systems
today have a mix of hardware and software that is tightly integrated, like modern
smartphones, tablets, etc. To create such systems, involve a lot of different
disciplines. Software is any set of machine-readable instructions that directs a
computer's processor to perform specific operations. The term is used to
contrast with computer hardware, the physical objects (processor and related
devices) that carry out the instructions. Computer hardware and software
require each other, and neither can be realistically used without the other.
SOFTWARE DEVELOPMENT
LIFECYCLE
The main parts or phases in the software development process are:
• Planning
• Requirements Analysis
• Design
• Implementation
• Testing
• Deployment and Maintenance
SOFTWARE DEVELOPMENT
LIFECYCLE
• Requirements
• In the requirements, we describe what the system should do. The
requirements include both functional requirements and non-
functional requirements [1].
• Functional Requirements: Statements of services the system
should provide, how the system should react to inputs and how
the system should behave in different situations. May state what
the system should not do.
• Non-Functional Requirements: Constraints on the services or
functions offered by the system such as timing constraints,
constraints on the development process, standards, etc. Often
apply to the system rather than individual features or services.
SOFTWARE DEVELOPMENT
LIFECYCLE
• Design
• In the design phase, we use the specification and transform it into
descriptions of how we should do it.
• In principle, requirements should state what the system should
do and the design should describe how it does this – but in
practice this is not so easy.
• In practice, requirements and design are inseparable.
SOFTWARE DEVELOPMENT
LIFECYCLE
• We can divide design into 2 main groups:
• Technical Design – Platform and Architecture Design, i.e., how to
build the software.
• UX Design – Design of User experience (UX) and the Graphical
User Interface (GUI), sometimes also called Human Machine
Interface (HMI). This is what the end user of the software sees.
SOFTWARE DEVELOPMENT
LIFECYCLE
• Implementation
• Software is usually designed and created
(coded/written/programmed) in integrated development
environments (IDE) like Eclipse, Xcode or Microsoft Visual Studio
that can simplify the process and compile the program to an
executable unit. Software is usually created on top of existing
software and the application programming interface (API) that
the underlying software frameworks provide, e.g. Microsoft .NET,
etc.
• Most of the software has a Graphical User Interface (GUI).
Normally you separate the GUI design and code in different layers
or files.
SOFTWARE DEVELOPMENT
LIFECYCLE
• Testing
• Testing can be performed on different levels and by different
persons. Testing is a very important part of software
development. About 50% of the software development is about
testing your software.
• Creating User-friendly Software is Crucial!
SOFTWARE DEVELOPMENT
LIFECYCLE
• Deployment
• What is Deployment?
• Software deployment is all the activities that make a software
system available for use.
• Examples:
• Get the software out to the customers
• Creating Installation Packages
• Documentation, e.g., Installation Guide, etc.
• Installation
SOFTWARE DEVELOPMENT
LIFECYCLE
• Maintenance
• When the software is deployed, or installed, you normally go into
a Maintenance phase. The maintenance of software involves bug
fixes of the software after the software is released, etc. At some
time, you also need to start planning new releases of the
software.
Software development methodologies
• Waterfall model
• V-model
• Spiral model
• Unified Process (UP)/ Rational Unified Process (RUP)
• Scrum
• Extreme Programming (XP)
• Lean Software Development
• TDD (Test Driven Development)
• Lean Software Development
• Kanban
Software development methodologies
These processes or models may be divided in 2 main
categories:
Plan-driven models and Agile methods. The Waterfall
model, V-model and the Spiral model is so-called plan-driven
models,
while Scrum and eXtreme Programming are so-called Agile
methods.
Software development methodologies
CLASS OBJECT
Fruit Orange
Banana
Pear
Mango
FUNDAMENTALS OF OOP
Example 2
CLASS OBJECT
Car Audi
Volvo
Toyota
• So, a class is a template for objects, and an object is an instance of a
class.
• When the individual objects are created, they inherit all the variables and
methods from the class.
• On the other hand attributes are the information that is stored.
• Attributes are stored in the class template.
• When objects are instantiated ,individual objects contain data stored in
the attributes field.
• The state of an object is defined by the data in the object’s attributes
field.
• Methods
• Methods represents behaviours , perform actions and also return
information
About an object.
• Python is an object-oriented programming language.
• Everything in Python is associated with classes and objects, along with
its attributes and methods. For example: in real life, a car is an object.
The car has attributes, such as weight and color, and methods, such
as drive and brake.
• A Class is like an object constructor, or a "blueprint" for creating
objects.
THE FOUR PILLARS OF OOP
• Encapsulation
Encapsulation is accomplished when each object
maintains a private state, inside a class. Other objects can
not access this state directly, instead, they can only
invoke a list of public functions. The object manages its
own state via these functions and no other class can alter
it unless explicitly allowed.
aBSTRACTION
Abstraction is an extension of encapsulation.
It is the process of selecting data from a larger pool to show only the
relevant details to the object. Suppose you want to create a dating
application and you are asked to collect all the information about your
users. You might receive the following data from your user: Full name,
address, phone number, favorite food, favorite movie, hobbies, tax
information, social security number, credit score. This amount of data is
great however not all of it is required to create a dating profile. You only
need to select the information that is pertinent to your dating application
from that pool. Data like Full name, favorite food, favorite movie, and
hobbies make sense for a dating application. The process of
fetching/removing/selecting the user information from a larger pool is
referred to as Abstraction.
POLYMORPHISM
Polymorphism gives us a way to use a class exactly like its parent so
there is no confusion with mixing types. This being said, each child sub-
class keeps its own functions/methods as they are. If we had a
superclass called Mammal that has a method called mammalSound().
The sub-classes of Mammals could be Dogs, whales, elephants, and
horses. Each of these would have their own iteration of a mammal
sound (dog-barks, whale-clicks).
POLYMORPHISM
Polymorphism gives us a way to use a class exactly like its parent so
there is no confusion with mixing types. This being said, each child sub-
class keeps its own functions/methods as they are. If we had a
superclass called Mammal that has a method called mammalSound().
The sub-classes of Mammals could be Dogs, whales, elephants, and
horses. Each of these would have their own iteration of a mammal
sound (dog-barks, whale-clicks).
iNHERITANCE
Inheritance is the ability of one object to acquire some/all properties of
another object. For example, a child inherits the traits of his/her
parents. With inheritance, reusability is a major advantage. You can
reuse the fields and methods of the existing class.. For example, Apple is
a fruit so assume that we have a class Fruit and a subclass of it named
Apple. Our Apple acquires the properties of the Fruit class.
Algorithms, pseudocodes and flowcharts
• Algorithm is a step by step process to solve a problem. In other words
algorithms can be defined as a representation of a solution to a
problem.
• An example of an algorithm of a recipe to make cake.
• "4 extra large eggs, beaten
• 1&1/2 C. stock
• 1/2 teaspoon salt 1 scallion, minced
• 1 C. small shrimp or lobster flakes
• 1 t. soy sauce
Continuation
• 1 Tablespoon oil
• 1. Mix all the ingredients, except the oil, in a deep bowl.
• 2. Put 1" water in wide pot,
• then place deep bowl of batter inside.
• 3. Cover pot tightly and steam 15 min.
• 4. Heat oil very hot and pour over custard.
• 5. Steam 5 more min.
• Serves 4 people"
flowcharts