Computer Science Exam Semester 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/206

flashcard set

Earn XP

Description and Tags

Year 11 ATAR

207 Terms

1
New cards

What is decimal?

The number system that we use everyday. It is base 10, meaning it uses digits 0-9.

2
New cards

What is binary?

Binary is a number system used by computers. It is base 2, meaning it only uses 0 and 1.

3
New cards

What is hexadecimal?

Hexadecimal is a number system used in computing. It is base 16, meaning it uses digits 0-9 and letters A-F.

4
New cards

What are the program control structures?

Blocks of code that dictate the order in which a computer executes instructions.

5
New cards

What is sequence in programmming?

Sequence is when instructions are executed in order, one after another, from top to bottom.

6
New cards

What is selection in programming?

Selection is when a program makes a decision and chooses between different paths using conditions (like if, else, or switch).

7
New cards

What is iteration in programming?

Iteration is when a set of instructions is repeated multiple times using loops (like for loops or while loops).

8
New cards

What is scope?

The region of a program where a variable can be accessed or used.

9
New cards

What is local scope?

A variable created inside a function or block.

10
New cards

What is global scope?

A variable created outside functions. It can be used anywhere in the program.

11
New cards

What are parameters?

Parameters are variables listed in a function’s definition. They act as placeholders for values the function will receive.

12
New cards

What are arguments?

The actual values you pass into a function when you call it.

13
New cards

What is an integer (int).

Whole numbers, positive or negative, with no decimal point.

Examples: -3, 0, 42

14
New cards

What is a float?

Numbers with decimal points.

Examples: 3.14, -0.5, 10.0

15
New cards

What is a string?

Sequence of characters grouped together, enclosed with quotation marks.

Examples: “Hello World", “12345", “site.com"

16
New cards

What is a one-dimensional array and what are its characteristics?

A data structure used to store a collection of items in a single variable. Every item (or “element”) is stored in a specific, sequential order and can be accessed using a numerical position/index.

17
New cards

Pseudocode for Sequence

FUNCTION Main

INPUT(a)

INPUT(b)

c = a + b

PRINT(c)

END Main

18
New cards

Pseudocode for Selection

Selection - one-way
IF condition THEN

do something

END IF

Selection - Two-way

IF condition THEN

do something

ELSE

do something

END IF

Selection - multi-way (IF)
IF condition THEN

do something

ELSE IF condition THEN

do something

ELSE

do something

END IF

19
New cards

Pseudocode for Iteration

Iteration - WHILE (test first)
WHILE condition

do something

END WHILE


Iteration - REPEAT UNTIL (test last)
REPEAT

do something

UNTIL condition

Iteration - FOR (fixed)
FOR variable = start TO finish STEP increment

do something

END FOR

20
New cards

Pseudocode for Functions

FUNCTION Main

result = 0

result = MyFunction(arg)

PRINT(result)

END Main

FUNCTION MyFunction(param)

localVar = 0

localVar = param + 1

RETURN localVar

END MyFunction

21
New cards

Pseudocode Scope Examples

globalVar = 0 # global — accessible in all functions

FUNCTION Example

localVar = 0 # local — only exists inside this function

localVar = globalVar + 1

RETURN localVar

END Example

22
New cards

Pseudocode Data Types

age = 17 # integer

price = 3.99 # float

name = "Alex" # string

isEnrolled = TRUE # Boolean

23
New cards

Pseudocode Arithmetic Operators

a + b # addition

a - b # subtraction

a * b # multiplication

a / b # division

a % b # modulus (remainder)

a // b # integer division (DIV)

24
New cards

Pseudocode Relational Operators

a == b # equal to

a != b # not equal to

a > b # greater than

a < b # less than

a >= b # greater than or equal to

a <= b # less than or equal to

25
New cards

Pseudocode Logical Operators

x > 0 AND x < 10

x < 0 OR x > 10

NOT condition

26
New cards

Pseudocode for One-dimensional Array

scores = []

scores[0] = 85

scores[1] = 72

scores.append(90)

length = scores.length

FOR i = 0 TO scores.length - 1

PRINT(scores[i])

END FOR

27
New cards

What is the logical order of precedence with boolean expressions?

  1. Parentheses ()

  2. NOT

  3. AND

  4. OR


When operators share priority, they are evaluated from left to right.

28
New cards

Pseudocode Boolean Expressions and Order of Precedence

NOT a AND b OR c # evaluated as: ((NOT a) AND b) OR c

(a OR b) AND (c OR d) # brackets change the order

29
New cards

What are the four main stages of the software development framework?

  1. Investigate

  2. Design

  3. Develop

  4. Evaluate


30
New cards

What are the three key activities involved in the investigate stage?

  1. Problem Description: Defining what the issue is and what needs to be solved.

  2. Define Requirements: Outlining what the software must do (features, constraint, user needs)

  3. Development Schedules: Creating a timeline for the project, often using tools like Gantt charts.


31
New cards

What’s the difference between functional and non-functional requirements.

  • Functional defines what a system must do (its features and core behaviour)

  • Non-Functional requirements define how the system should perform (its quality, security, and operational constraints)


32
New cards

What is a Gantt chart?

A visual timeline/project management tool that displays tasks, durations, and dependencies over time. It belongs to the Investigate stage (under development schedules).

<p>A visual timeline/project management tool that displays tasks, durations, and dependencies over time. It belongs to the Investigate stage (under development schedules). </p>
33
New cards

What are the two primary focus areas during the Design stage?

  1. Design data structures: Deciding how data will be stored and organized (e.g., variables, arrays, records)

  2. Design and test algorithms: Creating the logic of the program (using pseudocode or flowcharts) and desk-checking it before writing code.


34
New cards

What are the two core tasks performed during the Develop stage?

  1. Develop and debug code: Writing the actual program in a programming language and fixing syntax/logic errors.

  2. Unit testing: Testing individual components or modules of code independently to ensure they work correctly.


35
New cards

What are the two activities involved in the Evaluate stage?

  1. User Acceptance Testing (UAT): Having the actual end-users test the software to ensure it meets their needs and requirements.

  2. Developer retrospective: A post-project reflection where the development team reviews what went well, what didn’t, and how to improve future projects.


36
New cards

Why is it good practice to validate input before processing?

To ensure that the data entered by the user is clean, correct, and within expected bounds. This prevents program crashes, logic errors, and security vulnerabilities.

37
New cards

Why should you use meaningful variable names and constants?

  • Meaningful variables: Makes the code self-documenting and easier to understand what data is being held.

  • Constants: Improves readability (e.g., using MAX_SPEED instead of 110) and makes maintenance easy, as you only need to change the value in one place.


38
New cards

What does "appropriate use of standard control structures" mean?

Using the correct programming constructs to control the flow of execution:

  • Sequence: Executing statements line by line.

  • Selection: Making decisions (if/else, switch/case).

  • Iteration: Repeating code effectively (for loops for known counts, while loops for conditions).


39
New cards

What are the two rules for good programming practice regarding modules (functions/procedures)?

  1. One logical task per module: Each module should do one specific thing (high cohesion). This makes code reusable and easier to debug. 2.

  2. Meaningful names for modules: The module name should clearly state what action it performs (e.g., calculate_tax() instead of proc1()).


40
New cards

What is exception handling and why is it used?

A mechanism (like try/except) designed to intercept and handle runtime errors gracefully. It prevents the program from abruptly crashing when unexpected events occur (e.g., file not found, division by zero).

41
New cards

What is modularisation and what are three distinct benefits of using a modular approach to design software?

A design methodology that breaks a complex problem down into smaller, less complex, independent sub-tasks.


Benefits:

  • Allows code to be reused and reduces repetition.

  • Enables multiple developers to work on separate modules concurrently.

  • Makes algorithms and programs easier to read, test, and debug


42
New cards

What is a structure chart and how is it used as a design tool?

A top-down diagram that shows how a program is broken into smaller parts (modules). It also shows how these parts connect and what data they pass between each other.

<p>A top-down diagram that shows how a program is broken into smaller parts (modules). It also shows how these parts connect and what data they pass between each other.</p>
43
New cards

What is a stub in software development and why is it used?

A stub in software development is a simple, placeholder version of a function or module that doesn’t have full real logic yet.

44
New cards

Pseudocode: Load an Array and Print Its Contents

FUNCTION LoadAndPrintArray

names = []

i = 0

PRINT("Enter a name: ")

INPUT(name)

WHILE name != ""

names[i] = name

i = i + 1

INPUT(name)

END WHILE

FOR i = 0 TO names.length - 1

PRINT(names[i])

END FOR

END FUNCTION

45
New cards

Pseudocode: Summing the Contents of an Array

FUNCTION AddArray

numbers = [4, 8, 23, 52, 3, 27, 86]

total = 0

FOR i = 0 TO numbers.length - 1

total = total + numbers[i]

END FOR

PRINT(total)

END FUNCTION

46
New cards

Pseudocode: Identifying Position of Minimum Value

FUNCTION FindMinimumValue

numbers = [4, 8, 23, 52, 3, 27, 86]

min = numbers[0]

min_index = 0

FOR i = 1 TO numbers.length - 1

IF numbers[i] < min THEN

min = numbers[i]

min_index = i

END IF

END FOR

PRINT("The minimum value is", min)

PRINT("The minimum value is at position", min_index)

END FUNCTION

47
New cards

Pseudocode: Identifying Position of Maximum Value

FUNCTION FindMaximumValue

numbers = [4, 8, 23, 52, 3, 27, 86]

max = numbers[0]

max_index = 0

FOR i = 1 TO numbers.length - 1

IF numbers[i] > max THEN

max = numbers[i]

max_index = i

END IF

END FOR

PRINT("The maximum value is", max)

PRINT("The maximum value is at position", max_index)

END FUNCTION

48
New cards

How do you open, read line-by-line, and close a file in both pseudocode and Python?

Pseudocode:
FUNCTION ReadFile

myfile = OPEN_READ(“data.txt”)

lines = []

WHILE NOT myfile.end_of_file

line = myfile.READLINE()

lines.append(line)

END WHILE

CLOSE(myfile)

END ReadFile

Python:
with open("data.txt", "r") as myfile:

for line in myfile:

line = line.strip()

49
New cards

How do you write data to a new file (overwriting existing content) in both pseudocode and Python?

Pseudocode:
FUNCTION WriteFile

myfile = OPEN_WRITE(“outputfile.txt”)

lines = [“Twinkle Twinkle Little Star”, “Baa Baa Black Sheep”, “Hickory Dickory Dock”]

FOR i = 0 TO (lines.length – 1)

myfile.WRITELINE(lines[i])

END FOR

CLOSE(myfile)

END WriteFile


Python:

lines = ["Line 1\n", "Line 2\n", "Line 3\n"]

with open("outputfile.txt", "w") as myfile:

myfile.writelines(lines)

50
New cards

How do you open a file to add data to the end of it without overwriting its current contents in both pseudocode and Python?

Pseudocode:

FUNCTION AppendFile

myfile = OPEN_APPEND(“names_file.txt”)

names = [“James Smith”, “Aaron Jones”, “Sally Gonzales”]

FOR i = 0 TO (names.length – 1)

myfile.WRITELINE(names[i])

END FOR

CLOSE(myfile)

END AppendFile

51
New cards

What is the purpose of testing “all pathways” through an algorithm, and why must you use data where the “required answer is known’?

  • All pathways: Ensures evert branch of execute (every IF, ELSE IF, and ELSE block) is triggered and evaluated to confirm it works correctly under all conditions.

  • Known answer data: If you do not know what the output should be beforehand, you cannot mathematically prove whether the algorithm’s calculation or output is actually correct.


52
New cards

Suppose a program awards a pass if a mark is 50 or higher (IF mark >= 50). What are the exact "at", "above", and "below" boundary test cases needed for this decision?

  • At the boundary: 50 (tests if the inclusive condition works).

  • Above the boundary: 51 (tests if values just inside the passing range work).

  • Below the boundary: 49 (tests if values just inside the failing range work).


53
New cards

Differentiate between Type checking and Range checking when validating test data.

  • Type checking: Verifies that the data entered matches the expected data type (e.g., ensuring a user enters an Integer instead of a String for their age).

  • Range checking: Verifies that a numerical value falls within an acceptable upper and lower bound (e.g., ensuring an exam mark is between 0 and 100).


54
New cards

What is desk checking and how is a trace table used during this process?

Desk checking is a manual, pen-and-paper technique used to step through an algorithm's logic line by line before coding.

A trace table is the tool used to track this process; it features columns for variable names, loop conditions, and outputs, mapping how their values change dynamically with each step of execution.

<p>Desk checking is a manual, pen-and-paper technique used to step through an algorithm's logic line by line before coding.</p><p>A <strong>trace table</strong> is the tool used to track this process; it features columns for variable names, loop conditions, and outputs, mapping how their values change dynamically with each step of execution.</p>
55
New cards

What does it mean to "step through" a coded solution during debugging?

Using an Integrated Development Environment (IDE) debugger to execute a program one single line at a time. This allows the developer to pause execution at breakpoints and watch how variables change in real-time to find exactly where logic goes wrong.

56
New cards

What is an IDE?

An IDE (Integrated Development Environment) is software that combines commonly used development tools into one self-sustainable application.

The Main Features:

  • Source Code Editor (often features syntax highlighting and autocomplete)

  • Build Automation/Compiler (single click of a “Run” button)

  • Debugger (allows you to step through your code line by line)


57
New cards

Define and give an example of the three main types of software errors

  • Syntax Error: Breaking the grammatical rules of the language. The code won't compile or run. (e.g., Misspelling whle or forgetting a colon).

  • Runtime Error: An error that occurs while the program is running, causing it to crash abruptly. (e.g., Division by zero, or attempting to open a file that does not exist).

  • Logic Error: The program runs without crashing but produces the wrong output because the underlying design or math is flawed. (e.g., Writing average = total * count instead of total / count).


58
New cards

What are the two main purposes of inserting temporary print() statements into code for debugging?

1. Execution Path Verification: To identify which sections of code (like specific IF branches or loops) have actually been executed.

2. Variable Interrogation: To check the actual contents of variables at specific milestones in the program to see where data becomes corrupted.

59
New cards

What is an API?

A set of rules and protocols that allows different software applications to communicate and share data with one another

60
New cards

How are APIs used during software development?

Developers use APIs to integrate pre-built external functionalities or data streams into their own applications (e.g., embedding Google Maps into an app or fetch real-time weather data) without having to code those complex systems from scratch.

61
New cards

What is plagiarism?

The act of using another person’s words, ideas, code, or intellectual property and presenting them as your own without proper acknowledgment.

62
New cards

Define Intellectual Property (IP) and explain what plagiarism is in software development.

  • Intellectual Property: Things created by the mind (like software code, designs, and algorithms) that are legally protected so others can’t copy or use them without permission.

  • Plagiarism in Code: Copying someone else’s code or ideas and pretending it is your own work without giving credit to the original creator.


63
New cards

What protection do Australian copyright laws provide to software developers, and what is the purpose of a software license?

  • Australian Copyright Law: Automatically protects original software code as soon as it is written down or saved in any form. You don’t need to register it.

  • Software Licensing: A legal agreement that explains how you are allowed to use software—like whether you can install it, share it, change it, or distribute it.


64
New cards

What is the difference between Open Source and Proprietary software licenses?

  • Open Source: The code is available for anyone to see. People can use it, change it, improve it, and share it freely under certain rules (e.g. Linux, Python).

  • Proprietary: The code is kept secret by a company or owner. Users can use the software by buying a license, but they cannot see, change, or share the code (e.g. Windows, Adobe Photoshop).


65
New cards

Purpose of the DoD TCP/IP model

The DoD (Department of Defense) TCP/IP model is used to standardise how data is sent and received over networks. Its main purpose is to break communication into layers so different systems and networks can work together reliably, even if they use different hardware or software.

66
New cards

List the four layers of the DoD TCP/IP model in order from the highest layer (user-facing) to the lowest layer (hardware-facing).

Application (4)

Transport (3)

Internet (2)

Network access (1)

67
New cards

What is the role of the Application layer in the TCP/IP model?

The Application layer is the top layer that allows users and applications to access network services. It provides protocols and rules for communication between software applications over a network, such as sending emails, browsing websites, or transferring files.

68
New cards

What are five key protocols associated with the Application layer?

  • HTTP / HTTPS: Web browsing (Hypertext Transfer Protocol / Secure).

  • FTP: File Transfer Protocol.

  • SMTP: Simple Mail Transfer Protocol (sending emails).

  • DNS: Domain Name System (translating domain names like google.com into IP addresses).

  • DHCP: Dynamic Host Configuration Protocol (automatically assigning IP addresses to devices on a network).


69
New cards

What is the role of the Transport layer, and what are its two core protocols?

The Transport layer is responsible for delivering data between devices reliably and efficiently. It breaks data into segments, manages flow control, and ensures data arrives correctly (or as fast as possible, depending on the method used).

70
New cards

What 2 protocols are used in the Transport layer?

  • TCP (Transmission Control Protocol): A reliable, connection-based method that ensures data arrives correctly and in the right order by checking for errors.

  • UDP (User Datagram Protocol): A faster, connectionless method that sends data without checking if it arrives or is in order, making it useful for things like streaming and online games.


71
New cards

What is the role of the Internet layer, and what is its primary protocol?

This layer handles putting data into packets, adding addresses, and sending them across networks from the sender to the correct destination.

Key protocol:

  • IP (Internet Protocol): Responsible for addressing and routing data packets to the right device.


72
New cards

What is the role of the Network layer (also known as Network Access layer)?

This layer controls how data is actually sent over a network using cables, Wi-Fi, or other signals. It changes data into signals and handles how it is packaged for transmission. It also links IP addresses to physical device addresses (MAC addresses).

It is used in technologies like Ethernet, Wi-Fi, and network hardware like NICs (Network Interface Cards).

73
New cards

What is the fundamental role of an IP Address in a network?

An IP address is a unique number given to each device on a network. It helps find and identify devices so data can be sent to the correct destination across networks.

74
New cards

What is the purpose and role of a subnet mask?

A subnet mask is a 32-bit number used with an IP address to divide the IP address into two distinct parts:

  1. The Network ID (identifies the specific network the device belongs to).

  2. The Host ID (identifies the specific device on that network).

It allows routers to determine whether a destination IP address is on the local network or needs to be forwarded to an external gateway.

75
New cards

Outline three key differences between IPv4 and IPv6 regarding address size, notation, and total address space.

  • Address size: IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses (much larger).

  • Notation: IPv4 is written in decimal with dots (e.g. 192.168.1.1), while IPv6 is written in hexadecimal with colons (e.g. 2001:db8::1).

  • Total address space: IPv4 supports about 4.3 billion unique addresses, while IPv6 supports a massively larger number (around 3.4 × 10³⁸ addresses), enough for virtually unlimited devices.


76
New cards

Aside from a larger address space, what are two structural or operational benefits of IPv6 over IPv4?

  • Built-in security: IPv6 has built-in security features (IPsec) for encrypting and authenticating data.

  • No need for NAT: Because there are so many IP addresses, devices don’t need NAT to share one public IP.

  • More efficient routing: IPv6 has simpler headers, so routers can process data faster.


77
New cards

What is UTP (Unshielded Twisted Pair) cable?

A type of copper cable made of twisted wires used for short-distance network connections (e.g. Ethernet). It is cheap but more prone to interference than fibre optics.

78
New cards

What is fibre optic cable?

A high-speed cable that uses light to transmit data through glass or plastic fibres. It is very fast, reliable, and resistant to interference, but more expensive.

79
New cards

What is wireless transmission?

A method of sending data through air using radio, microwave, or infrared signals. It allows mobility but can be affected by interference and distance limits.

80
New cards

What’s a modem?

A device that converts data between analog signals (used by ISPs over telephone/coaxial lines) and digital signals (used by local computer networks). It connects your house to the Internet.

81
New cards

What’s a router?

Connects completely different networks together (e.g., your local home network to the internet) and routes data packets between them at the Internet layer using IP addresses.

82
New cards

What is the function of a Switch and at which level of addressing does it operate?

A switch connects devices within the same local network (LAN), like computers and printers. It uses MAC addresses to send data directly to the correct device, which helps reduce unnecessary network traffic. It operates on the network access layer.

83
New cards

What is the purpose of a Wireless Access Point (WAP)?

An access point connects wireless devices (like phones and laptops) to a wired network (LAN). It sends out a Wi-Fi signal so devices can connect without cables.

84
New cards

What is the fundamental function of a Firewall within network infrastructure?

A security system that monitors, filters, and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between a trusted internal network and untrusted external networks (like the internet) to block unauthorized packets.

85
New cards

What are three core reasons why an organization must prevent unauthorized access to its network?

  1. Data Confidentiality: Protecting sensitive personal, financial, or intellectual property from being stolen or leaked (Data Breach).

  2. Network Availability: Preventing malicious entities from disrupting network operations (e.g., DDoS attacks, malware infiltration) which causes downtime.

  3. Data Integrity: Ensuring that critical data is not altered, tampered with, or deleted by unauthorized intruders.


86
New cards

How do firewalls explicitly protect a network? (Name two mechanisms).

  • Packet Filtering: Analyzing packet headers (inspecting source IP, destination IP, protocols, and port numbers) to block or allow them based on security policies.

  • Stateful Inspection: The firewall keeps track of active connections and only allows incoming data if it belongs to a trusted, already established connection.


87
New cards

What are three ways an Operating System (OS) contributes to maintaining network security?

  • User authentication & access control: Checks who the user is (passwords/biometrics) and controls what they are allowed to do (read, write, execute).

  • Security updates and patching: Regular updates that fix security problems and protect against hackers.

  • Built-in security tools: Includes tools like firewalls, logs, and encryption (e.g. BitLocker) to help protect data and the system.


88
New cards

Name four primary technical factors that can significantly impact the data transmission speed and overall performance of a network.

  • Bandwidth

  • Network design (topology, hardware, and physical layout)

  • Data collisions

  • Excess broadcast traffic


89
New cards

What is bandwidth and how does it differ from network throughput?

  • Bandwidth: The maximum amount of data a network can transfer in a given time (theoretical limit), usually measured in Mbps or Gbps.

  • Throughput: The actual amount of data successfully transferred in real conditions, which is usually lower than bandwidth due to delays, errors, and congestion.


90
New cards

What is data collision?

A data collision happens when two or more devices on a shared network simultaneously transmit data. Their signals overlap and corrupt each other, resulting in unusable data that must be discarded and resent.

91
New cards

What can help with data collisions?

Switches: They send data only to the specific device instead of broadcasting to all devices, greatly reducing collisions.

92
New cards

How does network design (choice of transmission media and hardware) affect network performance?

  • Transmission Media: Using Fibre Optics instead of UTP copper cabling drastically increases potential speeds and limits interference over distances.

  • Hardware Choice: Utilizing Switches instead of legacy Hubs prevents data from being blindly broadcast to all ports, which creates a more direct and efficient data flow.

  • Network Topology: The layout and pathing choices determine how many routing hops or bottlenecks data packets must cross to reach their destination.


93
New cards

What is excess broadcast traffic (sometimes leading to a "broadcast storm") and why does it slow down network performance?

Broadcast traffic is when one data packet is sent to all devices on a local network (like DHCP or ARP requests).

If there is too much broadcast traffic, every device has to check and process these packets even if they are not meant for it. This wastes processing power and can slow down the network by filling it with unnecessary traffic.

94
New cards

What is WLAN?

A WLAN is a type of local network that connects devices using wireless signals (Wi-Fi) instead of cables.

It allows devices like phones, laptops, and tablets to connect to a network and share data within a limited area such as a home, school, or office.

95
New cards

What is freeware?

Proprietary software available to use for free, but it can't be re-distributed or modified (eg. Adobe Reader)

96
New cards

What is shareware?

Shareware is proprietary software distributed to users for free, but with the expectation or requirement that you pay for it after a trial period or to unlock full functionality.

97
New cards

What is a network?

A group of interconnected computing devices (like computers, servers, and mobile phones) that communicate to share data and resources.

98
New cards

Network Diagram Conventions

knowt flashcard image
99
New cards

Example Network Diagram

knowt flashcard image
100
New cards

What are 3 reasons we use an IP address?

  • Device Identification – Uniquely identifies a device on a network.

  • Data Routing – Directs data packets to the correct destination and back.

  • Location Addressing – Provides network location information for delivering services and localized content.