XTRA 2 Flashcards
What is problem recognition
Identify there is a problem to be solved // what the
problem is
Data mining has to be
Large quantities of data
What does data mining do
Turn large quantities of data into useful information
Why is performance modelling used
Simulate/test the behaviour of the system before it is used …
Type of testing
Stress testing
Can trees be directed/undirected like graphs
No
Advantages of visualisation
Visualisations benefit humans rather than computers
Visualisations present the information in a simpler
form to understand
Visualisations can best explain complex situations
Heuristics produce a solution in a
Faster time
Scaling problems pathfinding
A* will matter more bigger problems and should be a lot quicker
Syntax errors are
Underlined dynamically so they can be corrected before running which save rimes
Traces in IDE
Print outs of variable values for each statement
Crash dump
Shows state of variables when error occurs
Cross referencers in IDE
Identifies where variables/constants are used in a
program to avoid duplications
Why would a value b passed by alue
If the value is sent by value, num1 will not be overridden
/ it is a copy of the parameter that is used (1) and this
will produce the correct output (1)
if the parameter had been passed by reference it would
not produce the correct result (1) as num1 would be
overridden / because it is a pointer to the address of the
variable (1
What is gobal same as
Reference
Global takes more
Memory
What do parameters and local allow
Memory t obe reallocated
Ae more memory spaces needed for local
Yes in recursion
Why do recirsion use more memory
Each recursive call stores the current state on the stack // creates new variables
Iteration reuses the same variables
Flags and
lowerbound greater than or equal to upperbound
Same and differences between records and classes
Record is a data structure…
…A class is a template for making data structures (objects)
Class also has methods (which describes functionality)
Both store data of different types
Which can be accessed by their names
But classes can make them accessible via methods
Both can have multiple ‘instances’
Class can include visibility of properties / private
Does date need speech marks
Yes
How do private attributes remain integrity
Properties (are encapsulated) and can only be accessed through their methods
Enforce validation through the method // inappropriate data can be caught before entered
Cannot be changed/accessed accidentally
What does caching rely on
…Relies on same item being searched for multiple
times
…Kamran needs to decide how feasible this is
based on the number of item
can binary or linear be done concrrently
Linea ys binary no
concurrent processing in a game
Game could have large number of
requests to the server at a time
… server needs to respond in
reasonable time
… having multiple processors handling
the different requests would increase
response time
Users could override each other’s
changes
… e.g. needs to handle if someone
updates their circus while someone
else is visiting
…use record locking to stop edits if
someone else has access to data
Different users will have different
response times
…therefore the processor can still
handle other requests
…so that the performance for other
users is not affected
Why abstraction would be used
Reduced development time (1) as
factors that can detract from the
program can be ignored (1)
Program more likely to solve the
problem (1) as unnecessary aspects
will not detract from the main purpose
of the program (1)
Reduces complexity of programming
code (1) therefore can run on lower
spec computers(1)
Features for WRITING code
Autocomplete (1) which will predict
variable / built-in functions (1)
Auto indent (1) to automatically indent
code when selection / iterative
statements are used (1)
Colour coding (1) to be able to
distinguish between the different parts
of each statement/line (1)
RAD how is development time reduced
Reduced development time (1) due to
time boxing / each subtask being given
a strict time limit (1)
Increased user involvement so
Increased user involvement (1) so
issues can be identified and fixed early
/ more likely to meet client
Why is RAD more flexible
The requirements do not all need to be
stated at the start (1) so therefore it is
more flexible (1)
Does white box or black box require programming skills
White
When would by value be used for recursion
By Value
… the original values do not need to be modified
… byRef would not work / would cause the routine to crash
Decomposition
Can tackle each sub problem independently
What else can you do with IDE
Can write subroutines for the program and it
will tell you what parameters are needed
Allow you to run the program without exiting
the software / having to load a separate
compiler
Integrates other tools such as version
control.
User friendly for novices
Increase speed of writing
Fewer mistakes
Increase speed of testing / finding errors
Collaborative team working facilitated
Why would an insertion sort use less memory than merge sort
Merge sort might create a new array each time it splits and
merges / often implemented recursively which places additional
data on the stack
Insertion sort does not use any additional arrays//Insertion sort is
an in-place algorithm
Extra points for abstraction application
Reduce memory/processing requirements
Could involve a large number of images that would take
excessive memory
Reality contains things that aren’t relevant to a computer program
What are hte lines in trees called
Branches
What do you HAVE TO SAY FOR STUFF
DATA STRUCTURE
What makes something solvable by computationa, methods
- Involves calculations
- Has inputs, processes and outputs
- Involves logical reasoning
What is quick sort ideal for
Parralel processing
benefits of global variables
Variable doesn’t need passing as a parameter (byref)
* You don’t need to return a value
* Can be accessed from any function / anywhere in the program
Drawbacks of global variables
Increases memory usage (as it is used until full program execution is over)
* Alterations within the function may have unwanted side effects elsewhere in
the program.
Where can reusable components be used
Program libraries and reduces testing requirements
When does depth return values
Depth first goes to the left node, this
becomes a new tree. It continues going to
the left until a leaf. It then returns this, then
goes right and repeats from the start. Follow
left, follow right, take root.
Which generally has a better complexity timne breadth or depth
breadth
When may depth never return a value
Large trees
When is breadth more fficient
When data searched for is closer to root
Which can be written recursivelt
Depth to aid undestanding
Why would an array be used
Can refer to all 50 only using one identifier // all values can be indexed in one
array
* The numbers can be passed as a single parameter
* Does not need 50 variables to be declared/passed
Insertion SIMPLE
makes first value sorted list then inserts each item into sorted list
Abstarction to
Reduce processing requirements or jiustr say simplify
Three other differences between trees and grapghs
More than one path is allowed in a graph
* Graphs do not have a root node
* Graphs can be weighted
WHY would performance modelling be used
Test with large and small values
* e.g. largest number of deliveries
* e.g. largest number of possible routes
* Model how well the system scales with increasing use.
What does OOP define objects as
defines an object as an independent
entity