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

Introduction to Software development - unit 1

The document provides an overview of software development, detailing its definition, types, and the roles involved, including programmers, software engineers, and AI engineers. It outlines the Software Development Life Cycle (SDLC), which consists of phases such as planning, feasibility analysis, design, implementation, testing, deployment, and maintenance. Additionally, it discusses Information Systems (IS), their components, behavior, and the application of systems theory in understanding their functionality.

Uploaded by

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

Introduction to Software development - unit 1

The document provides an overview of software development, detailing its definition, types, and the roles involved, including programmers, software engineers, and AI engineers. It outlines the Software Development Life Cycle (SDLC), which consists of phases such as planning, feasibility analysis, design, implementation, testing, deployment, and maintenance. Additionally, it discusses Information Systems (IS), their components, behavior, and the application of systems theory in understanding their functionality.

Uploaded by

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

Copperbelt University

School of Information Communication and Technology


Software Development (CS 130)

Introduction to software development


What is software development?
Software development refers to a set of computer science activities that are dedicated to the
process of creating, designing, deploying and supporting software.

What is software?
Software is a collection of instructions or programs that direct a computer on what tasks to
perform, making it programmable and enabling it to execute specific functions.

The goal of software development is to create a product that meets user needs and business
objectives in an efficient, repeatable and secure way. System analysts, Software developers,
programmers and software engineers, AI Engineers develop software through a series of steps
called the software development lifecycle (SDLC).

Types of software
Types of software include system software, programming software, application software and
embedded software:

1. System software
Is the foundational layer of software that allows hardware to communicate with
software. It manages hardware resources and provides essential services for other types
of software.

Examples

• Operating Systems (OS): Windows, macOS, Linux, Android, iOS.

1 CS 130
• Utility Software: Disk cleanup tools, antivirus programs, file management
systems.
• Hardware Management: Device drivers for printers, graphics cards, or network
adapters.

2. Programming software
Provides tools for developers to write, test, and debug code. It helps create all the other
types of software.

Examples

• Text Editors: Notepad++, Visual Studio Code.


• Integrated Development Environments (IDEs): Eclipse, IntelliJ IDEA, PyCharm.

3. Application software
Helps users perform specific tasks, such as writing documents, playing music, or
browsing the web.

Examples

• Office Productivity Software: Microsoft Word, Excel, Google Docs.


• Media Players: VLC Media Player, Spotify.
• Data Management: Microsoft Access, Tableau.
• Web and Mobile Apps: Amazon (shopping), Instagram (social media),
Uber (transportation).

4. Embedded software
Is designed to run on specific devices that are not traditional computers. It enables
these devices to perform specific tasks, often in real-time, and is usually embedded
directly into the hardware.

Examples

• In Cars: Software that powers airbags, GPS systems, or cruise control.


• In Industrial Robots: Robotics software controlling assembly-line robots
in factories.

2 CS 130
Who develops software?
Programmers, software engineers, system analysts, software developers, and AI engineers
primarily conduct software development. These roles interact, overlap, and have similar
requirements, such as writing code, testing software, developing Large language models and
ensuring functionality align with business goals. The dynamics between them vary greatly
across development departments and organizations.

Programmers (coders)
Programmers, or coders, write source code to program computers for specific tasks such as
merging databases, processing online orders, routing communications, conducting searches or
displaying text and graphics. They also debug and test software to make sure the software does
not contain errors.

Programmers typically interpret instructions from software developers and engineers and use
programming languages such as PHP, C++, Java™, JavaScript and Python to implement them.

Software engineers
Software engineers design, develop, test and maintain software applications. As a managerial
role, software engineers engage in problem solving with project managers, product managers
and other team members to account for real-world scenarios and business goals. Software
engineers consider full systems when developing software, making sure that operating systems
meet software requirements and that various pieces of software can interact with each other.

Beyond the building of new software, engineers monitor, test and optimize applications after
they are deployed. Software engineers oversee the creation and deployment of patches, updates
and new features.

Software developers

Like software engineers, software developers design, develop and test software. Unlike
engineers, they usually have a specific, project-based focus. A developer might be assigned to
fix an identified error, work with a team of developers on a software update or to develop a
specific aspect of a new piece of software. Software developers require many of the same skills
as engineers but are not often assigned to manage full systems.

3 CS 130
AI Engineers
AI engineers specialize in designing, developing, and deploying artificial intelligence and
machine learning systems. Their work often involves creating models that can analyze large
amounts of data, make predictions, or automate complex tasks. AI engineers use programming
languages such as Python, R, and Java, as well as specialized frameworks like TensorFlow,
PyTorch, or Scikit-learn. AI engineers work closely with data scientists, software engineers, and
product managers to ensure that AI systems integrate seamlessly into larger software solutions.
They focus on optimizing model performance, ensuring scalability, and addressing challenges
like data preprocessing, bias, and explainability.

System Analyst
Act as the critical link between business needs and technology solutions, analyzing
organizational workflows to design efficient IT systems. They gather stakeholder requirements,
model processes using tools like UML and flowcharts, and translate these into technical
specifications for developers. Collaborating with business teams, engineers, and end-users,
they ensure systems align with operational goals while addressing challenges like integration,
scalability, and cost-effectiveness. Their expertise bridges gaps between non-technical
stakeholders and development teams, optimizing systems to drive productivity and innovation.

Summary Table

Role Primary Focus Scope Example


Programmer Writing code Task-specific coding Writing a function to sort
a list or fixing
bugs in existing code.
Software Developer Building software Application- Creating a mobile app or
applications level web application
development from start to finish.
Software Engineer Engineering software System-level design Designing and
systems & development implementing a scalable
distributed
system.
AI Engineer AI and ML models Intelligent system Creating and
development deploying a
recommendation
system or NLP
chatbot.
System Analyst Bridging business Process optimization Streamlining an e-
needs with tech & system design commerce checkout
solutions process by analyzing
customer pain points,
specifying
requirements for a
4 CS 130
simplified interface,
and coordinating with
developers to
implement the
solution

The Software Development Life Cycle (SDLC)


The Software Development Life Cycle (SDLC) is a well-structured process that guides software
development projects from start to finish. It provides a clear framework for planning, building,
and maintaining software, ensuring that development is systematic and meets quality standards.
Following SDLC software production guidelines, engineers can deliver reliable, functional
software, avoid common pitfalls, and keep projects on schedule.

What is the Software Development Life Cycle ?


The Software Development Life Cycle is a formalized process software engineers use to plan,
design, develop, test, and maintain software applications. Defining the specific SDLC stages
ensures that development is organized and executed effectively, resulting in high-quality
software that meets user requirements. Following a structured approach, development teams can
reduce risks, optimize resources, and produce software that aligns with business goals– all within
a reasonable timeframe.

Main Software Development Life Cycle phases

1. Planning
The planning phase is the foundation of any successful software development project.
Project goals, objectives, and requirements are gathered and documented during this
phase. Project requirements can be based on customer feedback or market research
evaluating existing product options. Stakeholders work together to define the project
scope, establish timelines, and allocate resources. Planning establishes the project's
direction, ensuring that all participants have a clear understanding of what needs to be
done and how to achieve it.

2. Feasibility analysis
Once planning is complete, the feasibility analysis phase begins. During this phase, the
project team evaluates whether the project is technically and financially viable. This
includes assessing the technical requirements, estimating costs, and performing a risk
analysis. Risk assessment is essential to identifying potential challenges and
determining if the project is worth pursuing.

5 CS 130
3. System design
The system design phase includes creating the software's architecture and design. Based
on the requirements gathered during planning, the team creates a blueprint outlining
how the software will function. This includes high-level architecture and detailed
design specifications, including user interface design to ensure the software is user-
friendly and an assessment of requirements for compatibility with existing products.

4. Implementation
The implementation phase, also known as the development phase, transforms the
design into a functional application. It is here that the actual coding takes place.
Developers write the code based on the design specifications, following best practices
and coding standards to ensure the result is efficient, secure, and maintainable.

5. Testing
The testing phase is critical because it generates essential performance and usability
feedback while revealing defects and quirks. Various types of software testing can be
used, including automated testing, unit testing, integration testing, and system testing. The
goal is to identify and fix bugs, ensuring the software operates as intended before being
deployed to users.

6. Deployment
Once internal software testing is complete, the solution can be deployed to end users.
This typically includes a beta-testing phase or pilot launch, limited to a select group of
real-world users. Depending on the project's needs, deployment can be done on-
premise or in the cloud. The deployment strategy determines how easily users can
access and use the software.

7. Maintenance
The last phase of the SDLC is maintenance. Even after the software is deployed, ongoing
support is necessary to address issues, apply updates, and add new features. Continuous
maintenance ensures that the software remains functional and relevant over time.

6 CS 130
Systems Theory and the Nature and Behavior of Information
Systems
Introduction to Information Systems
An Information System (IS) is a structured arrangement of hardware, software, data, people,
and processes that work together to collect, process, store, and distribute information.
Organizations rely on ISs to support decision-making, coordinate activities, and enhance
operational efficiency.
Information Systems are critical in various fields, including business, healthcare, education,
and government, as they enable efficient resource management, improve communication, and
provide a competitive edge. For example, in healthcare, ISs manage patient records, streamline
appointments, and support diagnostic processes, while in business, they facilitate supply chain
management, customer relationship management (CRM), and financial analysis.

Introduction to Systems Theory


A system is a set of interconnected components working together to achieve a specific
objective. Systems theory provides a framework for analyzing how these components interact
within a larger environment. It emphasizes the relationships between parts of a system and how
they contribute to the system's overall functionality.
In the context of Information Systems (ISs), systems theory helps us understand how different
elements such as hardware, software, data, people, and processes function together to achieve
organizational goals. It also highlights the importance of feedback loops, adaptability, and the
interdependence of components.

Open vs. Closed Systems


Information Systems can be classified based on their interaction with the external environment:
a) Open Systems
• Open systems interact with their environment, receiving inputs and producing
outputs that influence external entities.
• These systems continuously exchange data with users, other systems, or
organizations.
Key Characteristics

• Dynamic and adaptable to changes in the environment.


• Dependent on external inputs for functionality.
• Examples include e-commerce platforms, social media networks, and online
banking systems.

7 CS 130
Example: A university’s online learning management system (LMS) allows students
and faculty to exchange information, submit assignments, and access educational
materials. The LMS interacts with external systems like email servers and cloud
storage.

b) Closed Systems
• Closed systems operate independently, with minimal interaction with external
elements.
• They rely primarily on internal processes without external inputs affecting their
behavior.
Key Characteristics

• Static and self-contained.


• Limited adaptability to external changes.
• Examples include standalone software applications or legacy systems with no
network connectivity.
Example: A standalone computer running an offline data analysis program without
network connectivity.

Most modern Information Systems are open systems, as they require interaction with users,
external databases, and other systems to function effectively. However, certain subsystems
within an IS (e.g., a backup server) may operate as closed systems for security or stability
reasons.

Components of an Information System


An Information System consists of five key components, each playing a critical role in its
functionality:
1. Hardware
The physical devices used in the system, such as computers, servers, storage devices,
networking equipment, and input/output devices (e.g., keyboards, printers).
Importance - Hardware provides the infrastructure for processing and storing data.
Advances in hardware, such as cloud computing and edge devices, have significantly
enhanced the capabilities of ISs.
2. Software
The programs and applications that enable the system to process data.

8 CS 130
It includes: System software: Operating systems (e.g., Windows, Linux) that manage
hardware resources, Application software: Programs designed for specific tasks, such
as business applications, enterprise resource planning (ERP) systems, or customer
relationship management (CRM) tools.
Importance - Software defines the functionality of the system and determines how data
is processed and presented.
3. Data
The raw facts and figures processed by the system to generate meaningful information.
Examples include customer records, financial transactions, and student performance
data.
Importance: Data is the foundation of any IS. Effective data management, including
storage, retrieval, and analysis, is crucial for decision-making.
4. People
The users who interact with the system, including IT professionals, business managers,
employees, and customers. IT professionals design, implement, and maintain the
system and End-users (e.g., employees, customers) interact with the system to perform
tasks.
Importance - People are essential for designing, operating, and maintaining the system.
User training and support are critical for maximizing the system's effectiveness.
5. Processes
The structured workflows and rules followed within the system to achieve business
objectives. Examples include order processing in an e-commerce system or payroll
management in a corporate environment.
Importance - Processes ensure consistency, efficiency, and compliance with
organizational goals. Well-defined processes reduce errors and improve productivity.

Each of these components must work together efficiently to ensure the successful operation of
an Information System. For example, in an e-commerce platform, hardware (servers) and
software (web applications) process customer orders, while people (customers and employees)
interact with the system, and processes (order fulfillment workflows) ensure timely delivery.

Behavior of Information Systems


The behavior of an Information System is defined by how it processes data and interacts with
users and external systems. Key behavioral aspects include:
a) Input-Process-Output Model

9 CS 130
• Input - The system receives data from users or external sources (e.g., customer
orders, sensor data).
• Processing - The data is processed based on predefined rules and logic (e.g.,
calculating totals, generating reports).
• Output - The system generates meaningful information for decision-making
(e.g., invoices, dashboards).
Example: A banking system processes customer transactions (input), updates account
balances (processing), and generates account statements (output).
b) Feedback Mechanisms
• Information Systems incorporate feedback loops to improve performance.
• Users can provide input that allows the system to adjust processes dynamically.
Example: A customer relationship management (CRM) system may adjust marketing
strategies based on customer feedback and purchase behavior. For instance, if
customers frequently abandon their shopping carts, the system might trigger
personalized discount offers.
c) Adaptability and Scalability
• Effective ISs can evolve with changing business needs and technological
advancements.
• Adaptability: The ability to modify processes or integrate new technologies
(e.g., adopting AI for data analysis).
• Scalability: The ability to handle increased workloads without performance
degradation (e.g., cloud-based systems that scale resources based on demand).
Example: A cloud-based e-commerce platform can scale its server capacity during peak
shopping seasons to handle increased traffic.
d) Interdependence of Components
• The components of an IS are interdependent, meaning changes in one
component can affect others.
Example: Upgrading software may require hardware upgrades to maintain
performance, or changes in processes may necessitate user training.
e) Security and Reliability
• ISs must ensure data security and system reliability to maintain user trust and
operational continuity.
Example: Encryption, firewalls, and backup systems are implemented to protect
sensitive data and ensure system availability.

10 CS 130
Practical Applications of Systems Theory in IS
Systems theory provides a powerful framework for working with Information Systems (IS) by
emphasizing holistic understanding and component interactions. In system design, this theory
guides the effective integration of hardware, software, data, people, and processes, ensuring all
elements work cohesively to meet organizational objectives. Rather than treating these
components in isolation, systems theory enables designers to create architectures where each
part contributes to the overall functionality and goals of the system.
When issues arise, systems theory proves invaluable for troubleshooting. IT professionals can
diagnose problems more effectively by analyzing how components interact, rather than
examining parts individually. For example, a performance bottleneck might stem not from a
single piece of hardware, but from the interplay between database structures, network
configurations, and user behavior patterns. This systemic perspective leads to more accurate
problem identification and sustainable solutions.
Beyond problem-solving, systems theory drives continuous optimization of Information
Systems. By examining workflows, data flows, and feedback loops, organizations can identify
inefficiencies and opportunities for improvement. A systemic view might reveal, for instance,
that automating a manual process between two departments could enhance throughput while
reducing errors. Such optimizations are only possible when the IS is understood as an
interconnected whole, where changes to one element may impact others in predictable ways.

Organization and Functions of Data Processing Departments &


Modern shifts
The organization and functions of a traditional data processing department have evolved
significantly with advancements in technology and shifts in business needs. Historically, these
departments were structured around centralized, manual processes, with distinct divisions
handling specific tasks such as data entry, system operations, and database management.
However, the rise of modern information systems (IS) has transformed these functions,
introducing automation, cloud computing, and AI-driven solutions. This table outlines the key
divisions of a traditional data processing department, their traditional functions, and the
corresponding shifts in modern IS practices. It highlights how technological innovations have
redefined roles, improved efficiency, and enabled organizations to leverage data in more
dynamic and impactful ways.

Division Traditional Function Modern IS Shift

Collecting, inputting, verifying, and AI-powered automation, real-time


Data Entry &
storing data manually or through basic data processing, and robotic process
Processing
systems. automation (RPA).

11 CS 130
Division Traditional Function Modern IS Shift

Cloud computing, automated


Operations Running batch jobs, monitoring
monitoring tools, and DevOps
(Computer mainframes, and ensuring system
practices for continuous
Operations) uptime.
integration/deployment.

Agile development, cloud-based


Designing, developing, and SaaS solutions (e.g., Salesforce),
Systems
maintaining in-house software and low-code/no-code
Development
applications. platforms (e.g., Microsoft Power
Apps).

Big Data technologies, distributed


Database Managing databases, backups, and databases (e.g., NoSQL), and cloud
Administration ensuring data security and integrity. storage solutions (e.g., AWS S3,
Azure Blob Storage).

IoT integration, 5G networks,


Ensuring system connectivity and
Networking & and decentralized networks with
secure data transfer between
Communication cloud-based collaboration tools (e.g.,
departments.
Microsoft Teams, Slack).

AI-driven analytics, digital


Systems
Evaluating business requirements and transformation strategies, and user-
Analysis &
creating system specifications. centric design approaches (e.g.,
Design
UX/UI design).

Advanced cybersecurity
frameworks (e.g., Zero
Security & Ensuring data integrity, access control,
Trust), GDPR/ISO compliance,
Compliance and regulatory compliance.
and AI-based threat detection
systems.

AI chatbots (e.g., Zendesk), self-


Assisting employees with system-
User Support & service portals, remote IT support
related issues and providing in-person
Training systems, and e-learning platforms for
training.
training.

Business
Real-time dashboards, predictive
Intelligence Generating static reports and basic
analytics, and AI-driven
(BI) & Data data analysis.
insights (e.g., Tableau, Power BI).
Analytics

12 CS 130
Object Oriented Systems
Object-Oriented Programming (OOP) is a programming paradigm that structures software
design around objects rather than functions and logic. It emphasizes four key principles:
encapsulation, inheritance, polymorphism, and abstraction.

Key Concepts of OOP


A class serves as a blueprint or template for creating objects. For example, a Car class defines
what a car is and what it can do. An object is a specific instance of a class, such as a red SUV
or a blue sedan. Objects have attributes, which are properties that describe them, like color,
model, and speed for a Car class. Additionally, objects perform actions through methods,
which define their behavior, such as accelerate() and brake().

Introduction to UML
UML is a standardized visual language for modeling software systems, using diagrams to
represent both structure (like classes and objects) and behavior (like interactions and
processes). It helps teams visualize, design, and document systems clearly before coding,
ensuring better communication between stakeholders and developers. Key diagrams include
class diagrams (system structure), use case diagrams (user requirements), sequence diagrams
(object interactions over time), and state diagrams (behavior changes). UML simplifies
complexity and serves as a blueprint throughout the software development lifecycle.

Class Diagrams
A class diagram is a visual representation of a system’s structure using classes, their attributes,
methods, and relationships. It is useful in designing and understanding object-oriented systems.
A class diagram consists of a class box, which is divided into three sections:
• Class Name: The top section (e.g., Car).
• Attributes: The middle section, listing properties such as color: String and model:
String.
• Methods: The bottom section, containing behaviors like accelerate() and brake().
Class diagrams also illustrate relationships between classes:
• Inheritance: Represents a hierarchical relationship, where a Car is a type of Vehicle.
• Association: Shows a connection between two classes, such as a Car having an Engine.
• Aggregation/Composition: Represents a whole-part relationship, such as a Library
containing Books.

13 CS 130
Class Responsibility Collaborator (CRC) Cards
CRC cards are a simple design tool used for brainstorming and organizing classes, their
responsibilities, and collaborations. Each card represents a class and contains three key
elements:
• Class Name: Identifies the class.
• Responsibilities: Lists the actions or methods the class performs.
• Collaborators: Indicates other classes the class interacts with.
CRC cards help in the initial stages of system design by ensuring that responsibilities are clearly
defined and relationships between classes are well-structured.

Object Diagrams
An object diagram provides a snapshot of the system at a specific point in time, displaying
objects and their relationships. Unlike class diagrams, which focus on general structures, object
diagrams emphasize specific instances of classes.
An object diagram includes an object box, which follows the format objectName: ClassName
(e.g., myCar: Car). It also shows attributes, representing the object's current state, such as
color = red and model = SUV. Additionally, links between objects illustrate relationships,
similar to associations in class diagrams.

Use case diagrams


Use case diagrams are a fundamental tool in object-oriented analysis and design that visually
represent how users (actors) interact with a system. They capture the functional requirements
of a system by showing:
1. Actors (users, external systems, or devices)
2. Use cases (specific functionalities or goals the system provides)
3. Relationships between them
These diagrams focus on what the system should do from the user’s perspective, without diving
into technical details. For example, in a library system, key use cases might include "Borrow
Book", "Return Book", and "Search Catalog". Use case diagrams are typically created early in
the SDLC (during requirements gathering) to align stakeholders and guide subsequent design.

Collaboration diagrams
Collaboration diagrams (also called communication diagrams) are UML interaction diagrams
that show how objects work together to achieve a specific task or use case. They focus on:

14 CS 130
1. Objects (instances of classes) and their roles
2. Messages (method calls) exchanged between objects
3. The sequence of interactions (numbered to indicate order)

Unlike sequence diagrams, collaboration diagrams emphasize object relationships and


structure rather than strict timing. For example, in a library system, a collaboration diagram
could illustrate how a `Student` object sends a `borrow()` request to a `Book` object, which
then interacts with a `Library` object to complete the transaction. These diagrams are created
during design to refine object interactions after class diagrams are established.

Sequence diagrams
Sequence diagrams are UML interaction diagrams that visualize how objects communicate
over time to achieve a specific scenario. They emphasize:
1. Lifelines (objects participating in the interaction)
2. Messages (method calls) shown as arrows between lifelines
3. Time flow (vertical axis) to clarify the exact order of operations

For example, in an ATM withdrawal scenario, a sequence diagram would show:


1. A `CardReader` object sending an authenticate() message to a `BankServer`
2. The `BankServer` responding with a success/failure message
3. A `CashDispenser` object releasing money upon approval

Created after collaboration diagrams, sequence diagrams add precision to timing-critical


processes.

State diagrams
State diagrams (or state machines) model how an object's behavior changes based on its internal
state. They capture:
1. States (e.g., `Idle`, `Processing`, `Locked`)
2. Transitions (triggered by events, like timeouts or user actions)
3. Actions (e.g., "on entry/exit" behaviors)
For instance, a `TrafficLight` object’s state diagram would cycle through:
`Green → (timer expires) → Yellow → (timer expires) → Red`

15 CS 130
Used late in design, state diagrams clarify complex, state-dependent logic (e.g., UI flows,
device controllers).

Programming paradigms
What is a Programming Paradigm?
A programming paradigm is a way of organizing and structuring code based on specific
principles and problem-solving approaches. Different paradigms exist because they are suited
to different types of problems. As technology evolves, new paradigms emerge to improve
efficiency and flexibility in programming. Additionally, programming is a creative field where
developers refine and adapt methods, leading to various paradigms that offer different ways to
design and write code.

What a Programming Paradigm is Not


Programming paradigms are not programming languages or tools. They do not directly build
anything but instead serve as guiding principles for writing code. Some languages are designed
with a specific paradigm in mind, while others allow multiple paradigms. For example, Haskell
follows the functional paradigm strictly, while Python and JavaScript support both functional
and object-oriented programming.
Languages like C and PHP also demonstrate how paradigms work in practice. C is primarily
procedural, focusing on step-by-step instructions and structured programming. However, it also
allows some low-level flexibility that is useful for system programming. PHP, on the other
hand, started as a procedural language but later incorporated object-oriented features, making
it a multi-paradigm language.
Moreover, paradigms are not strictly separate. Developers often mix concepts from different
paradigms within the same program to create more efficient solutions. Ultimately,
programming paradigms offer different approaches to structuring and solving problems,
helping developers write better code based on their needs.

Imperative Programming
Imperative programming is a style where we give the computer step-by-step instructions on
what to do and in what order. It focuses on how a task is performed by explicitly defining each
step.
For example, if we were baking a cake using an imperative approach, our instructions might
be:
1. Add flour to a bowl.

16 CS 130
2. Add eggs and milk.
3. Mix the ingredients.
4. Pour into a mold.
5. Bake for 35 minutes.
6. Let it cool.
Each step is clearly defined, just like in imperative programming.
In programming, suppose we want to filter a list to keep only numbers greater than 5. Using
pseudo-code, an imperative approach would look like this:

nums = [1, 4, 3, 6, 7, 8, 9, 2]
result = []

FOR each num IN nums DO


IF num > 5 THEN
ADD num TO result
END IF
END FOR

PRINT result // Output: [6, 7, 8, 9]

Here, we explicitly tell the program to loop through the list, check if each number is greater
than 5, and store the valid numbers in a new list. This step-by-step control is what defines
imperative programming.

Procedural Programming
Procedural programming is a type of imperative programming that organizes code into reusable
functions (also called procedures or subroutines). This approach improves modularity and
makes programs easier to read and maintain.
Using our cake example, procedural programming would divide the steps into functions:
FUNCTION pourIngredients()
- Add flour to a bowl
- Add eggs and milk
END FUNCTION

FUNCTION mixAndTransferToMold()
- Mix the ingredients
- Pour the mixture into a mold
END FUNCTION

FUNCTION cookAndLetChill()

17 CS 130
- Bake for 35 minutes
- Let cool
END FUNCTION

pourIngredients()
mixAndTransferToMold()
cookAndLetChill()

Here, instead of listing every step in a long sequence, we organize tasks into separate functions.
By just looking at the function calls at the end, we get a clear idea of what the program does
without needing to read every detail.
Procedural programming still follows an imperative approach, but it improves structure and
reusability by breaking tasks into smaller, more manageable parts.

Functional Programming
Functional programming builds on the concept of functions but takes it further by treating
functions as first-class citizens. This means functions can be assigned to variables, passed as
arguments, and returned from other functions.
A key principle in functional programming is the use of pure functions. A pure function:
• Depends only on its inputs.
• Always produces the same output for the same input.
• Does not cause side effects (i.e., it doesn’t modify anything outside its scope).
This approach improves modularity, makes code easier to maintain, and helps separate
responsibilities within a program.
Consider the problem of filtering numbers greater than 5. An imperative approach might use
an external variable, causing a side effect:
nums = [1, 4, 3, 6, 7, 8, 9, 2]
result = [] // External variable

FOR each num IN nums DO


IF num > 5 THEN
ADD num TO result
END IF
END FOR

PRINT result // Output: [6, 7, 8, 9]


In functional programming, we avoid modifying external variables by keeping all logic inside a function:
nums = [1, 4, 3, 6, 7, 8, 9, 2]

FUNCTION filterNums(numbers)
result = [] // Internal variable

18 CS 130
FOR each num IN numbers DO
IF num > 5 THEN
ADD num TO result
END IF
END FOR

RETURN result
END FUNCTION

PRINT filterNums(nums) // Output: [6, 7, 8, 9]

Here, the function filterNums does not modify any global variables. It takes an input, processes
it, and returns a new result without affecting anything outside its scope. This makes functional
programming more predictable, reducing unintended side effects and improving code
maintainability.

Declarative Programming
Declarative programming focuses on describing what the program should do rather than how
to do it. It hides complexity and makes code more readable by bringing it closer to human
thinking. Unlike imperative programming, where we give step-by-step instructions, declarative
programming lets us specify the desired outcome without detailing the process.
For example, if we want to filter numbers greater than 5, an imperative approach would require
looping through the array and storing values manually. A declarative approach simplifies this:

nums = [1, 4, 3, 6, 7, 8, 9, 2]
PRINT FILTER(nums, num => num > 5) // Output: [6, 7, 8, 9]

Here, we don’t write a loop or manage an extra array. We just declare that we want to "filter"
numbers based on a condition, and the system handles the logic internally. Even though
declarative code looks simple, the computer still processes it using imperative instructions
internally. Declarative programming just hides that complexity, making code easier to read,
write, and maintain.

Object-Oriented Programming (OOP)


Object-Oriented Programming (OOP) is a programming paradigm where we organize code into
objects that represent real-world entities. Each object combines data (properties) and methods
(actions) that operate on that data.

19 CS 130
In OOP, we define classes as blueprints for creating objects. Each object is an instance of a
class. The idea is to separate different concerns into distinct objects, each responsible for certain
tasks.
Let's consider our bakery example again, with a main cook (Frank) and an assistant cook
(Anthony), but this time we’ll simplify the example by omitting constructors.

CLASS Cook
METHOD mixAndBake()
- Mix the ingredients
- Pour the mix in a mold
- Cook for 35 minutes
END METHOD
END CLASS

CLASS AssistantCook
METHOD pourIngredients()
- Pour flour in a bowl
- Pour a couple eggs in the same bowl
- Pour some milk in the same bowl
END METHOD

METHOD chillTheCake()
- Let chill
END METHOD
END CLASS

// Create instances of the classes (objects)


Frank = NEW Cook
Anthony = NEW AssistantCook

// Call methods for each object


Anthony.pourIngredients()
Frank.mixAndBake()
Anthony.chillTheCake()

In this example, we have two classes: Cook and AssistantCook. Each class defines methods for
specific tasks like mixing, baking, and pouring ingredients. We create instances of each class
(Frank and Anthony) and call the appropriate methods for each one.
By using OOP, we separate responsibilities into objects, making the code easier to understand
and maintain.

Design Paradigms
A design paradigm refers to a general approach or methodology used to structure and organize
software design. It provides guidelines for solving problems and building systems by focusing

20 CS 130
on specific principles, patterns, and practices. Different design paradigms can influence the
architecture, development process, and overall structure of a software system.
One example of a design paradigm is MVC (Model-View-Controller). This design pattern is
commonly used to separate the concerns of an application into three interconnected
components:
• Model: Represents the data and business logic of the application.
• View: The user interface that displays data from the model.
• Controller: Handles user input, updates the model, and passes data to the view.

We will explore MVC and other design paradigms in more detail in a later chapter, where we
will delve into how these paradigms shape the design and development of software systems.

The Relationship Between SDLC and UML


The Software Development Life Cycle (SDLC) and Unified Modeling Language (UML) share
a symbiotic relationship, where UML serves as the visual and structural foundation that guides,
documents, and refines each phase of the SDLC. UML diagrams are not merely artifacts but
active tools that bridge the gap between abstract requirements and concrete implementation.
They provide clarity during design, ensure consistency during development, and facilitate
troubleshooting during maintenance. By aligning specific UML diagrams with corresponding
SDLC phases, teams can systematically translate stakeholder needs into functional software
while minimizing ambiguity and technical debt.

Figure 1 - UML diagrams & SDLC phases the map to

Use Case Diagrams


Use case diagrams are primarily employed during the planning phase to capture high-level user
requirements and define the system’s functional scope. They help stakeholders align on what

21 CS 130
the system should accomplish by illustrating interactions between actors and key
functionalities. During system design, these diagrams are refined to specify detailed
workflows, ensuring all user scenarios are accounted for before development begins. In
maintenance, use case diagrams are revisited when extending or modifying system features,
such as adding new user roles or updating existing processes to meet evolving business needs.
Their role in clarifying system boundaries makes them essential for both initial design and
future adaptations.
Class Diagrams
Class diagrams serve as the structural backbone of the system and are central to the system
design phase. They define the relationships between classes, their attributes, and methods,
providing developers with a blueprint for implementation. During implementation, these
diagrams guide the actual coding process, ensuring classes are correctly instantiated and
interact as intended. In maintenance, class diagrams are critical for refactoring or extending the
system such as introducing new subclasses or modifying existing hierarchies while maintaining
consistency with the original design. Their ability to represent the system’s architecture makes
them indispensable for long-term scalability.
Object Diagrams
Object diagrams are used during implementation to validate that runtime object instances
adhere to the structure defined by class diagrams. They provide a snapshot of the system’s state
at a specific moment, helping developers debug issues related to object initialization or attribute
values. In maintenance, these diagrams assist in diagnosing runtime problems, such as
unexpected null references or incorrect object relationships, by comparing actual instances
against expected configurations. While less commonly maintained long-term, their utility in
troubleshooting makes them valuable during both development and post-deployment fixes.
Sequence Diagrams
Sequence diagrams are crucial in system design for modeling time-sensitive interactions
between objects, such as API calls or user workflows. They ensure that critical processes, like
authentication or transaction sequences, are logically sound before coding begins. During
testing, these diagrams serve as a reference to verify that messages between objects occur in
the correct order and with the expected inputs/outputs. In maintenance, they help trace failures
in production by isolating where a process breaks down—for example, identifying a missing
response in a payment gateway integration. Their focus on temporal logic makes them vital for
debugging complex interactions.
Collaboration Diagrams
Collaboration diagrams emphasize object relationships rather than strict timing, making them
particularly useful during system design to visualize how components collaborate to achieve a
use case. They complement sequence diagrams by highlighting structural dependencies, such
as which objects are responsible for specific tasks. In testing, collaboration diagrams validate
whether objects interact as intended, exposing flaws like circular dependencies or missing
links. During maintenance, they aid in resolving issues where objects fail to communicate

22 CS 130
correctly after updates for instance, when a new module disrupts existing collaborations. Their
structural perspective ensures robust system integration.
State Diagrams
State diagrams are employed in system design to define behavior tied to an object’s internal
state, such as a user account’s lifecycle (e.g., active, locked, or inactive). They clarify
transitions triggered by events, ensuring all edge cases are considered upfront. In testing, these
diagrams validate whether objects transition between states correctly for example, confirming
that a failed login attempt increments a counter and eventually locks the account. During
maintenance, state diagrams are updated to address bugs like stuck states or unintended
transitions, often caused by new requirements or patches. Their precision in modeling stateful
logic is key to maintaining system reliability.
Why Some Phases Are Unmarked
Feasibility analysis focuses on technical and financial viability, not design specifics, so UML
diagrams are irrelevant at this stage. Deployment involves infrastructure and release
management, which are operational tasks rather than design concerns. Testing is only mapped
to dynamic diagrams (sequence, collaboration, state) because they model behavior that can be
directly validated against test cases. Static diagrams (class, object) are not tested but serve as
references for testers. This selective mapping ensures each diagram’s use aligns with its
strengths in the SDLC.
Maintenance: A Living Process
Unlike other phases, maintenance is iterative and relies on most of the UML diagrams.
Diagrams are updated to reflect changes, acting as documentation for future developers. For
example, a new feature might require updates to use cases, class structures, and state logic
simultaneously. This ongoing use prevents documentation drift and ensures the system’s design
remains accurate throughout its lifecycle.

Types of software development


• Frontend development - Focuses on creating the user interface (UI) and user
experience (UX) of websites or applications using technologies like HTML, CSS, and
JavaScript.

• Backend development - Handles the server-side logic, databases, and application


functionality, ensuring smooth communication between the server, database, and
frontend.

• Full stack Development - Combines both frontend and backend development,


enabling developers to build and manage the entire application, from UI to server-side
processes.

23 CS 130
• API Development - Involves designing and implementing application programming
interfaces (APIs) that allow different software systems to communicate with each
other.

• Mobile App Development - Focuses on creating applications for mobile devices,


typically using platforms like iOS, Android, or cross-platform frameworks.

• Video Game Development - Centers on creating games for various platforms,


involving game design, programming, graphics, and audio integration.

• Database Development - Specializes in designing, implementing, and maintaining


databases to store and organize data efficiently for software systems.

• Web App Development - Involves building applications that run in web browsers,
often combining frontend, backend, and API development to create interactive and
dynamic online tools.

Software Development & Modelling Tools


Software development tools are essential for writing, testing, debugging, and managing
code efficiently. These tools range from lightweight code editors to full-featured
Integrated Development Environments (IDEs) and extensions that enhance
productivity. Below is an in- depth look at the tools developers use daily.

• Code editors
Code editors are lightweight tools designed for writing and editing code. They
are fast, customizable, and often support multiple programming languages. Eg
VsCode, atom, sublime text.

• Integrated development environments (IDEs)


IDEs are feature-rich environments that provide tools for coding, debugging,
testing, and deploying applications. They are tailored for specific
programming languages or frameworks. Eg PHP Storm, IntelliJ IDEA (java),
Pycharm (python).

• Extensions and plugins


Extensions and plugins enhance the functionality of code editors and IDEs,
making them more powerful and tailored to specific workflows. VS Code’s
prettier, CLINE extensions.

• Version Control Systems


Help developers track and manage changes to codebases, enabling collaboration
and rollback to previous versions if needed. Eg git, git bucket.

24 CS 130
• Testing tools
Facilitate automated and manual testing of software to ensure it meets quality
standards. Tools range from unit testing to performance testing frameworks.
E.g. Selenium, Postman, PHPUnit

• Collaboration and project management


Help teams plan, track, and manage software projects collaboratively. These
tools ensure efficient communication and task allocation. E.g. Jira, Trello,
Slack.

• Database Management Tools


Enable developers to design, query, and manage databases effectively. E.g.
Xampp, MongoDB compass, MySQL workbench.

• UML and diagramming


Used for designing and visualizing system architecture, workflows, and data
structures before coding. For instance for UML the tools available include
Lucidchart, PlantUML, StartUML and then for diagramming we have tools like
Draw.io and Miro

25 CS 130
Study Questions

1. A customer relationship management (CRM) system analyzes customer


purchase behavior and automatically sends personalized discount offers to
customers who abandon their shopping carts. Is this an example of a feedback
mechanism? Why or why not?

2. A university’s online learning management system (LMS) allows students to


submit assignments and access course materials. However, the LMS does not
allow external users (e.g., non-students) to access its resources. Is this system
an open system or a closed system? Justify your answer.

3. A company uses a standalone inventory management system that operates


without internet connectivity and does not interact with external systems.
However, the company plans to integrate this system with an online e-
commerce platform to automate stock updates.
a) Classify the current inventory system and the planned integrated
system as open or closed systems. Justify your answer.
b) Discuss two potential challenges the company might face during the
integration process and how systems theory can help address them.
4. An organization implemented a new Customer Relationship Management
(CRM) system but is facing issues with user adoption and data accuracy.
a) Identify which component(s) of the Information System might be causing
these issues.
b) Propose specific solutions to address the problems, ensuring all components
work together effectively.

5. A developer writes pseudo-code to filter a list of temperatures to find values


above 30°C.

Approach 1 (Imperative)
temperatures = [25, 31, 29, 33, 28]
hot_days = []

FOR EACH temp IN temperatures DO


IF temp > 30 THEN
ADD temp TO hot_days
END IF
END FOR

PRINT hot_days // Output: [31, 33]

26 CS 130
Approach 2 (Declarative)
temperatures = [25, 31, 29, 33, 28]
PRINT FILTER temperatures WHERE temp > 30 // Output: [31, 33]

a) Identify the paradigm for each approach.


b) Explain one advantage of the declarative approach in terms of code
maintenance.

6. A team uses UML modeling tools (e.g., Lucidchart) to design a hospital


appointment system.

a) Name two UML diagrams that would help:


• Clarify user interactions with the system.
• Define relationships between Doctor, Patient, and Appointment classes.

b) How would these diagrams reduce misunderstandings between non-


technical stakeholders and developers?

7. A mid-sized e-commerce company must decide between:


• Hiring an in-house system analyst to optimize workflows and liaise
with stakeholders.
• Outsourcing software engineers to build features for their platform.
a) Argue why the company might prioritize the system analyst for in-house
roles.
b) Explain one risk of outsourcing software engineers without an in-house
system analyst.
c) How might systems theory justify this decision?

27 CS 130

You might also like