2022 Advance Information Flashcards
What is Performance modelling?
a process of evaluating if a system or a program works as expected or not before it is released, and using this knowledge to make it more effective.
How is performance modelling used for?
evaluating if a system or a program works as expected or not before it is released, and using this knowledge to make it more effective.
performance modelling cons -
- it may have a negative effect on teamwork if employees feel they are competing with each other.
- it can distract from team objectives if employees are more focused on their own skills or productivity.
performance modelling pros +
+ provides a cheaper, less time-consuming or safer method of testing applications.
What is an advantage of visualization to solve problem
shows a visual representation of data and its relationship with other data nodes.
What is an disadvantage of visualization to solve problem
it can be difficult to interpret visualized data accurately.
what does visualization to solve problem make it easier to do?
identify trends that were not otherwise obvious.
where is visualization to solve problem seen
in graphs
What is meant by IDE
a software application that helps programmers develop software code efficiently
Use of an IDE to develop a program
- Text editor
A text editor is the window in your IDE that allows you to write your code. - Auto-Indent
Automatically indents code to minimise errors. - Auto-Complete
The feature will try to predict future actions you might want to complete when writing code.
Use of an IDE to debug a program
- Stepping
This allows you to monitor the effect of each individual line of code by
executing a single line at a time. - Breakpoint
IDEs allow users to set a point in the program at which the program will
stop. - Source code editor
The editor provides features such as autocompletion of words,
indentation, syntax highlighting and automatic bracket completion.
Advantage of IDE
Faster Development tasks
disadvantage of IDE
You will be distracted seeing cumbersome menu options on IDE, icons, and dozens of toolbars which you don’t require now
what is meant by Local Variable?
Local variables have limited scope which means that they can only be accessed within the subroutine in which they were defined.
what is meant by Global Variable?
Global variables, on the other hand, can be accessed across the whole program. These are useful for values that need to be used by multiple parts of the program
Local Variable advantages
The same name of a local variable can be used in different functions as it is only recognized by the function in which it is declared.
Local variables use memory only for the limited time when the function is executed; after that same memory location can be reused.
Local Variable disadvantages
The local variable’s scope is restricted.
Local Variable prevents sharing of data.
Since local variables are created and destroyed with each entry and exit from the block, they cannot save the data in between the function calls.
Global Variable advantages
Can be accessed anywhere in a program
(Global variables can be accessed by all the functions present in the program.)
Global Variable disadvantage
As its always on in the program it increases memory usage and wont stop until program is terminated.
What kind of data structure are stacks
FILO (first in, last out)
how many pointers do stacks have?
a single pointer which tracks the top of the stack
what are stacks usually implemented in?
An array
what does the pointer point to?
the element which is currently at the top of the list
What is the top pointer initialised at (STACKS)
-1, this is because the first element in the stack is in position 0, when in fact the stack is empty.
what are some of the algorithms for stacks?
Adding to the stack, removing from the stack, and checking wiether the stack is empty/full.
size() - checks size
isEmpty() - checks if empty
peek() - returns the top element
push(element) - adds element to the stack
pop() - removes top element from the stack
stacks advantages
When the variable is not used outside the function in any program, the Stack can be used.
It allows you to control and handle memory allocation and deallocation.
It helps to automatically clean up the objects.
stacks drawbacks
Limited memory size: Stack memory is very limited.
Chances of stack overflow: Creating too many objects on the stack can increase the risk of stack overflow.