Exam Flashcards
Define the term Hardware
The physical components of a computer system. Includes:
* Internal hardware (e.g., Motherboard, Ventilation Fans)
* External hardware (e.g., Monitor, Keyboard)
Internal hardware refers to components inside the computer, while external hardware refers to peripherals that connect to the computer.
Define the term Software
The ‘virtual’, non-physical part of a computer system. It describes applications, scripts, programs that run a device. It is a compilation of lines of code that create a computer program.
Software can be categorized into system software (like operating systems) and application software (like word processors).
Define the term Peripheral
A physical external device that provides input or output for a computer, also called I/O devices. Examples include:
* Mouse
* Monitor
* Keyboard
Peripherals can be categorized as input devices (e.g., keyboard, mouse) and output devices (e.g., monitor, printer).
Define the term Network
A collection of devices connected for the purpose of sharing data and information. A network can be as small as two devices. The most common types are:
* Local Area Network (LAN)
* Wide Area Network (WAN)
Networks can be wired or wireless and can vary in complexity and size.
Define the term Human resources
The end user of the computer system or the department responsible for managing resources related to computer systems.
Human resources can also refer to the management of people within an organization.
What is computational thinking used for?
Provides tools to devise algorithms to solve problems.
Computational thinking involves problem-solving skills that can be applied across various disciplines.
Define algorithm and the ways it can be represented
A series of unambiguous instructions designed to solve a problem and achieve a certain goal in a finite number of steps. Can be represented through:
* Pseudocode
* Flow charts
* Programming language
Algorithms are foundational in computer science and can be visualized in various formats for clarity.
What does thinking procedurally involve?
It’s a procedure that involves:
1. Step by step
2. The steps matter
3. Might have a sub-procedure called using its identifier
4. Like a recipe
Procedural thinking is essential in programming and algorithm design.
Define thinking abstractly
A mental model where abstraction is the process of taking away or removing characteristics from something to reduce it to a set of essential characteristics.
Abstraction helps in simplifying complex systems by focusing on the essential aspects.
Give a real-world example of abstraction
Examples include:
* Abstract Art
* A Map
These examples illustrate how abstraction simplifies representation while retaining essential information.
Distinguish between real-world entity and its abstraction
A real-world entity is the actual object, while its abstraction is a simplified representation used to solve a specific problem or design an algorithm.
Understanding this distinction is crucial in fields like software design and modeling.
What is the need for a higher-level language?
Easier to understand, less errors, easier to debug, easier to maintain compared to lower-level languages.
Higher-level languages allow developers to write code more efficiently and with greater clarity.
List features of a higher-level language
Features include:
* Mimics natural language
* Easy to use
* Simpler program development
* Faster and more understandable
These features make higher-level languages more accessible to programmers.
Define machine language
Made of 0s and 1s, the only language a computer can process. It is hard to write and difficult to debug and maintain.
All programs written in machine language are specific to a computer architecture.
What is assembly language?
Binary code replaced by instructions and references to address locations with symbols called mnemonics. An assembler translates mnemonics to machine language.
Assembly language is still specific to a particular computer architecture.
How does a compiler work?
Executes translation only once. Syntax errors are communicated to the programmer at the end after checking the entire program. It is much faster than interpreters.
Compilers generate a machine code file that can be executed multiple times without recompilation.
How does an interpreter work?
Runs slowly, starts straight away, and lets you see results immediately.
Interpreters are useful for scripting and debugging because they execute code line by line.
Define variable
A storage location that can be used to store a value. Each variable has a name (identifier) used to refer to the stored value, which can change during program execution.
Variables are fundamental in programming for data manipulation.
Define operator
Used to manipulate operands. For example, in 2 + 3, + is the operator and 2 & 3 are the operands. Operators can be:
* Arithmetic
* Relational
* Logical
Operators are essential for performing computations and comparisons.
What is an object?
An abstract entity that describes the data it has and the actions it can perform.
Objects are foundational to object-oriented programming.
Define instantiation
The process of creating a specific object from a class, which serves as a blueprint.
Instantiation is a core concept in object-oriented programming.
What is a class?
Describes the kind of object. It is a blueprint that defines all the attributes and methods needed to create the object. A class is always public.
Classes encapsulate data and behavior in object-oriented programming.
Define identifier
The name that identifies an entity.
Identifiers are used for naming variables, functions, classes, and other entities in programming.
What is a parameter variable?
Additional information that a method needs to complete performing the task.
Parameter variables allow methods to operate on different data inputs.
Define method
Implements the behavior of the object and gives it its function. A method is always public.
Methods are essential for defining the actions that objects can perform.
What is UML?
Provides a way to visualize the design of any software system and has evolved into the standard for modeling OOP.
UML stands for Unified Modeling Language.
What is a UML diagram?
They depict classes and how classes interact.
UML diagrams are used for visualizing and documenting the structure and behavior of a system.
Define aggregation in UML.
A ‘has a’ relationship where one object belongs to another object and none other. Represented by a hollow diamond followed by a line.
Aggregation indicates a whole-part relationship.
Define dependency in UML.
A ‘uses’ relationship where one object is dependent on one or more objects to function. Represented with a dashed arrow.
Dependency highlights how objects interact and rely on each other.
Define inheritance in UML.
An ‘is a’ relationship where one object (child) is a specialized form of another object (parent). Represented by a hollow triangle followed by a line.
Inheritance allows for code reuse and the creation of hierarchical relationships.
What are parameter variables?
The additional information a method requires to execute.
Parameter variables enhance the flexibility and functionality of methods.
Define constructor method.
A method that initializes an object when created.
Constructors are crucial for setting up an object’s initial state.
What is an accessor method?
Gives information about the object’s state to whoever calls the method.
Accessors are commonly known as getter methods.
What is a mutator method?
Changes the state of their object.
Mutators are often referred to as setter methods.
Define signature in programming.
The method’s name and its parameter types.
The signature uniquely identifies a method within its class.
Define instance variables.
Defined in a class, represent the object’s properties, and exist as long as the object exists.
Instance variables store the state of an object.
Define constructor.
A special method that sets up an object when first created, mainly to set up the instance variables.
Constructors can have parameters to allow for different initialization scenarios.
Define Array.
A collection of items of the same type, each accessed by its position called an index.
Arrays are fundamental data structures used to store multiple values.
List characteristics of a linear array.
Characteristics include:
* It has a name
* Its size is fixed and cannot be changed while the program runs
* It has a data type that specifies the kind of data it can hold
Linear arrays are commonly used in programming for sequential data storage.
Define parallel arrays.
a group of multiple arrays used to represent a single array
Parallel arrays are often used when multiple attributes of an object need to be kept together.
What are the two types of arrays in Java?
Types include:
* Classic static array - size fixed at declaration
* ArrayLists - dynamically resizable construct (used when the array size is not known in advance)
ArrayLists provide flexibility over traditional arrays.
Inner part of the class
instance variables : store data persistently within an object
Constructors: ensure that an object is set up properly when its first created. Ensure that the object is ready for use immediately following its creation. This process is also called initialization
Methods: implement the behaviour of the object; provide its functionality