Podcast
Questions and Answers
In the context of program development, what is the primary purpose of 'Evaluation'?
In the context of program development, what is the primary purpose of 'Evaluation'?
- To assess if the program meets its objectives and is resilient under various conditions. (correct)
- To determine the aesthetic appeal of the user interface.
- To speed up the execution time of the software.
- To minimize the amount of code written for the program.
Which of the following best describes the 'Processes' stage in program development?
Which of the following best describes the 'Processes' stage in program development?
- The hardware requirements needed to run the program.
- The steps the program takes to manipulate and transform the inputted data. (correct)
- The initial planning phase outlining the project timeline.
- The method of gathering user feedback after the program is launched.
A programmer is using a structure diagram. What is its main function?
A programmer is using a structure diagram. What is its main function?
- To convert the source code into machine code.
- To divide a complex problem into more manageable parts. (correct)
- To create a visual representation of the program's user interface.
- To optimize the program's memory usage.
What is the key role of a flowchart in software development?
What is the key role of a flowchart in software development?
During which stage of program development might you revisit previous stages based on new information?
During which stage of program development might you revisit previous stages based on new information?
A photographer wants to store high-quality photographs with transparency. Which image format is most suitable?
A photographer wants to store high-quality photographs with transparency. Which image format is most suitable?
Which of the following changes would reduce the file size of an image while maintaining acceptable quality?
Which of the following changes would reduce the file size of an image while maintaining acceptable quality?
What is the primary reason for compressing files before sending them over the Internet?
What is the primary reason for compressing files before sending them over the Internet?
A graphic designer needs to archive a set of images. Which combination of settings will result in the highest quality images while minimizing file sizes?
A graphic designer needs to archive a set of images. Which combination of settings will result in the highest quality images while minimizing file sizes?
Which factor has the most significant impact on the file size and perceived quality of a digital audio recording?
Which factor has the most significant impact on the file size and perceived quality of a digital audio recording?
A musician is recording a song. What adjustment should be made to the sampling rate to capture more nuances in the music?
A musician is recording a song. What adjustment should be made to the sampling rate to capture more nuances in the music?
Which of the following scenarios illustrates the need for file compression?
Which of the following scenarios illustrates the need for file compression?
A video editor needs to reduce the file size of a video to upload it to a video-sharing website, but without significantly impacting the viewing experience. Which approach should the video editor take?
A video editor needs to reduce the file size of a video to upload it to a video-sharing website, but without significantly impacting the viewing experience. Which approach should the video editor take?
Consider the expression age > 65 AND retired == True
. Under what condition will this expression evaluate to True
?
Consider the expression age > 65 AND retired == True
. Under what condition will this expression evaluate to True
?
Given the condition NOT (city == 'New York')
, which of the following scenarios would evaluate to True
?
Given the condition NOT (city == 'New York')
, which of the following scenarios would evaluate to True
?
What is the difference between the =
and ==
operators?
What is the difference between the =
and ==
operators?
Which of the following expressions evaluates to True
if a student is enrolled in either class 1 or class 2, but not both?
Which of the following expressions evaluates to True
if a student is enrolled in either class 1 or class 2, but not both?
Under what circumstance will the condition age < 18 AND status != 'minor'
evaluate to True
?
Under what circumstance will the condition age < 18 AND status != 'minor'
evaluate to True
?
What would be the result of the expression (x > 5) OR (y < 10)
if x = 3
and y = 12
?
What would be the result of the expression (x > 5) OR (y < 10)
if x = 3
and y = 12
?
If isAdmin = False
, what will NOT isAdmin
evaluate to?
If isAdmin = False
, what will NOT isAdmin
evaluate to?
Choose the correct operator to check if the variable score
is exactly equal to 100.
Choose the correct operator to check if the variable score
is exactly equal to 100.
What is the primary purpose of an EQUI-JOIN operation in SQL?
What is the primary purpose of an EQUI-JOIN operation in SQL?
What will be the outcome if a DELETE
statement is executed without a WHERE
clause?
What will be the outcome if a DELETE
statement is executed without a WHERE
clause?
Consider the SQL statement: SELECT firstname, surname FROM student WHERE year > 3
. What information does this query retrieve?
Consider the SQL statement: SELECT firstname, surname FROM student WHERE year > 3
. What information does this query retrieve?
Why is documenting expected results important when testing SQL queries?
Why is documenting expected results important when testing SQL queries?
What is the function of the AND
operator in a SQL WHERE
clause?
What is the function of the AND
operator in a SQL WHERE
clause?
In an EQUI-JOIN operation, what happens if there are no matching entries between the primary key in one table and the foreign key in another?
In an EQUI-JOIN operation, what happens if there are no matching entries between the primary key in one table and the foreign key in another?
Consider the following SQL query:
SELECT * FROM employees WHERE salary > 50000 AND department = 'Sales';
What is the purpose of this query?
Consider the following SQL query:
SELECT * FROM employees WHERE salary > 50000 AND department = 'Sales';
What is the purpose of this query?
If given the tables 'students' and 'courses', what SQL statement would list the firstname, surname from the student table and the course name from the courses table for students with a StudentID less than 4?
If given the tables 'students' and 'courses', what SQL statement would list the firstname, surname from the student table and the course name from the courses table for students with a StudentID less than 4?
What would happen if the WHERE
clause was omitted from this SQL statement?
DELETE FROM pupils WHERE firstName = 'Eva' AND surname = 'Forrest';
What would happen if the WHERE
clause was omitted from this SQL statement?
DELETE FROM pupils WHERE firstName = 'Eva' AND surname = 'Forrest';
During program execution, what is the immediate consequence of encountering a syntax error?
During program execution, what is the immediate consequence of encountering a syntax error?
Which type of error would likely occur if a program attempts to calculate 5 / x
when x
is equal to 0?
Which type of error would likely occur if a program attempts to calculate 5 / x
when x
is equal to 0?
A program is designed to calculate the area of a rectangle but consistently outputs incorrect values due to using addition instead of multiplication. What type of error is present?
A program is designed to calculate the area of a rectangle but consistently outputs incorrect values due to using addition instead of multiplication. What type of error is present?
Which error type is typically addressed through thorough testing and debugging procedures?
Which error type is typically addressed through thorough testing and debugging procedures?
What distinguishes a syntax error from an execution error in programming?
What distinguishes a syntax error from an execution error in programming?
If a program compiles and runs but produces output that does not align with the intended functionality, what type of error is most likely present?
If a program compiles and runs but produces output that does not align with the intended functionality, what type of error is most likely present?
A programmer forgets to close a parenthesis in an expression. Which type of error will this cause?
A programmer forgets to close a parenthesis in an expression. Which type of error will this cause?
A program is designed to store an integer value, but due to a coding mistake, it attempts to store a string. What type of error is likely to occur?
A program is designed to store an integer value, but due to a coding mistake, it attempts to store a string. What type of error is likely to occur?
What would be the value of numWord
after executing the statement SET numWord TO LENGTH(word)
if word
is assigned the string "Programming"?
What would be the value of numWord
after executing the statement SET numWord TO LENGTH(word)
if word
is assigned the string "Programming"?
What is the purpose of the RANDOM(1, 59)
function?
What is the purpose of the RANDOM(1, 59)
function?
What is printed to the display if the user initially enters 150 for score
in the provided pseudocode?
What is printed to the display if the user initially enters 150 for score
in the provided pseudocode?
How many times will the loop iterate in the following code snippet:
SET total TO 0
FOR counter 0 TO 5
GET itemPrice FROM (REAL) KEYBOARD
SET total = total + itemPrice
END FOR
How many times will the loop iterate in the following code snippet:
SET total TO 0
FOR counter 0 TO 5
GET itemPrice FROM (REAL) KEYBOARD
SET total = total + itemPrice
END FOR
What is the purpose of the WHILE
loop condition score < 1 OR score > 100
?
What is the purpose of the WHILE
loop condition score < 1 OR score > 100
?
In the context of the pseudocode provided, what is meant by 'traversing' a 1-D array?
In the context of the pseudocode provided, what is meant by 'traversing' a 1-D array?
Consider the code for calculating the total price. What data type should itemPrice
be to accurately represent prices with decimal values?
Consider the code for calculating the total price. What data type should itemPrice
be to accurately represent prices with decimal values?
What is the initial value of the total
variable before the FOR
loop begins?
What is the initial value of the total
variable before the FOR
loop begins?
If the user enters the following item prices: 1.50, 2.50, 3.50, 4.50, 5.50, and 6.50, what will be the final value of the total
variable?
If the user enters the following item prices: 1.50, 2.50, 3.50, 4.50, 5.50, and 6.50, what will be the final value of the total
variable?
Which of the following is a direct benefit of validating user input, as demonstrated by the WHILE
loop example?
Which of the following is a direct benefit of validating user input, as demonstrated by the WHILE
loop example?
Instead of a FOR
loop, could a WHILE
loop be used to achieve the same result for accumulating the total price of items? Why or why not?
Instead of a FOR
loop, could a WHILE
loop be used to achieve the same result for accumulating the total price of items? Why or why not?
What modification would allow the program to accept scores between 0 and 100 (inclusive)?
What modification would allow the program to accept scores between 0 and 100 (inclusive)?
If the goal is to sum prices from a dynamically sized array (unknown number of items), which loop type is most appropriate?
If the goal is to sum prices from a dynamically sized array (unknown number of items), which loop type is most appropriate?
What happens if the data type specified in GET itemPrice FROM (REAL) KEYBOARD
does not match the actual data type entered by the user?
What happens if the data type specified in GET itemPrice FROM (REAL) KEYBOARD
does not match the actual data type entered by the user?
What is the significance of the END FOR
statement in the provided pseudocode?
What is the significance of the END FOR
statement in the provided pseudocode?
Flashcards
What is a PNG file?
What is a PNG file?
Lossless image format supporting animation, transparency and up to 48-bit color.
What is graphic resolution?
What is graphic resolution?
The number of pixels per inch in an image.
How does graphic resolution affect file size?
How does graphic resolution affect file size?
More pixels per inch lead to better quality but increases file size.
What is color bit depth?
What is color bit depth?
Signup and view all the flashcards
How does color bit depth affect file size?
How does color bit depth affect file size?
Signup and view all the flashcards
What is sampling rate?
What is sampling rate?
Signup and view all the flashcards
How does sampling rate affect file size?
How does sampling rate affect file size?
Signup and view all the flashcards
Why is compression needed?
Why is compression needed?
Signup and view all the flashcards
Evaluation (in programming)
Evaluation (in programming)
Signup and view all the flashcards
Program Inputs
Program Inputs
Signup and view all the flashcards
Program Processes
Program Processes
Signup and view all the flashcards
Program Output
Program Output
Signup and view all the flashcards
Structure Diagrams
Structure Diagrams
Signup and view all the flashcards
SQL DELETE
SQL DELETE
Signup and view all the flashcards
DELETE FROM table (no WHERE)
DELETE FROM table (no WHERE)
Signup and view all the flashcards
SQL EQUI-JOIN
SQL EQUI-JOIN
Signup and view all the flashcards
EQUI-JOIN Requirements
EQUI-JOIN Requirements
Signup and view all the flashcards
SQL AND Operator
SQL AND Operator
Signup and view all the flashcards
SQL OR Operator
SQL OR Operator
Signup and view all the flashcards
SQL > Operator
SQL > Operator
Signup and view all the flashcards
Testing Queries
Testing Queries
Signup and view all the flashcards
Verifying SQL Operations
Verifying SQL Operations
Signup and view all the flashcards
SQL Join requirements
SQL Join requirements
Signup and view all the flashcards
What does the '<' operator mean?
What does the '<' operator mean?
Signup and view all the flashcards
What does the '>' operator mean?
What does the '>' operator mean?
Signup and view all the flashcards
What does the '==' operator mean?
What does the '==' operator mean?
Signup and view all the flashcards
What does the '!=' operator mean?
What does the '!=' operator mean?
Signup and view all the flashcards
What does the 'AND' operator mean?
What does the 'AND' operator mean?
Signup and view all the flashcards
What does the 'OR' operator mean?
What does the 'OR' operator mean?
Signup and view all the flashcards
What does the 'NOT' operator mean?
What does the 'NOT' operator mean?
Signup and view all the flashcards
What does the '<=' operator mean?
What does the '<=' operator mean?
Signup and view all the flashcards
Syntax Error
Syntax Error
Signup and view all the flashcards
Execution Error
Execution Error
Signup and view all the flashcards
Logic Error
Logic Error
Signup and view all the flashcards
Syntax Error example
Syntax Error example
Signup and view all the flashcards
Execution Error example
Execution Error example
Signup and view all the flashcards
Logic Error example
Logic Error example
Signup and view all the flashcards
Syntax error detection
Syntax error detection
Signup and view all the flashcards
Logic error detection
Logic error detection
Signup and view all the flashcards
LENGTH Function
LENGTH Function
Signup and view all the flashcards
RANDOM Function
RANDOM Function
Signup and view all the flashcards
Input Validation
Input Validation
Signup and view all the flashcards
Input Validation Loop
Input Validation Loop
Signup and view all the flashcards
Fixed Loop
Fixed Loop
Signup and view all the flashcards
Traversing an Array
Traversing an Array
Signup and view all the flashcards
Why traverse an array
Why traverse an array
Signup and view all the flashcards
Searching an array
Searching an array
Signup and view all the flashcards
Sorting an array
Sorting an array
Signup and view all the flashcards
Sorting an array
Sorting an array
Signup and view all the flashcards
Reversing
Reversing
Signup and view all the flashcards
Summing
Summing
Signup and view all the flashcards
Max Value
Max Value
Signup and view all the flashcards
Algorithm
Algorithm
Signup and view all the flashcards
Boolean Expression
Boolean Expression
Signup and view all the flashcards
Study Notes
- Everything stored by a computer is stored using Binary, indicated by 0 and 1
- Example: 37 in denary is 00100101 in binary, derived from 0+0+32+0+0+4+0+1
Floating Point Representation
- The mantissa and exponent are stored as separate numbers
- The number is recreated for calculations when needed
Extended ASCII Code
- Each character is represented by an 8-bit ASCII code
- 'V' is represented as 86, or 01010110 in binary
Vector Graphics
- Vector graphics store a picture by storing the attributes of each object to draw the shape
- Rectangle attributes: height, width, x coordinate, y coordinate, fill color, line color
- Ellipse attributes: cx, cy, rx, ry, fill color, line color
- Line attributes: x1, y1, x2, y2, line color
- Polygon attributes: x1, y1, x2, y2, x3, y3, fill color, line color (any shape with 3+ sides)
Bit-mapped Graphics
- Computers store each pixel in binary
- The number of bits per pixel depends on the number of colors in the image: more colors require more bits
Computer Architecture Components
- Control Unit: controls the sequencing of fetching, decoding, and executing instructions
- Arithmetic Logic Unit: performs all calculations and logical operations
- Registers: temporary memory locations within the processor
Memory Locations and Buses
- Each location within RAM has a unique address for reading/writing data correctly
- Address Bus: identifies the memory location for reading/writing
- Data Bus: transfers data between the processor and memory
Interpreters and Compilers
- Interpreter: translates one line of code at a time into machine code and executes immediately and is useful for testing, highlighting errors instantly
- Compiler: translates the entire program and saves the machine code version for repeated use and useful for program release
Environmental Impact from Computer Systems
- Approximately two billion computer systems are in use worldwide, each using energy
- Users should consider ways to reduce unnecessary energy consumption
- Reducing brightness and activating efficiency mode helps reduce energy consumption
Power Settings
- Power down settings: power-down after inactivity, control setting for single components
- Standby: reduces power consumption compared to being fully on
Firewalls
- Firewalls protect against suspicious access to a computer
- External access is either granted or denied by the firewall
Encryption
- Encryption encodes information to be unreadable if intercepted
- Only the sender and receiver can understand the encrypted information
Website Analysis
- End-user: the intended audience for the website (e.g., children, employees)
- Functional requirements: features the website must have (e.g., search a database)
Website Structure
- Linear: users move sequentially from page to page
- Hierarchical: page access depends on position within the hierarchy
Wireframing
- Wireframing is for designing visual web page layouts, showing:
- Navigational links: internal (within site), external (to another site)
- Absolute addresses: full URL
- Relative addresses: URL based on the current location
Website Consistency
- Maintain consistent design rules across all pages
- Relative vertical positioning: placement of text, graphics, audio, and video
- File formats: choice of media formats (text, graphics, video, audio)
Copyright, Designs, and Patents Act
- Protects text, graphics, video, and audio within a website
- Prevents unauthorized copying, use, or distribution without the owner's permission
Standard File Formats
- Audio:
- wav: uncompressed, high quality, large file size
- mp3: lossy compression, good quality, smaller file size
- Graphics:
- jpeg: lossy compression, no transparency/animation
- gif: lossless compression, animation/transparency, 8-bit
- png: lossless compression, animation/transparency, 48-bit
- Graphic Resolution: more pixels per inch means better quality, larger file sizes
- Color Bit Depth: more bits per color means more colors, larger file sizes
- Sampling Rate: more samples per second means more realistic audio, but larger file sizes
Need for Compression
- Reduces file size for storage and faster transfer online
Prototyping
- A draft interface is produced early in development
- It resembles the intended look and feel of the final product
Cascading Style Sheets (CSS)
- CSS defines web page colors, fonts, and layout:
- Internal Stylesheet: CSS code within the section of an HTML file
- External Stylesheet: CSS in a separate file, linked to the HTML document
- Selectors: target HTML elements for styling using syntax such as H1 {color: blue; font-size: 12px;}
- ID: A unique identifier for an element, styled via CSS with #
- Class: applied to multiple HTML tags and styled via CSS with .classname
JavaScript Coding for Mouse Events
- Script tags enclose javascript code
- The color changes when the mouse hovers over or away with the ID demo
HTML Code
<html> </html>
: tells the browser the rest of the document contains HTML<head> </head>
: contains information about the page itself – including CSS<title> </title>
: title of the webpage, appears on browser tabs.<body> </body>
: page content is placed between these tags.<h1> </h1>
: creates a heading, there are six different sizes (h1 to h6)<p> </p>
: defines a paragraph<div> </div>
: used so CSS can be applied to a group of elements<a href = “link url”> link text </a>
: creates a hyperlink – can take user to different page/ website<img src = “image url”>
: inserts an image.<audio> <source src = “audio url”> </audio>
: inserts an audio file<video> <source src = “video url”> </video>
: inserts a video file- List elements
<ol> </ol>
: creates an ordered list - numbered<ul> </ul>
: created an un-ordered list - bulleted<li> </li>
: adds a list item
Hyperlinks
- internal and external
- relative and absolute addressing
Testing
- Code Examples make use of the above HTML
- Matches user-interface design
- Links and navigation function as intended
- Media (text, graphics, video) displays adequately
- The goal is consistency among pages
Evaluation
- Yes, when the website is fit for purpose
- No, the developer should revisit previous phases in the development process
Database Analysis
- End-user: what the end user wants to able to do with the database
- Functional requirements: the tasks the database should perform/ data it should hold
Data Protection Act 1998
- Ensures personal data is securely held and not shared
- Businesses must have prior consent, ensure accuracy, use data for limited purposes, and keep data secure
Entity-Relationship Diagrams
- Entity: a table
- Attribute: a field
- The diagram shows how the two relate
Data Dictionary
- A data dictionary includes the name and description of the attributes in each entity within a database
Attribute Type Examples
- Text: a combination of text and number e.g. name, address, telephone number
- Number: whole numbers and decimal numbers
- Boolean: true or false
Validation
- Validation makes it more difficult to make mistakes
Examples of Validation
- Range: ensures data is within a specified lower and upper limit
- Restricted Choice: limits the entry to a list of options
- Length Check: restricts the number of characters allowed
- Presence Check: ensures that the field is not left blank
Relational Databases
- Foreign key value has a matching value in corresponding primary key.
SQL operations
- SQL standard for Structured Query Language, it is used to interrogate data
- SELECT FROM: selects data : SELECT name, gender FROM student;
- WHERE: returns records that meet condition: SELECT name, gender FROM student WHERE regClass = "1S1";
- ORDER BY: ascending or descending: ORDER BY age ASC
- INSERT INTO: adds a record to a table
- UPDATE: modifies a current record
- DELETE: removes records
- EQUI-JOIN: displays result from two different tables, requires Primary Key & Foreign Key
- AND: must be true
- OR: ether must be true
- "<" less than
- ">" greater than
SQL Testing
- Expected results and actual results
Evaluation
- Requirements met
- Fit for purpose and accurate output
- If not, revisit
Software Development process
- Analysis
- Design
- Implementation
- Evaluation
Functional Requirements
- Inputs: data entered
- Processes: what happens to the data
- Output: the result
- Software follows the same diagram
- Flows charts - shows what is going on in a program and how data flows around it
Pseudocode format
- get age from user*
- if age < 15?*
- Send discount to user*
- else*
- Send no discount to user*
- end if*
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.