1.2 Software Flashcards

1
Q

What is Basic Input Output System (BIOS)?

A

Program that loads the OS from hard drive/ secondary storage memory to RAM when computer is turned on after checking to see if system hardware works

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

What are device drivers?

A

A program that allows the OS to control and communicate with the device

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

What is a distributed operating system?

A

The OS is spread over multiple computer servers on a network, acting as a single system to parallel process a job

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

What is a embedded operating system?

A

A specialised operating system built in to control a single machine

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

First come first served?

A

A scheduling algorithm where processes are dealt with in the order they arrive (a queue)

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

What is intermediate code?

A

Partially compiled code designed for a virtual machine

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

What are interrupts?

A

A signal to alert the CPU. Higher priority than the current task, the current is paused and finished after the interrupt

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

What is the Interrupt Service Routines (ISR)?

A

If interrupt is of higher priority, register contents are temporarily transferred onto the system stack at the end of the current FDE cycle and the interrupt is handled

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

What is Memory Management?

A

The efficient organisation and allocation of main memory to the programs in use

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

What is the Multi-level Feedback Queues?

A

A scheduling algorithm that uses multiple queues, each with a different priority

Jobs can be moved between queues

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

What is the Multi-tasking Operating Systems?

A

An OS capable of running multiple tasks simultaneously

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

What is the Multi-User Operating Systems?

A

An OS consisting of one mainframe computer with multiple terminals that allow multiple users to access the computer’s resources

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

What happens with the mainframe processor in a Multi-User OS?

A

Each user is given a time slice of the mainframe processor

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

What is an Operating System (OS)?

A

A set of programs managing the operation of the computer, it bridges the user to the hardware

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

What is Paging?

A

Partitioning memory into fixed sized physical divisions called pages

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

What is a Real time OS?

A

An OS where data is processed as it comes, with responses generated with a guaranteed timeframe

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

What is the Round-Robin algorithm?

A

Each process is given an equal time slice and is dealt with on a FIFO basis, if not done in time slice, added to the end of the queue

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

What is scheduling?

A

Allocating processor time to each application to ensure processor time is used as efficiently as possible when multitasking

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

What is Segmentation?

A

Splits memory into variable sized logical divisions called segments

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

What is the shortest job first algorithm?

A

It picks the process with the shortest estimated running time and runs it until it is finishes

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

What is the shortest remaining time scheduling algorithm?

A

It picks the process with the shortest estimated time remaining to finish, switches to one if added is shorter

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

What are virtual machines?

A

Any instance where software is used to take on the function of a machine, including intermediate code or running an operating system within another

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

What is virtual memory?

A

An allocated area of secondary storage where pages/segments of inactive jobs are swapped into to free up enough RAM for the current job

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

What are applications?

A

A program that can be run on a computer, allowing the user to carry out specific tasks

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

What is an Assembler?

A

A translator in low level language, which converts assembly language into machine code

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

What is a closed source software?

A

Source code is not available to users, software has a licence and how to use it

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

What is code generation?

A

Final stage of compilation, equivalent machine code program is produced

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

what is compilation?

A

Taking high level language source code and converting it into machine code

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

What are compilers?

A

A translator that converts high level language to machine code all at once

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

What are Interpreters?

A

Translator that checks the source code line for line for syntax errors, translates to machine and executes the line

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

What is Lexical Analysis?

A

The first stage of compilation, where extra spaces and comments are removed from the source code and it is searched for simple errors

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

What happens to keywords, constants and variables in lexical analysis?

A

Replaced by tokens, variable names are loaded into a symbol table which correspond to the tokens

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

What are libraries?

A

A collection of pre-compiled programs that can be loaded into a program and run whenever

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

What is a linker program?

A

Takes object code, combines with libraries and modules to create an executable file

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

What is an Open Source software?

A

Source code is freely available to view, redistribute or modify

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

What is Optimisation?

A

During code generation, object code is made efficient as possible by removing redundancies

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

What is Syntax Analysis?

A

The 2nd stage of compilation, where statements, expressions and tokens are checked for syntax errors using syntax diagrams

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

What is a loader program?

A

Program that loads the executable object program and its associated libraries into the memory before it is run

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

What is a translator?

A

A program which converts code from one computer language to another

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

What are Utilities (System Software)?

A

Maintenance such as optimising the performance of the computer, diagnosing issues, backing up files, setting up firewalls, etc.

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

What are the Agile Methologies?

A

An iterative process that produces a prototype after each sprint, each prototype is user tested and feedback is accounted for in later sprints

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

What are the 5 software development cycles?

A

Agile methodology
Extreme Programming (EXP)
Rapid Application Development (RAD)
Spiral Modell
Waterfall Lifecycle

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

What is Extreme Programming?

A

An agile methodology with short development cycles and very frequent software releases, checkpoints allow new user requirements

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

What is Rapid Application Development (RAD)?

A

A method that has repeated prototyping, evaluations and strict time limits

The user will quickly receive a reduced-functionality mock up of the program

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

What is the Spiral model?

A

An iterative version of the waterfall lifecycle where stages are refined and repeated until the final product is complete, each cycle produces a prototype

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

What is the Waterfall Lifecycle?

A

Each stage of development is completed one at a time in a linear order, if an earlier stage is to go back to, ones in between need to be redone

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

What is Assembly Language?

A

A low level language that uses mnemonics for instructions

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

What are Attributes?

A

Data recorded as a variable associated with an object

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

What are classes?

A

A template defining the attributes and methods that can be used to create a type of data known as an object

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

What is Direct addressing?

A

The simplest addressing mode in assembly language where the operand stores the memory address of the value to be operated on by the operator

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

What is Encapsulation?

A

Encapsulation in object-oriented programming is the practice of bundling attributes (data) and methods (functions) together within a class

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

What does encapsulation ensure

A

Using encapsulation ensures that data remains secure and is not accidentally modified or misused by controlling access to them using access modifiers (e.g., public, private)

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

What is Immediate addressing?

A

Where the data in the address the field is constant and the operand is the value to be operated on by the operator

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

Where are all of the types of addressing found?

A

They are all modes in assembly language

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

What is Indirect addressing?

A

Where the operand stores the address of the location holding the memory address of the required data

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

What is Inheritance?

A

The concept of subclasses inheriting the methods and attributes of its parent class (a.k.a its super class)

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

What are Methods?

A

Subroutines that represents an action an object can perform

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

What are Object-Oriented Languages?

A

Where the code is made of objects, which are instances of a class, objects have their own attributes and methods

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

What are Objects?

A

An instance of a class

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

What is Polymorphism?

A

Polymorphism allows objects to take on different forms or behaviours under the same name

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

What are Procedural Languages?

A

A high level language where code is grouped into subroutines and have built in data types and structures

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

What are Programming Paradigms?

A

A style of computation and programming, chosen according to the problem at hand

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

What are the 4 types of addressing used in assermbley language?

A

Indexed addressing
Indirect addressing
Immediate addressing
Direct addressing

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

What are the 8 essential features an Operating System provides?

A

Memory management
Resource management
File management
Input/Output management
Interrupt management
Utility software
Security
User Interface (UI)

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

In paging, Why is each program separated into equally sized pages?

A

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
66
Q

Segmentation, virtual memory and Paging, what is a key issue that all of are the 3 techniques?

A

Disk Thrashing

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

What is Disk Thrashing?

A

When the computer ‘freezes’ and occurs as a result of pages being swapped too frequently between the hard disk and main memory

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

How does the ISR work?

A

A flag is set when ISR starts, flag is reset when interrupt has been finished, checked for priority, then carries on with the FDE cycle

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

What are the 2 scheduling algorithms?

A

Pre-emptive
Non pre-emptive

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

What is a Non pre-emptive scheduling algorithm?

A

Once a job is started, it is left alone until it is completed

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

Examples of a pre-emptive scheduling algorithm?

A

Multilevel Feedback Queues
Shortest Remaining Time
Round Robin

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

Examples of a Non pre-emptive scheduling algorithm?

A

First Come First Served
Shortest Job First

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

What is a pre-emptive scheduling algorithm?

A

Jobs are actively made to start and stop by the OS

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

What is Processor starvation?

A

When a particular process does not receive enough processor time in order to execute and be completed

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

What is the name given to the program that loads the operating system from the hard disk into main memory?

A

Bootstrap/bootloader

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

What are the positives and negatives of using Multilevel feedback Queues for scheduling?

A

+ve - Service most urgent interrupts first

-ve - Hard to implement

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

What are the 3 functions of the CPU?

A

Power-on self test
Checking the CPU clock, memory and processor
Testing for external memory devices

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

What is POST in terms of the BIOS?

A

Power-on self test which ensures that all hardware is correctly connected and functional

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

When may Virtual machine be used?

A

Testing programs
Protection from malware
Running software compatible with different OS

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

Why is the BIOS critical to the computer system?

A

Only after these checks are completed that the operating system can be loaded into RAM from the hard disk

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

After the computer is switched on, How does the Program Counter register help next?

A

The Program Counter register points to the location of the BIOS

82
Q

When are virtual machines commonly used?

A

To create a development environment for programmers to test programs on different operating systems

83
Q

What are the positives of using intermediate code in virtual machines?

A

Saves both the time and money of having to purchase multiple devices solely for testing

84
Q

What are the negatives of using intermediate code in virtual machines?

A

It is considerably slower compared to running low-level code on the device it was designed for

85
Q

What other software does applications software depend on?

A

System Software

86
Q

What are system software?

A

Low-level software that is responsible for running the computer system, interacting with hardware and generally providing a platform for applications software to run

87
Q

What are the 5 examples of Utilities?

A

Compression
Disk defragmentation
Antivirus
Automatic updating
Backup

88
Q

What is compression?

A

An OS that provides utilities that enable files to compressed and decompressed, used for larger files that need to be transmitted across the internet

89
Q

What is Disk defragmentation?

A

Rearranges the contents of the hard drive so they can be accessed faster, thus improving performance.

90
Q

What is Antivirus?

A

Antivirus is responsible for detecting potential threats to the computer, alerting the user and removing these threats.

91
Q

What is Automatic updating?

A

Ensures the OS is kept up to date, with any updates being automatically installed when the computer is restarted, making them less vulnerable to hacking

92
Q

What is Backup?

A

The backup utility automatically creates routine copies of specific files selected by the user

93
Q

What are the advantages of open source?

A

Can be modified and improved by anyone, technical support from online community, can be modified and sold on

94
Q

What are the disadvantages of open source?

A

Bad online support
No user manuals
Lower security

95
Q

What are the advantages of closed source?

A

High levels of security
Expert support and user manuals
Well-tested updates

96
Q

What are the disadvantages of closed source?

A

Restricted numbers on software
Users cannot modify and improve software themselves

97
Q

What elements should a user consider when choosing either open or closed software?

A
  • Costs - implementation, maintenance, training of staff, license
  • Functionality - features available, ease of use
  • The suitability of the software to the task they will be using it for
98
Q

What are the 4 stages of compilation?

A

Lexical Analysis
Syntax Analysis
Code Generation
Optimisation

99
Q

What is the difference between high and low level language code?

A

High level code is understood by programmer, not computer
Low level code can be executed by a computer but cannot be directly understood

100
Q

What is machine code also known as, and vice versa?

A

Object code

101
Q

What are the 3 types of translators?

A

Compiler
Interpreter
Assembler

102
Q

Which translator initially takes the shortest amount of time?

A

Intepreter but once code is compilhave to be doesnt to be compiled every time but intepreter does??????

103
Q

The compiler is the fastest translator but why the slowest if changes to the code are made?

A

The whole program must be recompiled

104
Q

What do Compilers produce?

A

Intermediate code or machine code

105
Q

What are the advantages of using compiled code over interpreted code?

A

Faster to execute
Does not require compiler to run

106
Q

What are the advantagesos using interpreted code over compiled code?

A

Is platform independent - more portable
Runs instantly without time waiting for compilation
Useful for debugging

107
Q

What are the similarities between static and dynamic linkers?

A

Similarities: Both link external modules and libraries to main program

108
Q

What are the differences between static and dynamic linkers?

A

Static: Library code copied into the file. File size increased

Dynamic: Addresses of libraries included within file. External updates automatically feed through to main program

109
Q

What are some advatages of using libraries?

A

Error-free
Save time
Reusable
No need to ‘reinvent the wheel’
Designed by experts

110
Q

What are the advantages of the waterfall lifecycle?

A
  • Straightforward to manage
  • Clearly documented
    -Doesn’t need much customer involvement allowing programmers to crack on
111
Q

What are the disadvantages of the waterfall lifecycle?

A

-Lack of flexibility (new ideas cannot be included)
- No risk analysis
- Limited user involvement
-Efficient code not prioritised and software not produced till late

112
Q

When is the Waterfall Lifecycle used?

A

Simple projects when requirements do not change

113
Q

First stage of waterfall model

A

System and Software requirements. Documenting requirements gathered from questionnaires, etc

114
Q

Second stage of waterfall model

A

Feasibility – is it technically viable, economical, legal? How effective the project will be in solving the problem? Can it be done in time?

115
Q

Third stage of waterfall model

A

White/black box, alpha/beta, performance etc

116
Q

Fourth stage of waterfall model

A

Installation, migration, support, and maintenance e.g. corrective, perfective, adaptive maintenance (to keep a software product usable in a changed or changing environment)

117
Q

What are the advantages of Agile?

A
  • Produces high quality code
  • Flexible to changing requirements
  • Regular user input
118
Q

What are the disadvantages of Agile?

A
  • Poor documentation
  • Requires consistent interaction between user and programmer
119
Q

When is Agile used?

A

Small to medium projects with unclear initial requirements

120
Q

What are the advantages of Spiral?

A
  • Thorough risk-analysis and mitigation
  • Caters to changing user needs
  • Produces prototypes throughout
121
Q

What are the disadvantages of Spiral?

A
  • Expensive to hire risk assessors
  • Lack of focus on code efficiency
  • High costs due to constant prototyping
122
Q

When is Spiral used?

A

Large, risk-intensive projects with a high budget

123
Q

What are the advantages of RAD?

A
  • Caters to changing user requirements
  • Highly usable finished product
  • Focus on core features, reducing development time
124
Q

What are the disadvantages of RAD?

A
  • Poorer quality documentation
  • Fast pace may reduce code quality
125
Q

When is RAD used?

A

Small to medium, low-budget projects with short time-frames

126
Q

What are the advantages of the Extreme programming?

A
  • Produces high quality code
  • Constant user involvement means high usability
    -Sustainable pace which means less chance of tired programmers
127
Q

What are the disadvantages of the Extreme Programming?

A
  • High cost of two people working on one project (paired programming)
  • Teamwork is essential
  • End-user may not be able to be present
  • Needs to be in the same geographical area
128
Q

When is Extreme programming used?

A

Small to medium projects with unclear initial requirements requiring excellent usability. Critical systems in health care needing high quality code

129
Q

What are the 7 common stages in software development life cycles (SDLCs)?

A

Analysis
Design
Development
Testing
Implementation
Evaluation
Maintenance

130
Q

What is white box testing?

A

The test plan is based on the internal structure of the program, all of the possible routes through the program are tested

131
Q

What is black box testing?

A

A form of testing where the software is tested without the testers being aware of the internal structure of the software

132
Q

Who carry out black box testing

A

The company or contractors

133
Q

What is TELOS?

A

It considers Technical, Economic, Legal and Operational aSpects of the project, as well as Scheduling, when testing the feasibility of the project

134
Q

What are the advantages of First come first served (FCFS)?

A

Easy to implement with a FIFO queue
No swapping in and out so no overhead

135
Q

What are the disadvantages of First come first served (FCFS)?

A

More important and quicker processes are neglected
Quick jobs may have to wait for a long job to complete

136
Q

Average wait time FCFS (disadvantage)

A

Average waiting time may be long. The average waiting time under a FCFS policy is generally not minimal, and may vary substantially if the process burst times vary greatly

137
Q

What are the advantages of Round Robin?

A

Avoids process starvation

138
Q

What are the disadvantages of Round Robin?

A

-Can be inefficient if the processor is allocated to a process that is waiting for input or output eg printer to print.
-Overhead in swapping

139
Q

Disadvantage of round robin in relation to what the performance depends on

A

the size of the time quantum selected. If the quantum is very large (infinite), RR is the same as FCFS.

140
Q

What are the advantages of Shortest job first (SJF)?

A

SJF is optimal in that it gives the minimum average waiting time for a given set of processes and reduces number of small jobs waiting behing big jobs

141
Q

What are the disadvantages of Shortest job first?

A

Problem is there is no way of knowing in advance exactly how long a job will take (guestimates are used).
Possible that longer jobs never get executed if shorter jobs keep coming in.

142
Q

What happens if 2 jobs take the same time in shortest job first

A

If two jobs take the same time, FCFS is used to determine what goes next.

143
Q

What are the advantages of Multi-level feedback queues?

A

A process that waits too long in a lower priority queue may be moved to a higher priority queue.
No prior knowledge of the job is needed.

144
Q

How does multi level feedback queues make progress running long, cpu intensive workloads (advantage)

A

Fair and makes progress for long-running CPU-intensive workloads. For this reason, many systems including Windows operating systems use a form of MLFQ as their base schedule

145
Q

What are the disadvantages of Multi-level feedback queues?

A

Moving the process around queue produces more CPU overhead.
How many queues should there be? How big should the time slice be per queue? How often should priority be boosted in order to avoid starvation?

146
Q

What are programming paradigms?

A

Different approaches to sing programming language to solve a problem

147
Q

What are the advantages of procedural programming?

A

Can be applied to a wide range of problems
Relatively easy to write and interpret

148
Q

Which 2 broad categories are programming paradigms split into?

A

Imperative
Declarative

149
Q

State a use of declarative programming.

A

Expert systems/knowledge-based systems
Artificial intelligence

150
Q

What are the 4 main structures used in structured programming?

A

Sequence
Selection
Iteration
Recursion

151
Q

How does assembly language differ from machine code?

A

Assembly language uses mnemonics rather than binary
One line in assembly language is equal to one line in machine code

152
Q

What is the function of the opcode?

A

The opcode specifies the instruction performed and the addressing mode

153
Q

What is the function of the operand?

A

The operand holds a value which is related to the data on which the instruction is to be performed

154
Q

What are the disadvantages of Object oriented Languages?

A

Difficult different way of thinking
Not suited for all type of problems
Bad for smaller problems

155
Q

What are the advantages of Object oriented Languages?

A

High level of reusability - inheritance and polymorphism
Easy to maintain and update
Higher-quality piece of software

156
Q

What is Overriding in OOP?

A

Overriding is redefining a method within a subclass and altering the code so that it functions differently and produces a different output. takes priority over one with the same name in the superclass

157
Q

What is Overloading in OOP?

A

Overloading is when mwthods behave differently depending on paremeters passed in

158
Q

What does a class look like in pseudocode?

A

class Book:

private reserved
private onLoan
private author
private title

public procedure new(title,author,reserved,onLoan)
title = givenTitle
author= givenAuthor
reserved = givenReserved
onLoan = givenOnLoan
end procedure

public function set_reserved()
reserved=True
end function

end class

159
Q

How to create a class?

A

myBook = new Book(‘Great Expectations’, ‘Charles
Dickens’,’False’,False’)

160
Q

How to use a method from a class?

A

myBook.set_reserved()

161
Q

What is a Setter to do with classes?

A

A setter is a method that sets the value of a particular attribute

162
Q

What is a Getter to do with classes?

A

A getter is another special method used in OOP which retrieves the value of a given attribute

163
Q

In LMC, what does ADD do?

A

Add the value at the given memory address to the value in the Accumulator

164
Q

In LMC, what does SUB do?

A

Subtract the value at the given memory address from the value in the Accumulator

165
Q

In LMC, what does STA do?

A

Store the value in the Accumulator at the given memory address

166
Q

In LMC, what does LDA do?

A

Load the value at the given memory address into the Accumulator

167
Q

In LMC, what does INP do?

A

Allows the user to input a value which will be held in the Accumulator

168
Q

In LMC, what does OUT do?

A

Prints the value currently held in the Accumulator

169
Q

In LMC, what does HLT do?

A

Stops the program at that line, preventing the rest of the code from executing

170
Q

In LMC, what does DAT do?

A

Creates a flag with a label at which data is stored

171
Q

In LMC, what does BRZ do?

A

Branches if value in ACC is zero only

172
Q

In LMC, what does BRP do?

A

If value in ACC is zero or positive, branches

173
Q

In LMC, what does BRA do?

A

Always branches

174
Q

What is declarative programming?

A

Stating the desired result with the user abstracts the details about how to get there

175
Q

When is declaritive programming used?

A

Common in expert systems and artificial intelligence
Functional and logical programs

176
Q

What is a function?

A

A named block of code that performs a specific task and returns a value

177
Q

What is procedural programming?

A

Type of imperative programming which uses a sequence of instructions carried out in a step-by-step manner, which are easy to write and interpret

178
Q

When is declaritive programming used?

A

Procedural and Object-Oriented

179
Q

What is a procedure?

A

A named block of code that performs a specific task that doesn’t return a value.

180
Q

Stages of waterfall model in order.

A

Analysis, design, implementation, evaluation, maintenance

181
Q

How many can you go back in waterfall model

A

1

182
Q

Diagram for agile methodologies

A
183
Q

How does XP use paired programming?

A

Work in pairs as one person will be programming and one will be testing to ensure efficient and working code

184
Q

Diagram for spiral model

A
185
Q

What is an interrupt

A

A sugbak truggered by a clock, peripheral device, or software program requesting services from the CPU

186
Q

First stage of interrupt

A

CPU checks the interrupt line (on control bus) after each instruction is executed

187
Q

Second stage of interrupt

A

If an interrupt is raised, the CPU suspends execution of the running program or process and disables all interrupts of a lower priority (hardware interrupts are usually higher priority than software interrupts)

188
Q

Third stage of interrupt

A

It then puts the values of the program counter onto the system stack (LIFO data structure in memory) while an Interrupt Service Routine is called to deal with the interrupt.

189
Q

Last stage of interrupt

A

Once the interrupt has been serviced, the original values of the registers are retrieved from the stack and the process resumes from the point that it left off.

190
Q

Indexed adressing

A

Operand plus contents of the index register are used to form the address of the location to be used

191
Q

What is an overhead

A

excess or indirect computation time, memory, bandwidth, or other resources that are required to perform a specific task.

192
Q

When are real time processors used

A

Self driving cars or critical systems software for example in a hospital

193
Q

dusadvantage of agile

A

Difficult to estimate resources as keep changing requirements

194
Q

What is a lexeme

A

a sequence of alphanumeric characters.

195
Q

What happens if a lexeme is valid

A

It becomes a token

196
Q

What is semantic analysis

A

A stage of compilation (included in Syntax Analysis from OCR’s point of view) where the code is checked for logical errors e.g. attempting to assign a string literal to an integer (type mismatch), undeclared variables, multiple declaration, accessing an out of scope variable or out of bounds with an integer literal.

197
Q

What is object code

A

The product of a compiler, usually machine code or intermediate code (e.g. Java Bytecode)

198
Q

Where is a symbol table contructed and what does it do

A

A symbol table is constructed during lexical analysis of all the identifiers that are found (variable names, class names, subroutine names, etc.). See next slide.

199
Q

Result of lexical analysis

A

The end result is a list/stream of tokens.

200
Q

Advantage of intermediate code?

A

Programmers do not have to rewrite and recompile every program they code for different operating systems