Software Design Flashcards
State the names of the two types of design methodologies that we can use for Software design?
- The iterative model
- The agile model
Explain the stages of development in the iterative model?
- Analysis, where the clients will be consulted about the functional and end user requirements of the software being produced, often carried out by a person called a systems manager
- Design, where a team of programmers will begin to plan out how this program will be developed.
- Implementation, teams of programmers will work together to produce the program required
- Testing, several methods will be used to test the program and ensure that it does not break down
- Evaluation, the software developers will ensure that the product that they have produced meets all of the functional and end user requirements that were asked of it.
- Documentation
- Iteration will be required in most development processes as this step requires revisiting previous steps to fix any errors that arise.
Write some notes of how the agile and iterative models compare?
- The agile model is more flexible that the iterative model, this is because the agile model breaks down the production of the software into several smaller chunks that we call sprints.
- There is no testing stage in the agile development methodology as testing is completed as you go through the production of your program
- In agile development methodologies teams would be closely integrated, meaning that people with different skill sets would work together. In the iterative model teams of people with similar skill sets would be placed in a team and tasked with completing a stage of the process. Whereas on the other hand an agile model would place people with different skills in the same team and expect them to work closely together with rapid communication to finish a sprint.
- The iterative model depends heavily on the analysis stage, the iterative model does not have as much client involvement in the development of the software, the client will only really be involved in the analysis and the evaluation stages, whereas in the agile development methodologies the client is involved throughout the production of the entire software. This frequent client feedback from the agile methodology can help shape the project and help to ensure that the client is more satisfied with the end product that is given to them. This frequent communication can also help to prevent misunderstandings about the software which would otherwise be costly to fix.
- Iterative model relies entirely on one large document produced as a part of the model whereas the agile development methodology has a strong focus on reducing the amount of documentation that needs to be done surrounding the software’s production.
- Agile methodologies prioritise the completion of the software as individual features of the software are tested, evaluated and reviewed by the client. Compared to the iterative model that prefers to not hand over the software for evaluation until it has been completed.
State what is meant by a sprint in reference to the agile development methodology?
Sprints are a way of producing a program step by step by rapidly undergoing stages of design, implementation, and testing as the program is produced.
State the three things that are outlined in the analysis stage of the iterative model?
- Functional requirements
- Boundaries
- Scope
State what is meant by the functional requirements of the website?
The functional requirements cover in inputs, processes, and outputs that the software must be able to produce
Explain what is meant by the purpose of a program?
The SQA says that purpose is a general description of a program, it can be helpful if you are asked this to go through the inputs processes and outputs (functional requirements) of the program and summarise briefly how the program would work
State what is meant by the scope of a program?
The scope of a program is a list of deliverables that the programmers must be able to hand over to the clients
- Design documents
- Completed program
- Test planning
- Testing results
- Evaluation report of the program
State what is meant by boundaries?
Boundaries are the limits of what a program does and does not do, these include assumptions that you have made about what the program involves.
Explain some of the benefits of using modular programing?
- Modular programing allows multiple programmers to be working on the same section of code without causing errors
- Modular programing also allows programmers to produce the program in segments where modules can contain individual features of the larger program. This allows modules to be tested independently allowing for errors to be identified more easily
- Areas in one module of the program do not cause errors in other modules in the program with modular programing.
- Modular programing uses local variables which are preferred as they are said to be modular meaning that they help to prevent values of variables changing that have been given the same name since they can only be used in that module.
State what is meant by Data flow?
data flow is what occurs when data is passed between modules
Explain what are some of the rules about what is and isn’t data flow?
Data flow includes data that has been passed into or out of a module, this can be individual variables or entire arrays.
- Inputs and outputs of a program are not data flow
- Reading from or writing to a file is not considered data flow unless the data is being passed from one module to another.
Describe how you would answer a describe the user interface question?
To do this you would draw a sketch of any reasonable program that would meet the functional requirements outlined in the question, meaning that the design would need to feature the appropriate inputs and outputs required of it.
State the names of the different data types that you will need to know about?
- Character
- String
- Integer
- Real
- Boolean
State the names of the two data structures that you need to know at higher?
- Parallel arrays
- array of Records
State the names of the four different standard algorithms that you need to know about for higher?
- Find Min
- Find Max
- Count occurrences
- Linear search
Give two examples of programing constructs?
- File handling
- Modular programming
Describe how you would set up parallel arrays using variables of temperature and time?
Temperature = []
Time = []
Data would be entered in order so that the temperature array corresponds with the time array. Parallel arrays are simply arrays that store related information.
Describe how you would create a record that would store the name, age and house of a pupil?
DECLARE pupil as RECORD (STRING: name, REAL: age, STRING: house)
Describe how you would create an array of records for a pre existing record called pupil?
DECLARE pupils AS ARRAY of pupil * (number of pupils)
What are we able to do with the programing construct of file handling?
- Read data from a file
- Write data to a file from a variable or list
- Open a file
- Close a file when we have handled the file.
Describe the process by which you should go about handling files?
- Open the file
- Read from or write to the file that you have opened
- Close the file
Describe how you would go about writing to a file called highscores.txt?
highscores = open(“highscores.txt”, “w”)
highscores.write(“…………………………………”)
highscores.close()
What errors can occur when handling flies and how are these errors caused?
EOF -end of file errors can be caused when file handling, they occur when you attempt to read from or write to the file for more lines than are in the file. These types of errors are also caused if we forget to close the files after handling them.
Describe how you would create a record by reading from a file?
Array = []
File = open(“filename.csv”, “r”)
For line in file():
fields = line.split(“,”)
Info1 = fields[0]
Info2 = fields[1]
Info3 = float(fields[2])
File.append(“name”: info1, “club”: info2, “time”: info3)
File.close()
What do csv files allow us to do?
csv files are comma seperated files that allow us to separate information from lists into fields using the split() function
Describe how you would write out a find max standard algorithm?
Max = numbers[0] (set maximum to the first number on the list)
for counter in range(1, len(numbers)):
IF numbers[counter] > Max:
Max = numbers[counter]
return(max)
Describe how you would write out a find min standard algorithm?
Min = numbers[0]
for counter in range(1, len(numbers)):
If numbers[counter] < Min
Min = numbers[counter]
return(Min)
Describe how you would write out a linear search standard algorithm using a found variable?
Names = [……….]
target = input(“Enter a name to look for”)
found = False
for counter in range(len(Names)):
If Names[counter] == Target
found = True
print(“Item was found:” + found)
Describe how you would write out a linear search algorithm using a pos variable?
Names = [………………….]
target = input(“enter a name that you want to look for”)
pos = -1
for counter in range(len(Names)):
if Names[counter] == target
pos = counter
print(“the name you were looking for was found at position “ + pos)
State why when using a pos variable in a linear search we use a -1 to start with?
As a counter of -1 is impossible to achieve however a counter of 0 is hence using a starting pos = 0 is unsuitable whereas if the linear search results in the position being given as -1 then we know that the item that was searched for was not found
Describe how you would write out a count occurances standard algorithm?
Percentages = [……………………]
target = 50
count = 0
For counter in range(len(percentages)):
If Percentages[counter] >= target:
count += 1
print(“there are” + count + “passes in these sets of results”)
State all the names of the predefined functions that you will need to know how to use at higher computing?
- random
- length
- round
- convert floating point to integer
- Modulus (remainder)
- substring
- ASCII from a character
- Character from ASCII
Describe how you would use a predefined function to convert a floating point number to an integer?
Number = int(Number)
print(Number)
This process is known as truncating a number which means that you remove all numbers after the decimal point and this is not like rounding
Describe how you would use the modulus predefined function on a number?
remainder = 5 % 2
print(remainder)
This predefined function returns only the remainder of the calculation the modulus acts as an operator (%) however can still be considered a predefined function
Describe how you would use the substrings predefined function?
MyString = “hello world”
Substring = MyString[0:4]
print(Substring)
Substrings use markers to determine which individual characters they should use, remember that a string is a list of characters, MyString[ Marker1: Marker2]
Marker1 - shows the predefined function which character to begin with
Marker2 - shows the predefined function which character to end with
you can also use a negative marker2 to take characters from the end of the string MyString[-5]
Describe how we would use a predefined function to derive a ASCII number from a character?
MyCharacter = input(“please enter a character”)
print(ord(MyCharacter))
ord stands for ordinal and will convert a character back into its associated ASCII value
Describe how we could use a predefined function to produce a character from a given ASCII value?
ASCII = 65
print(chr(ASCII))
chr stands for character and will take a given ASCII value and convert it to the character that it represents
State the names of the two types of modules that can be produced when using methods of modular programming?
- Functions
- Procedures
Explain what feature all functions contain?
All functions should contain a return() operator which allows them to use their subprogram and return a value to the part of the program which called them.
State what the difference is between a function and a procedure?
A function is a module that returns a value however procedures do not return a value
State the two different types of parameters that can be present?
- Formal parameters
- Actual parameters
State what is meant by an actual parameter?
A formal parameter is any parameter that can be found in the brackets when the function or procedure is called
State what is meant by a formal parameter?
A formal parameter is a parameter that can be found in the definition of the function or procedure
State the two types of variable scope?
- Local variables
- Global variables
State what is meant by a local variable?
local variables are variables that can be found within a procedure or a function
State what is meant by a global variable?
Global variables are variables that can be found at any point in the program
Explain some of the advantages of using local variables instead of using global variables?
- Local variables are released from memory and no longer needed once they have been used this frees up space
- Local variables allow programmers to use the same names for variables at other points in the program without causing issues
- Local variables are unable to affect other parts of the program and are limited to being used in the function or procedure that they were created
Describe how you would create a module to return the results of a linear search standard algorithm?
def Linear search(Numbers):
target = input(“please enter your target number”)
pos = -1
found = False
for counter in range(len(Numbers)): if Numbers[counter] == target pos = counter found = True
return(pos, found)
State what is meant by a comprehensive test plan?
A comprehensive testing plan involves testing the outputs produced by the software from a normal, exceptional, and extreme data input.
A comprehensive test plan is a final test plan that shows that the functional requirements of the software have been met
State the names of the four debugging techniques that you can use to help to fix a piece of software?
- dry run
- Trace table
- Break points
- Watch points
Describe what is meant by a dry run?
A dry run is a debugging method that involves mentally walking through a program step by step and thinking about what will happen to each variable
Describe what is meant by a trace table?
A trace table is a paper and pencil method of walking through a program that involves noting the values of variables in a program and noting each time that a variable changes.
Describe what is meant by a breakpoint?
A breakpoint is a computational method of debugging that involves setting a point where the program will stop and you can hover over variables to determine their values at particular points in the program
Describe what is meant by a watchpoint?
A watchpoint is similar to a breakpoint however they will stop the program whenever a condition has been met e.g whenever the value of a variable is changed
State the four types of errors that can occur at higher computing?
- Logic error
- Execution error
- Syntax error
- EOF error
Explain what is meant by a syntax error?
Syntax errors are errors that occur when the rules of the programming language are broken e.g misspelling of variables, addition of symbols, misuse of computational constructs. These errors will cause the program to be unable to run
Explain what is meant by an executional error?
Executional errors are errors that occur when the program is running and can occur because of lack of robustness of the program.
Explain what is meant by a logic error?
Logic errors occur when the program will run to completion however they will display some incorrect output
State what is meant by a program being fit for purpose?
This means that the program meets all of its functional requirements meaning that it performs all of its inputs, processes and outputs correctly
Explain what is meant by efficient use of programming constructs?
This means that your program is written in as few lines and with as few constructs as it possibly can be ways of improving the efficiency of programming constructs is by using loops are arrays or using modules to reuse segments of code where needed
State what is meant by a program being robust?
A robust program is a program that deals well with errors and does not easily crash
State some features of a program that is said to be usable?
- Constructive error messages
- Giving the user instructions about how to use the software
- format the inputs and outputs of the software in a readable way
Explain some of the features of a program being maintainable?
- Commenting on your code to allow other programmers to see how your code works
- using whitespace/indentation/ meaningful variable names
- using modular programming