ATAR Notes: Forum

HSC Stuff => HSC Technology Stuff => HSC Subjects + Help => HSC Software Design and Development => Topic started by: Opengangs on October 04, 2018, 07:47:52 pm

Title: HSC Software Design and Development - State Ranker QnA
Post by: Opengangs on October 04, 2018, 07:47:52 pm
State ranker question 'n answer session

When:Oct 26, 2018
Where: Right here!

A good hello to fellow developers!
You're here because you want a question answered by a state ranking student? No problem! Come back on October 26, 2018 with plenty of questions and we'll answer your questions as soon as possible.

A little bit about your answerers!

Opengangs graduated in 2017 with an ATAR of 91.50 and more importantly, with a score of 88 in the HSC for Software Design and Development. He is currently studying a Bachelor of Computer Science at the University of New South Wales.

JTrudeau also graduated in 2017 with an ATAR of 99.75. She came first in the state for Software Design and Development with a HSC mark of 99 and is currently studying a Bachelor of Data Science at the University of Sydney.

Both will be available all day - so if you have any questions, ask them away below!

Want to ask a question?

To ask a question, register an account or log into an account and click on theQuick reply button at the bottom of the page with your question!

We wish you all the best of luck with the HSC exams!
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: JTrudeau on October 26, 2018, 08:12:02 am
The Q&A is now up and running! I’m your other marker today, and I’m super keen to see what you’ve got! Anything goes: practice papers, theory questions, test strategies, you name it! :)
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: jasn9776 on October 26, 2018, 03:21:11 pm
Alright, i'll start it off. What are your tips for answering algorithm questions. I guess like how do you plan it out if it seems really complex? Also some questions i feel are worded in a way that doesn't really help you understand. Like in 2016 the last Question looked really confusing but was just a sequential file question. Overall I did way better at the regurgitation questions than like the actual pseudocode questions in the trial.

Also how should i study now that its only a week from exam? Should I just do past papers like i have been doing but i'm pretty rusty at the moment since i haven't studied the subject in like a week and definitely not the coding. Or should i focus on the theory which i'm pretty confident on already and it seems like the questions are pretty vague. What detail should I actually study in like i guess you could get away with not really understanding the code for the sorts since none of the questions actually ask it.
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: JTrudeau on October 26, 2018, 03:47:50 pm
@ jasn9776 Amazing! :)

On Algorithms:
I start off making a list of all the functions/tasks I’ll need to do. Take 2017’s purchase module question, for example. Before I started, I jotted down some bullet points in the margins— a loop for the customer to keep choosing items and quantities, a subprogram to compare quantity and stock, etc. Try and step through what you want your program to do, and write down those tasks as you go.
Then, I start writing my algorithm in pencil. This gives me the flexibility to adjust my code or add new lines, and ensure my structure is correct instead of angry crossed-out lines of code that can be hard to read. Of course, time is of the essence, so if you’re struggling for time, you’ll have to make allowances for something. Do this at your own discretion.

And definitely, some of the HSC questions are notoriously poorly worded (looking at you, 35e!). The 2016 question did actually specify it was a sequential file, so you’d apply the relevant knowledge in that case. But if they don’t specify, this is when knowing the syllabus and what your “options” are is pretty important. E.g. if they just said “a file”, you’d know it has to be either sequential or relative, and infer based on the context of the question.
Another thing about the questions, they usually try and relate it to a real-world example, so you can sometimes use background knowledge and common sense to help guide your decision making.
If worse comes to worst, write your assumption at the top. E.g. “Note: assuming the file is less than 100 lines long and is sequential.”


On Studying:
From the sounds of it, you should practice the more applied sections of the paper (system modelling tools, algorithms, metalanguages). At this point, cramming a lot of theory won’t be very helpful, but you definitely want to make sure you know the three sections I just mentioned, as they’re a huge part of the paper.

A lot of the theory is pretty intuitive— e.g. “we should make sure to credit contributors to avoid copyright”, so if you’re pressed for time you should be fine. If in the exam, you can’t think of any more theory, throw in some examples. Tie it to the case study, if they’ve given you one.

Other sections that are less intuitive and are worth double checking: software development approaches and trends, fetch execute cycle, system/program/module level testing, and the design specs (know your interface elements!).

An exercise I’ve found helpful: go through the syllabus dot points, and highlight each dot point in either green, yellow, or red. Green for “I know this! I can answer this!”, yellow for “I know some of this, still a bit iffy”, and red for “I have no clue what this is!”. Based on that, prioritise what you cram, and make sure at least for the red points that you can attempt an answer.

Hope this helps! Best of luck :)
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: DrDusk on October 26, 2018, 06:24:21 pm
Hello again.
i just have one question at the moment.
How long should we spend on say a 5-6 marker pseudocode question?

Thanks a lot for this thread!

Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: cthulu on October 26, 2018, 06:50:34 pm
Hello,

thanks for this thread.

How do we give an example of a record in a data dictionary?

Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: JTrudeau on October 26, 2018, 07:02:04 pm
@DrDusk
Good question! It really depends on how difficult the question, and how much time you have to spare. I wanna say for me, I take 5-10 minutes planning and drafting the code, then another 2 minutes to ink it. Accuracy over speed, but if you find yourself spending 5+ minutes just thinking, not writing, skip it and come back at the end. Don’t sacrifice the easy marks for one pseudocode.

————-

@Cthulu
Huh, I’ve never thought about it. I have my doubts on that happening, but this is what I would do:

Name: ExampleRecord
Type: Record with the following fields: Field1, field2, field3
Length: field1: 10 digits, field2: 100 characters, field3: one bit
Description: field1: telephone number (e.g. 1234567890), field2: address (1A 23 Lu Street), field3: if they have health insurance (e.g. 1 for yes)

Variable scope (global or local) you can usually skip, as it’s not very relevant.

Good questions for both, and thank YOU for sticking around and interacting :) Keep em coming!
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: DrDusk on October 26, 2018, 07:44:59 pm
Hi I have one more question.
If you know programming paradigms could you please explain to me the answer to this question from the 2015 HSC. For some reason its just not clicking.

Thanks, :)

Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: Opengangs on October 26, 2018, 08:44:16 pm
Hi I have one more question.
If you know programming paradigms could you please explain to me the answer to this question from the 2015 HSC. For some reason its just not clicking.

Thanks, :)
Hey DrDusk!

Good question! So with these types of questions, we need to know what public and private classes do to a piece of code. Placing a function inside the public class means that modules outside of the class can access information that appears inside the public class. Modules can read and overwrite information present in the public class!

A private class means that no modules outside of the class can overwrite information that is retained inside the class. They can read data but that's pretty much it! This is crucial if you want to keep vital information about a particular item, such as ID.

Knowing what these two classes do to information inside and outside of the class means that we can properly formulate an answer!

Firstly, what is the error? Well, think about what's in the public class and what's in the private class? Do any methods in the public class have the potential to override/compromise data already present in the error? Yes! sort() reads and writes data to a new array, so having it in the public class means that potentially there could be other methods that could screw up the ordering of the new array as done by sort().

If this happens, then clearly the output would be an unexpected result, right? As you could potentially end up with a totally (bogo) sorted array! So based on this information, placing the method in the private class means that data written by the sort() method cannot be compromised!

The sample answers also suggest the swap method added in the private class. Using the same reasoning, could you think of why you should place it in the private class?

Thanks for the question - hopefully, it has helped! :-)
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: DrDusk on October 26, 2018, 09:15:22 pm
Thank you very much for the answer. Its making sense but the scenario mentions nothing about other methods that can access the array so how can we just assume?
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: Opengangs on October 26, 2018, 09:24:59 pm
Thank you very much for the answer. Its making sense but the scenario mentions nothing about other methods that can access the array so how can we just assume?
The question states that it's a fragment of code - so we're not given the full code, only a portion of the implementation. So we can assume there are other methods that enact on the code provided! :)
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: DrDusk on October 26, 2018, 09:45:47 pm
Ah I see but then in this question from the 2014 hsc, why cant we just move the open_account method to the private class, so it cannot be accessed by FastCash?

Also the answer says add an empty version of the open_account method to the private section of FastCash, but if were adding an empty version why does it need to be in the private section? , because if it is empty then it wont perform any function for the FastCash class anyway.

Sorry for the barrage of questions, this topic was not taught to me very nicely :(
Thanks,
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: Opengangs on October 26, 2018, 10:35:03 pm
Ah I see but then in this question from the 2014 hsc, why cant we just move the open_account method to the private class, so it cannot be accessed by FastCash?

Also the answer says add an empty version of the open_account method to the private section of FastCash, but if were adding an empty version why does it need to be in the private section? , because if it is empty then it wont perform any function for the FastCash class anyway.

Sorry for the barrage of questions, this topic was not taught to me very nicely :(
Thanks,
Hey, no need to apologise! That's why we're here to help :-)

This is a difficult concept to grasp so here goes my best explanation!
Remember that tellers can open accounts; FastCash cannot! So if we place the "open_account" method to the private class, then we're saying that both types of tellers (normal and FastCash) cannot open accounts. But clearly only the FastCash teller can't open accounts. So what do we do? Yes! We have to create the "open_account" method for FastCash to be placed in the private section so that FastCash cannot access it!

As for your second question, FastCash IS a subclass of teller. So in fact, if we call the method "open_account", FastCash will immediately respond to it only because it's been instantiated LIKE a teller. So what we need to do is to move the "open_account" method to the private class so that if we do call a FastCash teller to open the account, it cannot!

Hopefully, this clears any misconceptions up! :-)
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: cthulu on October 26, 2018, 10:54:43 pm
Hey @opengangs,

I saw you mention bogosort and it made me wonder if you marked the last Alcon. I'm curious if my attempt at the sort was somewhat correct.

Cheers!
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: Opengangs on October 26, 2018, 11:00:41 pm
Hey @opengangs,

I saw you mention bogosort and it made me wonder if you marked the last Alcon. I'm curious if my attempt at the sort was somewhat correct.

Cheers!
Hey, cthulu!

Ah yes - thank you for reminding me! I shall get to that sometime tomorrow :-)
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: cthulu on October 27, 2018, 09:34:06 am
Hey @opengangs,

Earlier you said a class cannot access private methods written inside? Is this accurate because I've learnt otherwise ! SO I'm very confused atm.

Also was just wondering, when attempting questions that ask for a recommendation of a development approach, what is the best way to answer these questions? Do you have certain attributes to consider from each programming language?

Thanks!
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: JTrudeau on October 27, 2018, 09:56:16 am
Hey Cthulu!

For your dev approaches question, you should definitely be on the lookout for the defining characteristics in the question to guide your recommendation.

Structured: big budget, long time, super high quality custom software, not published until it’s done
Agile: small but diverse team, focus on getting a working product out there, feedback driven, incrementally add features
Prototyping: Also feedback driven, used when the client isn’t sure what they want/there are multiple good solutions, not published until it’s done (except the client gets to see it in progress)
RAD: small budget, short time constraint, not super fussed on quality (just want a working product), may use a lot of APIs and COTS packages
End User: designed by the user of the program (not an external programmer/team), poorer quality (or a greater variation in quality), but needs are met, often lower budget

Go through the question and highlight any specifications/requirements the client needs, and see which one’s the best fit :)
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: cthulu on October 27, 2018, 10:06:31 am
Thanks for this great answer!!

Just another quick question, if some small business per se wants to develop a new digital system for themselves that includes storing customer details and handles money. Would a RAD approach be used in such a case? My teacher stated that it was incorrect as transactions are dealt with so a structured approach is a better choice. But in our time there are plenty of code modules that provide secure transactions.

Thanks
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: JTrudeau on October 27, 2018, 10:25:44 am
@Cthulu
Yeah, that’s definitely one of those iffy ones that change with time. There are pros and cons for both approaches, but keep in mind that the syllabus hasn’t changed since 2011 (meaning RAD doesn’t produce as high quality and secure code as it does now).

I totally see where you’re coming from though. The fact that it’s a small business is also an indicator that they probably don’t have the time nor budget for a large scale structured-approach program.

I think for the purposes of the exam, err more on the side of conservative. As a gross oversimplification, Structured is for high performing code that’s like “try and hack me, I dare you”, while RAD is more “it works but only if you don’t try to mess with it”. 

Thoughts?
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: Opengangs on October 27, 2018, 11:53:14 am
Hey, cthulu.

So a private class is a nested class like we see in the previous questions. That means the methods from the outer class can access the methods in either the private or public nested class.

Now, the difference between a private and a public class is that a private class cannot have its data changed by any other method in the outer class. But these methods can still access anything inside the private class!

So in short, other methods CAN access all the data inside the private class; they just cannot alter or write to it!
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: cthulu on October 27, 2018, 12:19:48 pm
Hey, cthulu.

So a private class is a nested class like we see in the previous questions. That means the methods from the outer class can access the methods in either the private or public nested class.

Now, the difference between a private and a public class is that a private class cannot have its data changed by any other method in the outer class. But these methods can still access anything inside the private class!

So in short, other methods CAN access all the data inside the private class; they just cannot alter or write to it!

Ah that makes complete sense! Now I understand why the open_accounts method was overriden thank you heaps for this!

@Cthulu
Yeah, that’s definitely one of those iffy ones that change with time. There are pros and cons for both approaches, but keep in mind that the syllabus hasn’t changed since 2011 (meaning RAD doesn’t produce as high quality and secure code as it does now).

I totally see where you’re coming from though. The fact that it’s a small business is also an indicator that they probably don’t have the time nor budget for a large scale structured-approach program.

I think for the purposes of the exam, err more on the side of conservative. As a gross oversimplification, Structured is for high performing code that’s like “try and hack me, I dare you”, while RAD is more “it works but only if you don’t try to mess with it”. 

Thoughts?

Thanks for this reply, it makes sense. But I am still torn simply due to the fact that a structured approach requires a big budget. How about a prototyping approach?
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: DrDusk on October 27, 2018, 02:54:06 pm
@Opengangs so method inside a private class can be accessed but its data cannot be altered.
Firstly what do you mean by altered? Do you mean that it cannot be processed differently depending on what class?, i.e. you cannot use polymorphism on it

Secondly the sample answer says place the open_account method in the private section so it cannot be accessed, but this contradicts that it can be accessed but not altered.
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: Opengangs on October 27, 2018, 06:38:21 pm
@Opengangs so method inside a private class can be accessed but its data cannot be altered.
Firstly what do you mean by altered? Do you mean that it cannot be processed differently depending on what class?, i.e. you cannot use polymorphism on it

Secondly the sample answer says place the open_account method in the private section so it cannot be accessed, but this contradicts that it can be accessed but not altered.
Methods and data in the private class can be accessed if it is under the same outer class.

As an example, let's say I have an outerclass called "OC" and it has a private and public subclass.

Any method called in the public subclass of "OC" can access (but cannot change) the data in the private subclass. This is because all methods in the public subclass belong to the same class "OC".

But if you were to have a totally new class "OC2", then the data from the private subclass in "OC" cannot be accessed by this new class!

So in our example, we have two different classes and although FastCash IS a Teller, they're still two completely separate classes. This means that data in the private subclass of FastCash cannot be accessed by Teller and vice versa. But any methods in the public section of FastCash can still access these data.

This is really important in the case where you have encryption and decryption or storage - you still want to be able to retrieve information about (for example) your bank details but you don't want any methods from changing the data. So by placing it in the private class, you restrict access from a third party class/method from gaining access.

So by placing the empty "open_account" method into the private subclass of FastCash does 2 things:

1) Any class that is not FastCash has no way in retrieving the data in "open_account".

2) No methods IN the FastCash class can change information about it.

Hopefully, this clears up any problems! :)
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: DrDusk on October 27, 2018, 07:17:09 pm
OOOH I get it, that example literally cleared everything up for me! Thank YOU
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: JTrudeau on October 27, 2018, 07:25:30 pm
Thanks for this reply, it makes sense. But I am still torn simply due to the fact that a structured approach requires a big budget. How about a prototyping approach?

Prototyping doesn’t seem like it has a specific budget size, but compared to structured it’s budget and time is much smaller, because the development process is iterative (i.e. you catch mistakes in the user specs much earlier in project dev). In structured, the team refined user specs and then goes off to develop, with the end user not seeing the program until it’s complete. So if there are mistakes in the initial specs, that’s incredibly costly to fix.

In the context of the question, I feel like the security issue can’t be addressed with more prototypes (because the client doesn’t know system security), which is why structured is still the best answer.
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: DrDusk on October 27, 2018, 08:52:48 pm
@opengangs according to that, I don't see a problem with just moving open_account to the private section of the Teller class. This way FashCash cannot access it or retrieve its data which is good as it wont be able to open up an account. However the teller class can access it, but it can't change its data, which I don't see a problem with. Would there be a problem with Teller not being able to change the data in open_account?

Such there should not be a problem with adding open_account to the private section of Teller
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: Opengangs on October 27, 2018, 09:00:34 pm
@opengangs according to that, I don't see a problem with just moving open_account to the private section of the Teller class. This way FashCash cannot access it or retrieve its data which is good as it wont be able to open up an account. However the teller class can access it, but it can't change its data, which I don't see a problem with. Would there be a problem with Teller not being able to change the data in open_account?

Such there should not be a problem with adding open_account to the private section of Teller
Re-read the question!

Normal tellers can open accounts; FastCash cannot. So what do you think will happen if we place the "open_account" method into the private subclass?
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: DrDusk on October 27, 2018, 09:34:56 pm
Yep yep I fully get it now, I was getting confused as to what 'alter' meant. Yeah I get it, Thanks Heaps :)
Title: Re: HSC Software Design and Development - State Ranker QnA
Post by: Opengangs on October 28, 2018, 09:15:52 am
Thank you for all of the questions! The QnA went for a day longer than anticipated but that's okay!

If you have any further questions, feel free to use the Questions thread!

Thanks for participating! :)