Programming Techniques and Abstraction Flashcards
What is Assembly Language
Assembly language is the next level up from machine code and is part of a family of low level languages
Describe the Little Man Computer Mnemonics
What are the 3 Basic Constructs
- Sequencing - the computer will run your code in order, one line at a time
- Selection - the computer will only run some lines of code if a condition is met otherwise the computer ignores the lines (if statements)
- Iteration - the computer will run some lines of code several times (loops)
How do you know if a code is Procedure or Function
- Procedure if no output (e.g public static void)
- Function if there is an output (e.g public static int)
What is Abstraction
The process of removing unnecessary details to arrive at a representation of a problem that consists of only the key features
What are the different types of abstraction
Representational abstraction - looking at what is relevant to a given scenario and simplifying a problem based on this information
Abstraction by generalisation - grouping together similarities within a problem, this allows certain problems to be categorised and a common solution can be found
Data abstraction - when details about how data is being stored are hidden. Therefore programmers can make use of abstract data structures such as stacks and queues without having to know themselves how these structures are used
Why is abstraction needed
- Allows non-experts to hide information that is too complex or irrelevant to the system’s purpose
- Enables for a more efficient design during software development which reduces the time spent on the project and prevents the program from getting unnecessarily large
Describe the four layers of the TCP/IP stack
- Application Layer – allows access to network resources
- Transport Layer – provides reliable process to process message delivery and error delivery
- Network Layer – moves packets from source to destination and provides internetworking
- Link Layer – responsible for the transmission between two devices on the same network