Software development Flashcards
What are Variables in Programming?
Variables are named storage locations in memory that can hold different values throughout the execution of a program.
What are the Main Types of Data?
Numeric (Integer, Real), Character (Single characters, Strings), Logical (Boolean: True/False).
What is the Difference Between Variables and Constants?
Variables can change value during program execution, while constants cannot.
How Do You Name Variables and Constants?
Names must start with a letter or underscore, cannot contain spaces, and can include letters, digits, and special characters.
What are Arithmetic Operators in Programming?
(Addition), - (Subtraction), * (Multiplication), / (Division), % (Modulus).
What is the Purpose of Logical Operators?
To perform logical operations, returning TRUE or FALSE based on the evaluation of conditions.
What are the Three Main Control Constructs in Programming?
Sequence, Selection, Iteration.
What is Structured Programming?
A programming paradigm aimed at improving clarity, quality, and development time by using subroutines, block structures, and for and while loops.
How Do You Implement Loop Structures?
Using “for” for count-controlled loops, “while” and “do-while” for condition-controlled loops.
What is the Significance of Functions in Programming?
Functions allow for code reuse, modular programming, and simplified code.
What is the Sequence control structure in programming?
Sequence is the default control structure that executes code statements one after another in the order they are written. It’s the linear progression of tasks, ensuring each statement is run from top to bottom without any conditions or loops altering the flow.
What is the Selection control structure in programming?
Selection, also known as decision-making, involves choosing between two or more paths in a program based on conditions. It is implemented using if-else statements or switch cases, allowing the program to execute different blocks of code based on specific conditions.
What is the Iteration control structure in programming?
Iteration, or looping, repeats a block of code multiple times until a specified condition is met. Common iteration structures include for loops, while loops, and do-while loops. They are used to perform repetitive tasks efficiently within a program.
What is a function in programming?
A function is a reusable block of code designed to perform a specific task. Functions are defined by a unique name and can be called from other parts of a program. They can accept inputs (parameters), perform operations, and return an output (result).
What does parameter passing mean in the context of functions?
Parameter passing refers to the process of providing inputs to a function when it is called. These inputs, known as parameters or arguments, are used by the function to perform its task. Parameters can be passed by value, where a copy of the data is used, or by reference, where the actual data is used, allowing the function to modify the original value.
What are return values in functions?
Return values are the outcomes produced by a function. After executing its operations, a function can return a value back to the part of the program that called it. This allows the program to use the result of the function’s operations in further computations or actions.
What is the purpose of software testing?
The purpose of software testing is to execute programs with the intention of finding errors. A good test case is one that has a high probability of discovering an as yet undiscovered error, aiming to make the program fail to identify weaknesses.
What are the three basic categories of program errors identified during testing?
The three basic categories of program errors are:
Syntax Errors: Mistakes in the code that violate the rules of the programming language, usually detected by the compiler.
Run-time Errors: Errors that occur during the execution of the program, such as division by zero or accessing invalid memory locations.
Logic Errors/Flaws: Errors in the logic of the program that cause it to produce incorrect results or behave in unintended ways.
What are the two main approaches to software testing, and how do they differ?
The two main approaches to software testing are:
Black Box Testing: Focuses on testing the functionality of the software without any knowledge of the internal workings of the application. It’s based on the specifications and requirements of the software.
White Box Testing: Involves testing the internal structures or workings of an application, as opposed to its functionality. It requires knowledge of the source code and is used to test pathways through the code and the logic.
What are the Stages of development?
Waterfall model:
Analysis
Design
Implementation
Testing
Documentation
Evaluation
Maintenance
What are aims of good programming?
Efficiency – perform at reasonable speed and without wasting limited resources
Reliability and robustness – cope with foreseeable problems – eg leap years, printer unavailable
Maintainability – simple and easy to understand for those who will have to make changes in future
Portability – program can be moved onto different hardware platforms without difficulty
What are some development techniques in software?
Structured / modular
-Break big systems down into manageable chunks
-Easier testing
-Allows team working
-Encourages recycling of code
Event driven
-Program execution is controlled by the user (not by the programmer)
-Each mouse click triggers an event
OOP – Object Oriented -Programming
-Each object is a mix of data plus the actions possible with that data
-Limits what can be done -with the data to avoid misuse by others
-Encourages recycling of code
WHat is data
Something that can be inputted into a process to give an output of information
What is a variable
Data that can be changed each time a program is executed
A variable could be defined as what?
An area of memory that has a unique name and a value contained within it
What are common techniques used in white box testing?
Common techniques include statement coverage, decision coverage, path coverage, and unit testing. These techniques ensure that various parts of the application’s code are executed to test logical paths and integrate different parts of the application.