2022 m/j 32 Flashcards

1
Q

Explain why the properties have been set to PRIVATE

A

To ensure that attributes can only be accessed by the class’s own methods
To enforce encapsulation // ensure they are hidden

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Identify protocols used by application layer. Describe the use of each protocol

A

(1)HTTP(S) for sending and receiving web pages / hypertext documents

(2) FTP for sending and receiving files over a network / between devices

(3) SMTP for sending/uploading emails /push protocol

(4) POP(3) for receiving/downloading emails /pull protocol (1)
IMAP for receiving/downloading emails /pull protocol (1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Identify two other layers of the tcp/ip protocol suite

A

Transport handles packets

— Internet handles transmission of data using
IP addresses // provides (optimal) route

— Network Access (Interface) // (Data) Link // Physical, Handles how data is physically sent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Identify the three other categories of computer architecture besides SISD

A

— SIMD many/array processors execute the same instruction using different data sets

— MISD many processors (using different instructions) use the same data set

—MIMD many processors (using different instructions) using different data sets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

State how a digital certificate is obtained

A

— enquiry made to Certificate Authority (CA)

— enquirer’s details checked by CA

— if enquirer details verified by CA then public key is agreed

—CA creates/issues certificate that includes the enquirers public key

— encrypting data sent to/by CA with the CA’s public/private key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain how a digital signature is produced before the message is sent

A

— The message is hashed with (the agreed hashing algorithm)…

— to produce a message digest

— The message digest is then encrypted with the sender’s private key to form the digital signature

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain how the digital signature can be checked on receipt to ensure that the message has not been altered during transmission

A

— The message together with the digital signature is decrypted using the receiver’s private key

— The digital signature received is decrypted with the sender’s public key to recover the message digest sent

— The decrypted message received is hashed with the agreed hashing algorithm to reproduce the message digest
of the message received

— The two message digests are compared

— if they are the same the message has not been altered // if they are different the message has been altered

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

State a necessary condition for a binary search

A

The list to be searched must be ordered/sorted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe how to perform a binary search

A

— Find the middle item / index

— Check the value of middle item in the list to be searched
— If equal item searched for is found
— If this is not equal/greater/less than the item searched for

— discard the half of the list that does not contain the search item

—Repeat the above steps until the item searched for is found

— or there is only one item left in the list and it is not the item searched for // lower bound > / = upper bound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain how the performance of a binary search varies according to the number of values in the array

A

As the number of items in the list increases the time to search the list increases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Compare the performance of the algorithm for a binary search and linear search using big o notation for order of time complexity

A

—Linear search O(n) and Binary search O(log
2n) / O(Log n)

— time to search increases linearly in relation to the number of items in the list for a linear search and logarithmically
for a Binary search

— time to search increases less rapidly for a binary search and time to search increases more rapidly for a linear
search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

State the reasons for including exception handling routines when writing a program, include an example of an exception in ur answer

A

To trap (some) runtime errors
To prevent a program halting unexpectedly
To produce meaningful error messages for these errors
Example divide by zero // end of file // file not found

How well did you know this?
1
Not at all
2
3
4
5
Perfectly