comp sci exam Flashcards
1
Q
CPU
A
- “brain” of computer, interprets, carries out instructions
- important for overall computer function
2
Q
motherboard
A
- circuit board connecting all components of pc, provides pathways
- BIOS and UEFI that initialize system/manages hardware settings
- must be compatible with other parts
3
Q
RAM
A
- volatile memory(holds data temporarily, data will be lost when device closed)
- gives CPU easy access to data
- allows multitasking, smooth operations
4
Q
hard drive
A
- non-volatile storage (long term, hold data even when computer closed)
- preserves files, operations, appliance when computer is off
5
Q
PSU
A
- converts electricity from wall to usable electricity for computer components
- provides stable + regulated power
- ensures computer gets correct amount of electricity for optimal performance
6
Q
computer case
A
- protect internal components
- must accommodate/fit other components
- provides support, external cables to connect keyboards/monitors, holes preventing overheating
7
Q
graphics card (GPU)
A
- handles graphics tasks, rendering videos, images
- has own VRAM memory and processing power, used to handle complex situations
8
Q
monitor
A
- Output display that displays visual information from graphics card
- Uses technology like liquid crystal display(LCD), light emitting diode(LED), or organic light emitting diode(OLED)
- Allows user to interact with computer
9
Q
mouse
A
- Input device used to control cursor
- Essential for navigating a computer
- Enables clicking, pointing, dragging
10
Q
keyboard
A
- Input device used to enter text, commands etc.
- Essential for communication with computer
- Enables data entry, commands, interaction with softwares
11
Q
order of components when making computer
A
- CPU
- computer case
- motherboard
- RAM
- hard drive
- cooler
- GPU
- PSU
12
Q
why is CPU chosen first, qualities of good CPU
A
- narrows choices for other components
- more cores = better multi tasking
- clock speed (Hz) fast = faster processing speed
13
Q
why is computer case chosen 2nd
A
- determines aesthetics
- determines compatible motherboards
- limits size of other components
14
Q
why is motherboard chosen 3rd
A
- must be compatible with CPU and case
- states best compatible RAM and hard drive
- states the number of PCI connectors for extra components (ex. Graphics card)
15
Q
why is RAM chosen 4th, qualities of good RAM
A
- already specified by motherboard and CPU
- speed (Hz) determines how fast it can communicate with CPU
- size (GB) determines # of processes that can be stored
16
Q
types of hard drives
A
- NVME SSD → fastest, can attach directly to motherboard
- SATA SSD → cheaper, needs SATA cables to install, must be mounted on case
- SATA HDD →cheapest, can store most data, slow
17
Q
how to install cooler
A
- use a pea sized amount of thermal paste
18
Q
how to choose GPU
A
- if no APU(accelerated processing unit), get GPU
- choose based on intended purpose of computer
19
Q
how to choose PSU
A
- must meet power requirements based on other components
- give at least 100 watts of wiggle room, so computer still works when energy fluctuates
- easier to upgrade computer in the future
20
Q
how to name files well
A
- be concise, consistent, short
- camelCase or underscores, avoid special characters, case sensitivity
- add dates
- indicate file type
- use folders to organize similar files
- avoid reserved words
21
Q
examples of + pros and cons of online file managers
A
- ex. microsoft onedrive, google drive
pros: synchronization, accessible, easy to share, easy to back up
cons: free plans have storage limit, must have secure login or could easily get hacked
22
Q
hardware based backups
A
- attach hard drive to computer, selecting wanted files, software will copy selected files to hard drive
- Network-attached storage drive (NAS) are external hard drives that can be connected to a network to back up data
23
Q
what are uninstallers used for
A
- Applications can leave behind hidden files, softwares like IObit Uninstaller (windows) and AppCleaner (mac) deletes all related files
24
Q
why do files get compressed
A
- easier to share
- takes up less space
25
what are viruses, what do they do
- Malicious and attach themselves to legitimate files to replicate and spread to others
- Can corrupt data, steal information, damage computer functions
- Antivirus softwares can prevent computer viruses
26
what is a trojan horse, what does it do
- Malicious software disguising itself as legitimate, leading to users downloading it
- Once downloaded, attackers can access data, control system, deliver other malware
- Does not replicate, uses social engineering tactics to trick users
27
what is a worm, what does it do
- Self-replicating malware that can independently spread to other computers/networks without host program and user interaction
- Distributed Denial of Service (DDoS) generates massive volume of traffic within a network, disrupting services
- Worms steal data, damage computer, while DDoS paralyzes target
28
what is adware, what does it do
- Malware that displays unwanted advertisements to users
- Designed to generate revenue for developers, but can disturb user experience
29
how to protect pc from viruses
- use a firewall
- anti-malware software
- don't give personal info to untrusted sources
- use vpn
- strong passwords + 2 factor authentification
30
what is phishing, what does it do
- Malicious actors that impersonate trustworthy sources, luring users to trusting them
- Leads to financial loss, information being stolen, identity theft
31
in binary code, what represents on and off
0 - off, 1 - on
32
what does ASCII stand for
American Standard Code for Information Interchange - they represent text and characters as binary codes
33
what is web development
- Process of creating websites and web applications
34
java programming
- object oriented programming language
- versatile, compiled high level
- “Write once, run anywhere” philosophy
35
what are the data types in java
int, float(nums w decimals, must end with f), double, String, char, boolean
36
storage of boolean
1 bit
37
storage of char
16 bits
38
storage of int
32 bits
39
storage of float
32 bits
40
storage of double
64 bits
41
storage of String
depends on size
42
what are variables
- Labelled containers to hold values in a Java code
- Can also be updated, referenced, and manipulated
- Variables must have stated data type, given a name, assigned a value
43
why do you close scanners?
- resources may not release properly
- tells underlying input stream that you’re done
- prevent any issues with the behaviour of the code
44
if statements
- Controls and makes decisions in code
- “else” can be added to create and if else statement, making code more complex
45
switch statements
- Alternative to else and if else statements when one variable must be tested against multiple others
- More efficient to code, less coding to be done + keeps the flow of the program
46
difference between loop and iteration
loop: running through a block of code over and over again
iteration: execute the same code for each item in a collection
47
while loop
- Typically used in code when there isn’t a specified ending point
- Continues until the condition becomes false
- Infinite loops occur when the condition never turns false
48
for loop
- Typically used in code when there is a specified ending point
- Not all coding questions can be answered with a for loop
49
for each loop
- Used to make it easier to iterate through collections or arrays
- Cannot be used directly on a String, must be converted to a character array first
- Strings are not iterable
50
arrays
- Data structure that allows for a collection of the same data type
- Groups multiple values under one variable name, easier to manipulate
- size of array must be set before being used, cannot be changed
- mutable, values at indexes can be changed
- to print, must convert to string first
51
arraylist
- Dynamic arrays, can hold collection of multiple data types
- Size of ArrayList can be changed, meaning values can be added and removed
- Data type of ArrayList items must be Wrapper Class, cannot be primitive
- can be directly printed
52
what are static methods
- Part of code that executes specific operations
- Methods should contain return type, method name, parameter list, method body, and return statement
- Return statement - if return type isn’t void, must return value of that type
- Static methods allow us to perform algorithms, have a clean code, be able to reuse code
53
nesting
- A code within another code
- Ex. nested conditionals are used to make multiple decisions
54
documentation
- internal comments within code (using //)
- external documents too like user manuals