Login

Welcome, Guest. Please login or register.

September 08, 2025, 11:42:21 pm

Author Topic: Software Development Questions Thread  (Read 5055 times)  Share 

0 Members and 1 Guest are viewing this topic.

MJRomeo81

  • Part of the furniture
  • *****
  • Posts: 1231
  • Princeps
  • Respect: +167
Software Development Questions Thread
« on: October 03, 2012, 09:31:15 pm »
+1
Hello all,

I think that it would be a good idea if we could establish a centralised help thread. This thread may also serve as a general debugging thread (but try to stay on topic with the study design - we are not interested in hash tables or linked lists in this subject; please stick to the generic tasks performed in SACs).
Currently working in the IT Industry as an Oracle DBA (State Government)

Murphy was an optimist

Bachelor of Information Technology @ La Trobe (Melbourne) - Completed 2014
WAM: 91.96
The key, the whole key, and nothing but the key, so help me Codd.

Subjects I tutored during my time at LTU:
CSE2DBF (Database Fundamentals)
CSE1IS (Information Systems)
CSE2DES (System Design Engineering)

Quote
“If I had an hour to solve a problem I'd spend 55 minutes defining the problem and 5 minutes thinking about solutions.”
― Albert Einstein

Lasercookie

  • Honorary Moderator
  • ATAR Notes Legend
  • *******
  • Posts: 3167
  • Respect: +326
Re: Software Development Questions Thread
« Reply #1 on: October 03, 2012, 11:28:26 pm »
0
When doing unit conversions we use the values like 1000 megabytes = 1 gigabyte, right? As opposed to 1024 megabytes = 1 gigabyte. I'm fairly sure it's fine/expected to use the former, but just to clarify.

This is question 2 from the VCAA sample questions.
Quote
Sally and Judith are having a discussion about the Open Systems Interconnections (OSI) model. Sally tells Judith that Layer 1 (the physical layer) is where TCP/IP protocol operates and Judith disagrees. Judith says that Ethernet protocol runs on Layer 1 and TCP/IP runs on some higher layers. You explain to both Sally and Judith that Ethernet protocol runs in Layer 2 and TCP/IP protocols do in fact reside in Layers 3 and 4.

Explain the function of Layer 1 of the OSI model, making reference to how Layer 1 forms the basis for both Ethernet and TCP/IP to work in subsequent layers.

(6 lines - 4 marks)
I need a bit of help refining my answer. I'm not sure if I've actually answered the question directly or if my understanding of the models and protocols is entirely correct in the first place.

Just to refresh my memory (programmers do not throw stale pizza away): PDNTSPA
1. Physical 2. Data link 3. Network 4. Transport 5. Session 6. P... forgotten 7. Application

edit: It was Presentation that I forgot.

So in answering this question, we need to discuss at least 4 points (4 marks).
1. What layer one does
2. How it relates to Ethernet
3. How it relates to TCP/IP
4th mark......  ???


Layer 1, the physical layer of the OSI model, defines how the raw bits of data is transferred from a device over a transmission medium (such as twisted pair cable). The physical layer then transfers "control" of the data to the next layer up, Layer 2, the Data Link layer. The Ethernet protocol operates on Layer 2, dividing the data into a more manageable form than raw bits, a frame. Having done this, the "control" of the data is then handed to the next layer up, Layer 3, the Network layer. On this layer operates the IP (Internet Protocol) portion of the TCP/IP protocol, converting the frame into a form called packets, defining where this data should end up. Moving up to Layer 4, the Transport layer, the Transmission Control Protocol (TCP) manages the actual transportation of these packets from it's origin point to it's destination.


That answer there has gone a bit over the six lines.

MJRomeo81

  • Part of the furniture
  • *****
  • Posts: 1231
  • Princeps
  • Respect: +167
Re: Software Development Questions Thread
« Reply #2 on: October 04, 2012, 12:52:34 am »
+1
When doing unit conversions we use the values like 1000 megabytes = 1 gigabyte, right? As opposed to 1024 megabytes = 1 gigabyte. I'm fairly sure it's fine/expected to use the former, but just to clarify.

It's perfectly fine to use the former. However I would point out that this is not the 'technical' real value at the end of my response (just to indicate that you understand how it is technically 1024 megabytes). I can't see them asking something like this in a MC question unless the answer is extremely obvious (i.e. if they asked what is 1gb in megabytes, they don't offer 1000mb AND 1024mb as answers UNLESS it specifically states the "technical" answer).



Quote from: FROM Question 2  VCAA sample questions.
Sally and Judith are having a discussion about the Open Systems Interconnections (OSI) model. Sally tells Judith that Layer 1 (the physical layer) is where TCP/IP protocol operates and Judith disagrees. Judith says that Ethernet protocol runs on Layer 1 and TCP/IP runs on some higher layers. You explain to both Sally and Judith that Ethernet protocol runs in Layer 2 and TCP/IP protocols do in fact reside in Layers 3 and 4.

Explain the function of Layer 1 of the OSI model, making reference to how Layer 1 forms the basis for both Ethernet and TCP/IP to work in subsequent layers.

(6 lines - 4 marks)
I need a bit of help refining my answer. I'm not sure if I've actually answered the question directly or if my understanding of the models and protocols is entirely correct in the first place.


So in answering this question, we need to discuss at least 4 points (4 marks).
1. What layer one does
2. How it relates to Ethernet
3. How it relates to TCP/IP
4th mark......  ???


Layer 1, the physical layer of the OSI model, defines how the raw bits of data is transferred from a device over a transmission medium (such as twisted pair cable). The physical layer then transfers "control" of the data to the next layer up, Layer 2, the Data Link layer. The Ethernet protocol operates on Layer 2, dividing the data into a more manageable form than raw bits, a frame. Having done this, the "control" of the data is then handed to the next layer up, Layer 3, the Network layer. On this layer operates the IP (Internet Protocol) portion of the TCP/IP protocol, converting the frame into a form called packets, defining where this data should end up. Moving up to Layer 4, the Transport layer, the Transmission Control Protocol (TCP) manages the actual transportation of these packets from it's origin point to it's destination.


Let's begin with what we are officially required to know according to the VCAA Study design (in relation to the OSI model):

  • a brief overview of the concept of the OSI model for network protocols
  • purposes and functions of the physical layer (Layer 1) of the OSI and the relationship of the physical layer to the Transmission Control Protocol/Internet Protocol model

Note the emphasis on layer 1. Yes, we are required to have a 'brief' overview of the entire model but we are specifically concerned with layer 1. This includes its purposes and functions, and ALSO how the physical layer is incorporated into the TCP/IP model. Recall that this is a slightly different concept to the OSI model (in the sense that there are less "layers", but each layer in the TCP/IP model contains OSI layers).


Conceptually your answer is very solid. I can't really think of a 4th point either, and although the question doesn't state it, I would perhaps for a 4th point, briefly mention where the physical layerl fits in with TCP/IP model. However this is really pushing 6 lines but I honestly think that for this type of question, the examiners would appreciate the attention to detail. I'd be surprised if the majority of the state fills up 6 relevant lines here.



We need to remember that the OSI model is a protocol stack. So as you know, each layer is a collection of functions that provide specific services to the layer above it and receive service from the layer below it.  Here is another acronym (to remember the stack top down):

"All people seem to need data processing".




Here are some questions for your to consider (note that these could be multiple choice questions or S.A. as they require an understanding of network components + the OSI model).

Which layer of the OSI does a hub operate? What about a switch? A router? Why?
« Last Edit: October 04, 2012, 12:56:46 am by MJRomeo81 »
Currently working in the IT Industry as an Oracle DBA (State Government)

Murphy was an optimist

Bachelor of Information Technology @ La Trobe (Melbourne) - Completed 2014
WAM: 91.96
The key, the whole key, and nothing but the key, so help me Codd.

Subjects I tutored during my time at LTU:
CSE2DBF (Database Fundamentals)
CSE1IS (Information Systems)
CSE2DES (System Design Engineering)

Quote
“If I had an hour to solve a problem I'd spend 55 minutes defining the problem and 5 minutes thinking about solutions.”
― Albert Einstein

Yendall

  • Victorian
  • Forum Leader
  • ****
  • Posts: 808
  • Respect: +38
Re: Software Development Questions Thread
« Reply #3 on: October 04, 2012, 12:01:51 pm »
0
I had a similar question in my prac exam I did the other day. It was along these lines:

Quote
Explain the purpose of the Physical Layer of the OSI model, and explain it's relationship with TCP/IP protocol

My answer wasn't as sophisticated as Laseredd's, but I wrote something like this:

The Physical Layer of the OSI model allows raw data to travel along physical mediums, such as cables. As the Physical Layer ultimately controls the raw data (which is later manipulated in the higher OSI layers), it is essential for higher layers, that fully utilise the TCP/IP protocols, to operate.

Looking at Laseredds' answer makes mine look really crappy, but is that what the question is essentially asking?
2013 - 2016: Bachelor of Computer Science @ RMIT
2017 - 2018: Master of Data Science @ RMIT
ΟΟΟΟ
VCE '12: | English | I.T: Applications | I.T: Software Development | Music Performance Solo |  Further Mathematics | Studio Arts |

Lasercookie

  • Honorary Moderator
  • ATAR Notes Legend
  • *******
  • Posts: 3167
  • Respect: +326
Re: Software Development Questions Thread
« Reply #4 on: October 04, 2012, 01:10:43 pm »
0
Thanks MJRomeo.

Which layer of the OSI does a hub operate? What about a switch? A router? Why?
Hmm, I had to think through this question a bit.

So a hub is a device that connects devices in a network, pushing all the data it receives to every port on the network. It doesn't do any processing of it's traffic. All it's doing is physically moving data along. Given that, I would say that it operates only at Layer 1, and nothing higher than that.

A switch is a bit more refined than a hub, given that in addition to physically moving the bits along (Layer 1), it also builds a MAC address table of the devices that are connected to it. This would be a Layer 2 (data link) function, since it's to do with where the data should end up going. It then ensures that only relevant data is passed to each device, routing data directly to it's destination. This actual routing process would be a Layer 3 function, since the Network layer deals with with how the data will actually be sent. So a switch will operate on Layer 1, 2 and 3.

So a router joins networks together (Layer 3), routes packets between these networks (Layer 3), can be used to create network segments in a LAN (Layer 3? not sure) and functions as a security device (again, not too sure what layer this would be). So a router operates at the network layer, Layer 3, I'm not too sure about those last two functions though.

A router is a security device because it can process incoming and outgoing data before passing it onto the network devices? I'm still stumped to where to slot that in.

I don't think I've realised this before, but can a switch perform all the functions of a router? Do we consider a router to be the Layer 3 function, and hence a switch is a device that's combined with a router?
« Last Edit: October 04, 2012, 01:14:26 pm by laseredd »

MJRomeo81

  • Part of the furniture
  • *****
  • Posts: 1231
  • Princeps
  • Respect: +167
Re: Software Development Questions Thread
« Reply #5 on: October 05, 2012, 02:26:33 am »
+1

Quote
Explain the purpose of the Physical Layer of the OSI model, and explain it's relationship with TCP/IP protocol


The Physical Layer of the OSI model allows raw data to travel along physical mediums, such as cables. As the Physical Layer ultimately controls the raw data (which is later manipulated in the higher OSI layers), it is essential for higher layers, that fully utilise the TCP/IP protocols, to operate.


So this question is a) purpose of layer 1, and b) relationship with TCP/IP protocol. Your answer is correct, but I would "explode" the "allows raw data part". How does it do that? This is where the response get's some juice injected into it :)

Let's actually look at what the physical layer does. The physical layer defines all physical and electrical specifications for devices used to interface to the network, including the shape and layout of pins in connectors, voltages, cable specifications and broadcast frequencies. It provides the means for transmitting raw bits, but it is not concerned with MAC addresses, IP addresses and packets; rather, these are dealt with by layers higher in the hierarchy.






Which layer of the OSI does a hub operate? What about a switch? A router? Why?

So a hub is a device that connects devices in a network, pushing all the data it receives to every port on the network. It doesn't do any processing of it's traffic. All it's doing is physically moving data along. Given that, I would say that it operates only at Layer 1, and nothing higher than that.

Hubs only repeat the electric pulses to every computer connected on the network. Very dumb device indeed. Layer 1 it is.

A switch is a bit more refined than a hub, given that in addition to physically moving the bits along (Layer 1), it also builds a MAC address table of the devices that are connected to it. This would be a Layer 2 (data link) function, since it's to do with where the data should end up going. It then ensures that only relevant data is passed to each device, routing data directly to it's destination. This actual routing process would be a Layer 3 function, since the Network layer deals with with how the data will actually be sent. So a switch will operate on Layer 1, 2 and 3.

Intelligent devices like switches aren't dealing with raw bits.  The physical layer is just that - physical. This is why we emphasise "raw" data in layer 1. A switch switches Ethernet frames between Ethernet devices. Switches operate on layer 2 and 3 (depending on the type of switch, but in an exam stick with layer 2). Everything about the MAC table is correct (also remember that when the switch is turned on the MAC table is blank, and its effectively a hub on its first run, however yes it is intelligent and learns/builds its MAC address table over time). There is an important distinction. A layer 2 switch uses a MAC address table; a layer 3 switch uses IP routing table. (at this point we don't want to go outside the scope of this subject - remember the golden words "...emphasis on layer 1").

Always remember that in a protocol stack, "each layer is a collection of functions that provide specific services to the layer above it and receive service from the layer below it".

So a router joins networks together (Layer 3), routes packets between these networks (Layer 3), can be used to create network segments in a LAN (Layer 3? not sure) and functions as a security device (again, not too sure what layer this would be). So a router operates at the network layer, Layer 3, I'm not too sure about those last two functions though.

A router is a security device because it can process incoming and outgoing data before passing it onto the network devices? I'm still stumped to where to slot that in.

I don't think I've realised this before, but can a switch perform all the functions of a router? Do we consider a router to be the Layer 3 function, and hence a switch is a device that's combined with a router?

Yep router is a layer 3 device. I believe switches don't have WAN interfaces, so they can't perform ALL functions of a router.

As for security, routers have no way of interpreting what is 'clean' or what is malware; it just controls and directs IP traffic. And yes, the segmentation of the LAN into unique networks is also correct.

You will sometimes hear about layer 3 switches (not in this subject though). There's plenty of stuff on google about this topic and I do recommend reading. I just don't want to deviate from the thread topic too much (only because it technically wouldn't be relevant to the study design).

Always remember in general:

Hubs - Layer 1
Switches - Layer 2
Routers - Layer 3



Ok guys so here are two (refresher) quick questions that many people continually stuff up on. Feel free to keep discussing the OSI model - I will occasionally ask questions like the following just to consider some neglected parts of the course.

1) What is the difference between archiving and backing up?
2) Purpose of a context diagram, and how it differs from a DFD.
« Last Edit: October 05, 2012, 02:28:36 am by MJRomeo81 »
Currently working in the IT Industry as an Oracle DBA (State Government)

Murphy was an optimist

Bachelor of Information Technology @ La Trobe (Melbourne) - Completed 2014
WAM: 91.96
The key, the whole key, and nothing but the key, so help me Codd.

Subjects I tutored during my time at LTU:
CSE2DBF (Database Fundamentals)
CSE1IS (Information Systems)
CSE2DES (System Design Engineering)

Quote
“If I had an hour to solve a problem I'd spend 55 minutes defining the problem and 5 minutes thinking about solutions.”
― Albert Einstein

Yendall

  • Victorian
  • Forum Leader
  • ****
  • Posts: 808
  • Respect: +38
Re: Software Development Questions Thread
« Reply #6 on: October 05, 2012, 08:14:27 am »
0

Quote
Explain the purpose of the Physical Layer of the OSI model, and explain it's relationship with TCP/IP protocol


The Physical Layer of the OSI model allows raw data to travel along physical mediums, such as cables. As the Physical Layer ultimately controls the raw data (which is later manipulated in the higher OSI layers), it is essential for higher layers, that fully utilise the TCP/IP protocols, to operate.


So this question is a) purpose of layer 1, and b) relationship with TCP/IP protocol. Your answer is correct, but I would "explode" the "allows raw data part". How does it do that? This is where the response get's some juice injected into it :)

Let's actually look at what the physical layer does. The physical layer defines all physical and electrical specifications for devices used to interface to the network, including the shape and layout of pins in connectors, voltages, cable specifications and broadcast frequencies. It provides the means for transmitting raw bits, but it is not concerned with MAC addresses, IP addresses and packets; rather, these are dealt with by layers higher in the hierarchy.
I think what I meant to saw was "raw bits" that travel accross mediums. So if I alter my answer like this:
The Physical Layer of the OSI model allows raw bits to travel along physical mediums, such as cables. As the Physical Layer  controls the circuits and ultimately controls all functionality in the system, it is essential for higher layers that fully utilise the TCP/IP protocols, to operate.

Would that be a better response?

Quote
Ok guys so here are two (refresher) quick questions that many people continually stuff up on. Feel free to keep discussing the OSI model - I will occasionally ask questions like the following just to consider some neglected parts of the course.

1) What is the difference between archiving and backing up?
2) Purpose of a context diagram, and how it differs from a DFD.

  • A backup is generally create a safety procedure in case of a situation where disaster recovery is necessary, and only backs up data that is presently active. Whereas an archive stores data as records that can be identified over long periods of time.
  • A context diagram represents external entities relationships with a software system (generally represented by actors), whereas a DFD shows data flows inside a software system, and how they are used to manipulate data.
2013 - 2016: Bachelor of Computer Science @ RMIT
2017 - 2018: Master of Data Science @ RMIT
ΟΟΟΟ
VCE '12: | English | I.T: Applications | I.T: Software Development | Music Performance Solo |  Further Mathematics | Studio Arts |

Lasercookie

  • Honorary Moderator
  • ATAR Notes Legend
  • *******
  • Posts: 3167
  • Respect: +326
Re: Software Development Questions Thread
« Reply #7 on: October 05, 2012, 02:29:30 pm »
0
1) What is the difference between archiving and backing up?
2) Purpose of a context diagram, and how it differs from a DFD.
1) Archiving is a procedure to save space on a system. A copy of the data is made, stored elsewhere and the original copy on the system is deleted. It is an alternative to deleting data permanently, allowing for the event that it'll one day be needed again. The purpose of backing up is to have another copy of the data in the case that it needs to be restored. The original data is left on the system. 

2) A context diagram provides information about the inflow and outflow of data to and from the system boundary. It provides no information about the workings of the system itself. A data flow diagram shows the direction that data travels in, the processes taken upon it and where it is stored inside the system. Increasing levels of data flow diagrams provides progressively more detailed insight into a particular process.


VCAA 2007
Quote
Question 3
An 'array' and a 'record' are two types of data structure.
The main difference between the two is that

A. arrays can only store the same type of data in each element.
B. records can only store the same type of data in each field.
C. arrays can only store numeric data.
D. records can only store textual data.

C and D can be crossed off immediately. A is obviously true.

I'm not sure about B though. I thought records/tuples were a data structure that defined the data type for each field.

How would we do the VCAA-esque pseudocode for defining a record? Actually, how would datatypes be defined in pseudocode anyway? It usually isn't, now that I think of it - is that due to the fact that you'd use something along the lines of data dictionary instead for that purpose?

Code: [Select]
STRUCTURE record
    int productID
    string productName
    float price
END STRUCTURE

I am mistaken in the idea that the data types have to be defined for each field there?

MJRomeo81

  • Part of the furniture
  • *****
  • Posts: 1231
  • Princeps
  • Respect: +167
Re: Software Development Questions Thread
« Reply #8 on: October 05, 2012, 04:35:20 pm »
+2
I think what I meant to saw was "raw bits" that travel accross mediums. So if I alter my answer like this:
The Physical Layer of the OSI model allows raw bits to travel along physical mediums, such as cables. As the Physical Layer  controls the circuits and ultimately controls all functionality in the system, it is essential for higher layers that fully utilise the TCP/IP protocols, to operate.

Would that be a better response?

The bolder part is the only small issue I can identify. I understand what you mean by that but I would avoid stating layer 1 controls "all functionality". Try to stick to the whole physical/electrical specifications/the means for transmitting raw bits idea. Again, the physical layer is not concerned with MAC addresses, IP addresses and packets; rather, these are dealt with by layers higher in the hierarchy. Hence this isn't necessarily "all functionality".



Quote
1) What is the difference between archiving and backing up?
2) Purpose of a context diagram, and how it differs from a DFD.

1). Mark Kelly sums it up nicely.

Archiving makes a copy of data that is no longer needed regularly. The copy is stored offline and the original data is deleted.

Backing up makes a copy of data and retains the original data.

2).

Think of the context diagram as a "black box". We are not interested in the internal workings of the system. We are only concerned with how the system interacts with external entities.

DFDs provide a logical model that shows what the system does, not how it does it. Essentially we explode process 0 and define the flow of information within the IS.

1) A backup is generally create a safety procedure in case of a situation where disaster recovery is necessary, and only backs up data that is presently active. Whereas an archive stores data as records that can be identified over long periods of time.

Check the definitions above. The main distinction between a backup and archiving is that the backup retains the data. When you archive, you delete the data on the primary media and store it on secondary media.

2)A context diagram represents external entities relationships with a software system (generally represented by actors), whereas a DFD shows data flows inside a software system, and how they are used to manipulate data.

Be careful not to confuse yourself with the specific terminology used in use case, context diagram and DFD. Does a DFD show HOW data is manipulated? i.e. the processing steps? No. We are not concerned with algorithms or specific data structures in a DFD. Instead, we are interested in the FLOW of data, hence data FLOW diagram. To reiterate, DFDs show what the system does, not how it does it.

I highlighted the words relationships and actors. Reading 'entities' and 'relationships' in the same sentence, it sounds like an ERD (entity relationship diagram) which is a different model. Technically your words are correct, however I wouldn't be surprised if VCAA penalised this answer for 'terminology'.

However the actors part is incorrect. Actors are in use case diagrams. External entities in a context diagram/DFD are represented by rectangles.



Quote
Question 3
An 'array' and a 'record' are two types of data structure.
The main difference between the two is that

A. arrays can only store the same type of data in each element.
B. records can only store the same type of data in each field.
C. arrays can only store numeric data.
D. records can only store textual data.

I'm not sure about B though. I thought records/tuples were a data structure that defined the data type for each field.

How would we do the VCAA-esque pseudocode for defining a record? Actually, how would datatypes be defined in pseudocode anyway? It usually isn't, now that I think of it - is that due to the fact that you'd use something along the lines of data dictionary instead for that purpose?

Code: [Select]
STRUCTURE record
    int productID
    string productName
    float price
END STRUCTURE

I am mistaken in the idea that the data types have to be defined for each field there?

Yes the answer is A. C & D are false, and B is false. Every element of the array has to the be same type, whether it be int, String or Object (even though an object may have int & string attributes, elements in the array are of type object).

"records can only store the same type of data in each field." --->  Each field in the record must have the same type of data (which is false).

Your comments are correct about records. Yes you define the data type for each field (and each field can be a different data type or the same, it doesn't matter). In this subject we typically use a data dictionary, but say in OO programming, if we assume the records are objects of a class, then I would represent the attributes and methods in a UML class diagram (outside the scope of SD).

Your pseudocode representation is also correct.
Currently working in the IT Industry as an Oracle DBA (State Government)

Murphy was an optimist

Bachelor of Information Technology @ La Trobe (Melbourne) - Completed 2014
WAM: 91.96
The key, the whole key, and nothing but the key, so help me Codd.

Subjects I tutored during my time at LTU:
CSE2DBF (Database Fundamentals)
CSE1IS (Information Systems)
CSE2DES (System Design Engineering)

Quote
“If I had an hour to solve a problem I'd spend 55 minutes defining the problem and 5 minutes thinking about solutions.”
― Albert Einstein