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

Programming Assign1

An algorithm is a set of instructions that takes input, processes it, and produces output to solve a problem. There are many types including search, encryption, sorting, and divide and conquer algorithms. Algorithms are used in machine learning and AI. Software testing evaluates a product for bugs/issues. Its objectives are to identify errors, deliver quality, prevent future defects, and ensure agreements are met. A data flow diagram (DFD) is a visual representation of information flow in a process or system using standard symbols. DFDs help analyze and improve efficiency, communicate understanding, and support development and improvements. They are useful for requirements, design, and planning in early software development stages.

Uploaded by

classicyobra17
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)
30 views

Programming Assign1

An algorithm is a set of instructions that takes input, processes it, and produces output to solve a problem. There are many types including search, encryption, sorting, and divide and conquer algorithms. Algorithms are used in machine learning and AI. Software testing evaluates a product for bugs/issues. Its objectives are to identify errors, deliver quality, prevent future defects, and ensure agreements are met. A data flow diagram (DFD) is a visual representation of information flow in a process or system using standard symbols. DFDs help analyze and improve efficiency, communicate understanding, and support development and improvements. They are useful for requirements, design, and planning in early software development stages.

Uploaded by

classicyobra17
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/ 2

BRIAN MURIUKI MURIUNGI

CIT-223-051/2023
INTRODUCTION TO PROGRAMMING

Q1. Discuss algorithm in programming.


An algorithm is a finite set of instructions carried out in a specific order to perform a
particular task.
It is a set of commands that must be followed for a computer to perform calculations or other
problem-solving operations.
Algorithms take input data, process the data through a series of logical and mathematical
operations and then produce an output which could be a result, decision or some other
meaningful information.
There are several types of algorithms:
1.Search engine algorithm - Takes input, searches its associated database for relevant
webpages and returns results.
2. Encryption algorithm -Transforms data according to specified actions to protect it,
ensuring confidentiality and privacy.
3.Recursive algorithm -Method that breaks a problem into smaller, similar sub-problems and
repeatedly applies itself to solve them until reaching a base case, making it effective for tasks
with recursive
structures.
4.Backtracking algorithm -This algorithm finds a solution to a given problem in incremental
approaches and solves it one piece at a time.
5.Brute-force algorithm -This algorithm iterates all possible solutions to a problem blindly,
searching for one or more solutions to a function.
6.Sorting algorithm -Aimed at arranging elements in a specific order, like numerical or
alphabetical, to enhance data organization and retrieval.
7.Divide and conquer algorithm -Breaks a complex problem into smaller sub-problems,
solves them independently, and then combines their solutions to address the original problem
effectively.
8.Greedy algorithm -Breaks a complex problem into smaller subproblems, solves them
independently, and then combines their solutions to address the original problem effectively.
9.Dynamic programming algorithm -This algorithm solves problems by dividing them into
sub-problems. The results are then stored to be applied to future corresponding problems.
10.Hashing algorithm -This algorithm takes data and converts it into a uniform message with
a hashing.
11.Randomized algorithm -This algorithm reduces running times and time-based
complexities. It uses random elements as part of its logic.

Algorithms are used in machine learning and artificial intelligence.

Q2. What is software testing and what are the objectives of software
testing?
Software testing is the process of evaluating the software product for identifying bugs/issues
in the product.
Its objectives include:
1.Identification of bugs and errors.
Once the developer finishes coding, the tester starts testing. They then collect all the errors &
bugs and forward them to the developer to fix.
2.Delivering quality product
The main aim of testing is to maintain the quality of the product. A high quality product with
minimum defects gains a customer’s confidence.
3.To prevent future defects from occurring.
4.To ensure that the end product delivered meets all kinds of business and user agreements.

Q3. Discuss the Data Flow Diagrams(DFD) as a software


development tool
A data flow diagram (DFD) is a visual representation of the information flow through a
process or system.
DFDs help you better understand process or system operations to discover potential
problems, improve efficiency, and develop better processes.
DFDs use a set of standard symbols and notations to represent the components and
interactions of a system. Some of the common symbols are:
 External entity: A source or destination of data outside the system. Represented by a
rectangle with a label. Help in defining system boundaries and interfaces.
 Process: An operation that transforms data within the system. Represented by a circle
or a rounded rectangle with a label.
 Data store: A place where data is stored for later use, such as a database or a file.
Represented by an open-ended rectangle with a label.
 Data flow: A movement of data between entities, processes, or data stores.
Represented by an arrow with a label. Help to understand data transformation in the
system.

DFDs can provide a focused approach to technical development in which more research is
done up front to get to coding.
DFDs facilitate communication between system users enabling common understanding of the
system’s data flow and functionality.
DFD provides cost-effective documentation that can be used to support computer programs,
framework upgrades, and future improvement efforts.
They serve as a reference point for understanding the information flow and engineering of the
system.
DFDs can also help in identifying bugs and errors in the system design.
They are especially useful in early stages of software development for requirements analysis,
system design and architectural planning.

You might also like