1.2 Software and software development Flashcards

Types of software and the different methodologies used to develop software

You may prefer our related Brainscape-certified flashcards:
1
Q

Waterfall Cycle

A

Definition - Sequential software development process divided into distinct phases. Each phase must be completed before the next one begins.

Steps:
1. Analysis
2. Design
3. Implementation
4. Evaluation
5. Maintenance

Merits:
- Straightforward to manage as when each step is completed it is called a milestone, these allow progress to be easily assessed by both the team and the customer.
- Clearly documented so that it can be reviewed so future developers can see what worked and what didn’t.
Drawbacks:
- Lack of flexibility as steps cannot be reversed during development.
- No risk analysis so is therefore not suitable for high risk projects
- Limited user involvement, client does not know exactly what they want at the beginning of the project.

Uses:
Low risk projects which need little input such as a piece of general purpose software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Agile Methodologies

A

Definition - Collection of methodologies which aim to improve the flexibility of software development.

Steps:
1. Analyse requirements
2. Design prototype.
3. Build prototype
4. User feedback
5. Refine prototype (Going back to designing).
6. Final product

Merits:
- Produces high quality code
- Flexible to changing requirements
- Regular user input.
Drawbacks:
- Poor documentation.
- Requires constant interaction between user and programmer.

Uses:
Small to medium projects with unclear initial requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Extreme Programming (XP)

A

Definition - Example of an agile model where the development team consists of a pair of programmers alongside a representative end user.

The model is built on ‘user stories’
- System requirements are specified by the end user.
- Paired programming produces high-quality code and programmers work no longer than 40 hours in a week.

Merits:
- Produces high quality code.
- Constant user involvement means high usability.

Drawbacks:
- High cost of 2 people working on one project.
- Teamwork is essential.
- End user may not be able to be present.

Uses: Small to medium projects with unclear initial requirements requiring excellent usability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Spiral model

A

Built on 4 key stages with the focus of effectively managing risk-heavy projects.
- Analysing system requirements.
- Pinpointing and mitigating risks.
- Development, testing and implementation.
- Evaluating to inform the next iteration.

If project is found to be too risky at any point, the project is then terminated. However hiring risk assessors to analyse the risks involved can be very expensive which therefore makes this project suitable to large-scale ones with high budgets.

Merits:
- Thorough risk analysis and mitigation.
- Caters to changing user needs.
- Produces prototypes throughout.

Drawbacks:
- Expensive to hire risk assessors.
- Lack of focus on code efficiency.
- High cost due to constant prototyping.

Suitable for large scale projects with high budgets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Rapid Application Development (RAD)

A
  • Iterative methodology which uses partially functioning prototypes which are continually built upon.
  • User requirements are initially gathered using focus groups and used to develop and ‘incomplete’ version of the solution which is given to the user to trial.
  • User feedback is then used to generate the next improved prototype and this continues until the prototype matches the requirements of the end users at which point it becomes the final product.

Merits:
- Caters to changing user requirements.
- Highly usable finished product.
- Focus on core features, reducing development time.
Drawbacks:
- Poorer quality documentation.
- Fast pace may reduce quality time.

Uses: Small to medium, low budget projects with short time frames.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Qualities of algorithms

A
  • Inputs must be clearly identified - what is valid and what is invalid.
  • Must always produce a valid output for any defined point.
  • Must be able to deal with invalid points.
  • Must always reach a stopping condition.
  • Must be well documented for reference.
  • Must be well commented so modifications can be easily made.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Problems solved by algorithms

A
  • Internet related algorithms: Manage and manipulate the huge amount of data stored on the internet.
  • Route finding algorithms: Finds best route to transmit packets from A to B over a network.
  • Compression algorithms: Compress data files so that they can be transmitted quicker or placed in smaller storage place.
  • Encryption algorithms: Encrypt sensitive data so that if it is intercepted, it cannot be read.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Testing Methods:

A
  • Alpha Testing - carried out in house by software development teams within the company. Bugs are pinpointed and fixed.
  • Beta testing - carried out by end users after alpha testing has been completed. Feedback from users is used to inform the next stage of development.
  • White box testing - carried out by software development teams in which the test plan is based in the internal structure of the program. All the possible routes through the program are tested. Also called structural testing.
  • Black box testing - software is tested without the testers being aware of the internal structure of the software and can be carried out by both within the company and by the end users The test plan traces inputs and outputs within the software. Also known as functional testing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Functions of an Operating System

A

What the OS does: Provide interface between the user and the Hardware.
Functions:
Resource Management/multitasking:
- When more than one program is running at the same time, the processor allocates a small amount of time to each processor and cycles between them.
- As this happens so quickly, it appears as if multiple programs are executing simultaneously.
File Management:
- Because data is stored in files, an extension to the filename will tell the OS which application to load the file into. E.g., xlsx, pptx, docx.
- The OS may present a logical structure of files into folders and allow the user to rename, delete, copy, and move files.
User Management/Security
- User management - allows multiple users to log into the same computer.
- The OS will retain settings for each user such as icons and backgrounds.
- Each user may have different access rights to the files and the programs.
- In a client server network, it may impose a fixed or roaming profile for a user and manage login requests to network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Paging

A

Memory is split up into equal sized sections known as pages with programs being made up of a certain number or equally-sized pages. These can then be swapped between main memory and the hard disk as needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Segmentation

A

Splitting up the memory into logical sized divisions, known as segments, which vary in size. These are representative of the structure and logical flow of the program, with segments being allocated blocks of code such as conditional statements (IF) or loops (WHILE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Virtual Memory

A

Uses a section of the hard drive to act as RAM when the space in the main memory is insufficient to store programs being used. Sections of the program that are not currently in use are temporarily moved into the virtual memory through paging, freeing up memory for other programs in RAM.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Interrupts and Interrupt Service Routine

A

Interrupts - Signals generated by software or hardware to indicate to the processor that a process needs attention.
- Different types of interrupts have different priorities and how urgen they are must be taken into account by the OS when allocating processor time.
- Interrupts are stored in order of their priority within an abstract data structure called a priority queue in a special register called the interrupt register.
- It’s the job of the OS to ensure interrupts are serviced fairly by the processor through the Interrupt Service Routine.
- Examples of interrupts: printer signalling completion of printing, peripheral signalling power failure.

INTERRUPT SERVICE ROUTINE (ISR)
- Processor checks the contents of the interrupt register at the end of each FDE cycle.
- If an interrupt exists that is of higher priority the current contents of special purpose registers in the CPU are temporarily transferred into a stack.
- Processor then responds to the interrupt by loading the appropriate ISR into RAM.
- Flag is set to signal the ISR has begun.
Once interrupt has been serviced:
- The flag is reset, interrupt queue is checked again for further interrupts of high priority to the executed process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Sheduling Algorithms

A

Scheduling - function of the OS which ensures all sections of programs being run receive a fair amount of processing time.
Scheduling algorithms can be:
- Pre-emptive: Jobs are actively made to start and stop by OS. E.g., Multilevel feedback queues, Shortest Time Remaining, Round Robin.
- Non pre-emptive: Once a job is started, it is left alone untl it’s completed. E.g., First Come First Serve, Shortest Job First.

Round Robin
- Each job is given a section of processor time - known as a slice - within which it is allowed to execute.
- Once each job in the queue has used its first time slice, the OS again grants each job an equal slice of processor time.
- This continues until a job has been completed, at which point it is removed from the queue.
- Although Round Robin ensures each job is seen to, longer jobs will take a much longer time for completion due to their execution being inefficiently split up into multiple cycles.
- This algorithm also doesn’t take into account job priority.
First come first served:
- Jobs are processed in chronological order by which they entered the queue. Although this is straightforward to implement, FCFS doesn’t allocate processor time based on priority.
Multilevel feedback queues:
- This makes use of multiple queues, each which is ordered based on a different priority.
- This can be difficult to implement because deciding whihc job to prioritise based on a combination of priorites.
Shortest Job First:
- Jobs will be prioritised based on how long it takes to execute them.
- Usually suited to batch systems, where shorter jobs are given preference to minimise waiting time.
- However, it requires the processor to know how to calculate how long each job will take, which sometimes isn’t possible.
- Also the risk of processor starvation (paticular process doesn’t receive enough processor time in order to be excecuted and completed.)for longer jobs if short jobs are added to the queue.
Shortest remaining time:
- Jobs with least time to completion will be serviced first.
- However could cause processor starvation for longer jobs if short jobs are added to the queue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Types of Operating Systems

A

Distributed:
- Type of OS which runs across multiple devices, allowing load to ve soread across multiple computer processor when a task is run.
Embedded:
- Built to perform small range of specific tasks. - Catered towards a specific device, limited in their functionality, and hard to update. - -
- Although they consume less power than other types of OS.
Multi-tasking:
- Enables users to carry out tasks simultaneously using time slicing to switch quickly between programs and applications in memory.
Multi-user:
- Multiple users make use of one computer, typically a supercomputer within a multi-user system.
- Therefore, a scheduling algorithm must be used to ensure processor time is shared fairly between jobs.
- Without suitable scheduling algorithm, there is a risk of processor starvation.
Real Time
- Commonly used in time critical computer systems, a real time OS is designed to perform a task within a guaranteed time frame.
- E.g., nuclear power stations or self-driving cars.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

BIOS

A

Basic Input Output System
- First program which is run when the computer is switched on.
- PC register points to the location of the BIOS upon each start-up of the computer.
- The program that loads the OS is called bootstrap. It is loaded from the hard disk into the main memory.
- As the BIOS is responsible for running various key tests before the OS is loaded into the memory. E.g.,:
- POST (Power-on self test) - ensures all hardware are correctly connected and functional.
- Checking CPU clock, memory and processor is operational.
- Testing external memory devices connected to the computer.

17
Q

Device Drivers

A

Def-Computer programs which are provided by the OS and allow it to ineract with hardware.
- E.g., Keyboard - It is the device driver that communicates this request to the OS which can produce the relevant output (displaying letter on a screen).
- Drivers are specific to the computer architecture, so different drivers must be used for different device types such as smartphones, games consoles and desktop PC’s.
- As drivers interact with the OS, they’re also specific to the OS installed on the device.

18
Q

Intermediate code

A

Code that’s halfway between machine code and object code. It is independent of the procesosr architecture so can be used across different machines and Operating Systems.

19
Q

Virtual Machine

A

Def-theoretical computer in that it is a software implementation of a computer system. Provides an environment with a translator for intermediate code to run.

Uses:
- Create a development environment for programmers to test progrmans on different OS’s. Advantage: Saves time and money, don’t have to buy different devices for testing. However, running intermediate code in virtual machine is slower compared to running low level code on device it was designed for.

  • Protection from malware: - Malware will affect virtual machine rather than the device being used.
  • Running incompatable software:
20
Q

Libraries

A

Ready-compiled and tested programs that can be run when needed.
- They are typically grouped together into software libraries.
- Most programming languages have extensive libraries of pre-built functions.
- for example, the math library in python offers common solutions to many everyday problems encountered by programmers who are dealing with numbers.

21
Q

Dynamic Link Libraries

A

-These libraries contain sub-routines written to carry out a common task on the Windows OS – e.g., Save as, where the user needs to save their work as a file.
-All the programmer needs to do is call the appropriate DLL sub-routine with the correct parameters, and the Save as dialogue will appear

22
Q

Benefits of using library routines

A
  • Quick and easy to hook into your own code.
  • Pre-tested, so you can be relatively sure they are free from errors
  • Pre-compiled, so they are typically optimised to run quickly
23
Q

Drawbacks of using library routines

A
  • Adding functionality or making specific tweaks can be difficult – or impossible.
  • Sometimes you are “black-boxed” from the actual implementation.
  • You have to trust that the developers will continue to maintain the library.
24
Q

Linker

A
  • Responsible for putting the appropriate machine addresses in all the external call and return instructions so all modules and external library routines are linked together correctly.
  • It also links any separately compiled subroutines into the object code
25
Q

Static Linking:

A
  • All the required code from the libraries is included directly in the finished machine code – this can result in large executable program files.
  • When the libraries are added to the code, The file size increases, however any changes made externally will not affect the files which means that a specific version of the library can be used.
26
Q

Dynamic Linking:

A
  • Compiled versions of the required libraries are stored on the host computer.
  • The OS links the required code from the library as the program is running.
  • Whilst this cuts down on the size of the compiled machine code, if the dynamic libraries change, the program may stop because it tried to call a subroutine in the wrong way.
27
Q

Loader

A
  • The loader is the part of the OS that loads the executable program file (machine code) into memory, ready to run.
  • When using dynamic linking, it will be responsible for loading the required libraries into memory.
28
Q

Lexical Analysis

A
  • Lexers start by converting lexemes in the source code into a series of tokens
  • As the lexer reads the source code, it scans the code letter by letter.
  • When it encounters a white space, operator symbol, or special symbol, it decides that a word (lexeme) is complete.
  • It then checks if the lexeme is valid using a predefined set of rules that allow every lexeme to be identified as a valid token.
  • Keywords, constants, identifiers, stings, number, operators and punctuation symbols are all considered tokens.
  • Now we have created our token streams from the lexemes in the source code, it is time to input those tokens into a symbol table.
29
Q

Syntax Analysis

A
  • Second phase of the compiler design process and comes after lexical analysis.
  • It receives its inputs in the form of the tokens from lexical analysers.
  • It analyses the syntactical structure of the input, checking if it is in the correct syntax of the programming language it has been written in.
  • It does this by analysing the token stream against production rules to detect any errors in the code.
  • Doing this accomplishes two tasks:
    o Checking for errors and reporting them.
    o Building an abstract syntax tree (parse tree)

Checking the syntax
- We already have our token stream created from lexemes in the original source code.
- The lexer could not tell us if these tokens were valid within the grammar (syntax) of the language – but the syntax analyser can.

Creating an abstract syntax tree
The main output of this phase is to create an abstract syntax tree
It is created from the input token stream.
As it is created, it is strictly following the syntax diagram to check if everything is correct.

Updating the symbol table
- When an identifier is added to the syntax parse tree, the symbol table is checked to see if it exists
- The info from the abstract syntax parse tree can be used to update the data types of the identifiers.

30
Q

Code Generation and Optimisation

A
  • In these final stages, the machine code is generated
  • Code optimisation attempts to reduce the execution code by:
    o Spotting redundant instructions and producing object code that achieves the same effect as the source program – but not necessarily the same means.
    o Removing subroutines that are never called.
    o Removing variables and references that are never referenced
  • Code optimisation can considerably increase compilation time for a program.
31
Q

Class

A

Template for an object and defines the state and behaviour of an object. State is given by attributes which gives an object properties. Behaviour is defined by the methods associated with a class, which describe the actions it can perform

32
Q

Instantiation

A

Class can be used to create objects through instantiation. An object is a particular instance of a class, and can be used to create multiple objects with the same set of attributes and methods.

33
Q

Setter

A

Method which sets the value of a particular attribute.

34
Q

why setters and getters are used

A

Makes sure that attributes cannot be directly accessed and edited by users. This is known as encapsulation

Attributes are declared as private, so they can only be altered by public methods.

34
Q

Getter

A

Retrieves the value of a given attribute

35
Q

constructor

A

allows a new object to be created. E.g., Add