Login

Welcome, Guest. Please login or register.

September 21, 2025, 01:25:29 pm

Author Topic: Some questions about DAT Software development (U3AOS2)  (Read 1994 times)  Share 

0 Members and 1 Guest are viewing this topic.

Chazef

  • Victorian
  • Forum Obsessive
  • ***
  • Posts: 249
  • Respect: +5
  • School: MLMC
Some questions about DAT Software development (U3AOS2)
« on: April 27, 2013, 08:26:33 pm »
0
Okay just a few questions regarding AOS2 :)
Do I need to know about the distinction between a top-down and bottom-up approach to solution design?

with pseudocode, say I wanted the user to input a numeric score for each of their classes, then input a sentinel value (-1) to indicate that they wanted an average (i.e. they had entered all their scores). I can't find a way to do it without repeating a piece of code. I currently have:

start
   initialise TotalScore, NoClasses to 0
   input ClassScore
   While ClassScore =/= -1
      TotalScore <-- TotalScore + ClassScore
      NoClasses += 1
      input ClassScore
   Repeat
   AvScore = Totalscore/NoClasses
   Print Avscore
stop

Is there a better way? Something like this doesn't require repeated code but damn for i 1 to 1 looks weird and would probably cause issues in code (excuse no capitals)

start
initialise totalscore, noclasses to 0
for i = 1 to 1
   input classscore
   if totalscore =/= -1 then
      totalscore += classscore
      noclasses += 1
      i = 0
   end if
next i
   AvScore = Totalscore/NoClasses
   Print Avscore
stop

Also, in psuedocode can I use the += or -= convention for adding/subtracting one value to/from another? And can I use something like 'exit loop' to just jump out of a loop?

With increasing efficiency of input, what exactly is an input mask? Is it something that you write over as you type input data or something that is inside the input field but then disappears when you give it focus, or something like the astericks when entering a password? Apparently '#' is an input mask (e.g. when indicating the required length of a credit card number) but VCEIT didn't specify whether using 'dd/mm/yy' was or not.

VCEIT also says that to evaluate efficiency, you should look for the time taken to communicate information. Is this referring to communication between the system and the user or between devices in the system. Also, is there a difference between processing time and the time for output to be produced?

In terms of features of programming languages, could anybody clarify the difference between an object's methods and properties. I couldn't work out if enabled is a property or a method. Also, can you force an event in-code e.g. forcing the procedure for btn1_click to activate even when the button hasn't been clicked?

Also, when referring to the 'thing' that reads through lines of code during the running of the program, am I referring to the program, the compiler, or something else?

I've read that there are 3 control structures in algorithms, with one being Selection. I think this is where a condition is tested and the outcome determines (selects) which part of code the program/compiler reads from then on. But does this include the conditions at the beginning/end of loops, or do they constitute part of the iterative structure?

With camel case, should the first letter of a variable like totalCost be capitalised? I've always had a lowercase first letter for variables since I learnt cheats for sims 2's debug-mode a a kid haha.

If anybody feels like answering any of these questions, It would be much appreciates, thanks :)
2012: legal studies [41]
2013: physics [47], chemistry [45], englang [40], softdev [43], methods [44]
ATAR: 99.20
Computer Science @ Monash

Lasercookie

  • Honorary Moderator
  • ATAR Notes Legend
  • *******
  • Posts: 3167
  • Respect: +326
Re: Some questions about DAT Software development (U3AOS2)
« Reply #1 on: April 27, 2013, 09:20:52 pm »
+1
I'll answer a few of them now, and if someone hasn't answered them in a couple of days time I'll answer the others too (pretty busy at the moment).

with pseudocode, say I wanted the user to input a numeric score for each of their classes, then input a sentinel value (-1) to indicate that they wanted an average (i.e. they had entered all their scores). I can't find a way to do it without repeating a piece of code. I currently have:
   
You could use a do...while loop. This will evaluate the code in the loop and THEN evaluate the condition to see if the loop will terminate or not. http://en.wikipedia.org/wiki/Do_while_loop That'd save you of having 'input classscore' twice. You could then have

Code: [Select]
start
   initialise TotalScore, NoClasses to 0
   Do While ClassScore =/= -1
      input ClassScore
      if ClassScore = -1:
           end loop
      TotalScore <-- TotalScore + ClassScore
      NoClasses += 1
   Repeat
   AvScore = Totalscore/NoClasses
   Print Avscore
stop
There's probably a better way then that even. You could get rid of the if statement by initialising NoClasses to -1 at the start.

e.g.
Code: [Select]
start
   initialise TotalScore, ClassScore to 0
   initialise NoClasses to -1
   Do While ClassScore =/= -1
      TotalScore <-- TotalScore + ClassScore
      NoClasses += 1     
      input ClassScore
   Repeat
   AvScore = Totalscore/NoClasses
   Print Avscore
stop
Though that only works because TotalScore would remain 0, and then NoClasses becomes 0 after the first run. And then it's all normal from there.

Quote
Also, in psuedocode can I use the += or -= convention for adding/subtracting one value to/from another? And can I use something like 'exit loop' to just jump out of a loop?
The "VCAA pseudocode" (no idea what else to call it) that you see in exams doesn't use = for assignment, they use an arrow. So I'd say no if you're talking about what VCAA will give you. I'm not a big fan of "VCAA pseudocode" mostly because they seem to make up whatever pseudocode style they're using as they go along with each exam.

For the second, yeah that sounds good. For most pseudocode things as long as it's clear what you're saying then it should be fine. I would hope that the SD 2012 Assessor Report when it comes out will shed some light on how they handled small variations in pseudocode style on those questions too (though they were pretty simplistic algorithms you had to write out in pseudocode for that exam).

Quote
With increasing efficiency of input, what exactly is an input mask? Is it something that you write over as you type input data or something that is inside the input field but then disappears when you give it focus, or something like the astericks when entering a password? Apparently '#' is an input mask (e.g. when indicating the required length of a credit card number) but VCEIT didn't specify whether using 'dd/mm/yy' was or not.
DD/MM/YYYY is an input mask yes. Input masks are just a definition for what the input should look like, you can think of it like a template. If you wanted to code one, you'd be validating the input to make sure that it fits that particular form.

Quote
VCEIT also says that to evaluate efficiency, you should look for the time taken to communicate information. Is this referring to communication between the system and the user or between devices in the system. Also, is there a difference between processing time and the time for output to be produced?
Depends on the context, you could take it to mean both. Keep in mind that some pages on VCEIT overlap with IT Apps, so some stuff on the site may make more sense from an ITA perspective, which would mean the system and the user. I think relying on the context given in the question for a lot of these kind of things in the course is a good way to approach this stuff, if it makes sense to talk about the communication between the devices then talk about it. You can easily think of questions where it's not going to make too much sense, or that it'd just be a negligible factor.

Quote
Also, when referring to the 'thing' that reads through lines of code during the running of the program, am I referring to the program, the compiler, or something else?
Can you elaborate this one a bit further? Can you come up with a few example sentences, just stick '?' for the unknown word.

Quote
With camel case, should the first letter of a variable like totalCost be capitalised? I've always had a lowercase first letter for variables since I learnt cheats for sims 2's debug-mode a a kid haha.
I prefer camelCase with a lowercase first letter. http://en.wikipedia.org/wiki/CamelCase#Variations_and_synonyms states that there's two conventions that get used. It's not really a strict set of rules or anything, it's just a convention that people use - it'd be a case of pick whichever one you like better or just go with whatever convention is being used in the existing code.
« Last Edit: April 27, 2013, 09:24:15 pm by laserblued »

Chazef

  • Victorian
  • Forum Obsessive
  • ***
  • Posts: 249
  • Respect: +5
  • School: MLMC
Re: Some questions about DAT Software development (U3AOS2)
« Reply #2 on: April 27, 2013, 09:49:20 pm »
0
thanks for that awesome reply :)

As for the 'thing' I'm referring to. I'll try an example: 'if the condition at the end of a do-until loop is not met, the ? goes back to the code at the beginning of the loop and goes from there'. 'The ? reads the code one line after the other'
2012: legal studies [41]
2013: physics [47], chemistry [45], englang [40], softdev [43], methods [44]
ATAR: 99.20
Computer Science @ Monash

Lasercookie

  • Honorary Moderator
  • ATAR Notes Legend
  • *******
  • Posts: 3167
  • Respect: +326
Re: Some questions about DAT Software development (U3AOS2)
« Reply #3 on: May 02, 2013, 05:17:25 am »
+1
thanks for that awesome reply :)

As for the 'thing' I'm referring to. I'll try an example: 'if the condition at the end of a do-until loop is not met, the ? goes back to the code at the beginning of the loop and goes from there'. 'The ? reads the code one line after the other'
If you're using an interpreted language, then it feels like it'd make sense to say interpreter. But otherwise I'd probably just say program. I don't think it would make sense to call it the compiler.

Quote
I've read that there are 3 control structures in algorithms, with one being Selection. I think this is where a condition is tested and the outcome determines (selects) which part of code the program/compiler reads from then on. But does this include the conditions at the beginning/end of loops, or do they constitute part of the iterative structure?
Yeah, I think you've got the idea for selection control structure, all your if statements etc. are of this type. They basically change the flow of the program based on some condition.

The conditions at the beginning of loops, I would think it'd part of the iterative structure. In a for loop for example, without giving that definition at the start the program wouldn't know what to iterate through. 

http://en.wikipedia.org/wiki/Structured_programming <-- good stuff, I'm a big fan of the overviews Wikipedia gives of these topics
Quote
Also, is there a difference between processing time and the time for output to be produced?
I'd lean towards yes. You could view processing time as the time for an algorithm to go start from finish, it doesn't necessarily have to give an output. But then again, depends how you're using the word output. Say if you had a sorting algorithm (like you'll look at in Unit 4 Outcome 1), you could view the sorted list as the output of that, but you wouldn't always be printing that sorted list to the screen. 

Quote
In terms of features of programming languages, could anybody clarify the difference between an object's methods and properties. I couldn't work out if enabled is a property or a method.
So an object is an instance of a class, e.g. btn1, btn2, btn3 are probably instances of a class called 'button'. A class is the bit of code that defines everything about how that object will behave.

Diagrams I found on google images: and

The properties of a class are basically the variables where the data gets stored. The methods of a class are basically the subroutines defined for that class.

Quote
Also, can you force an event in-code e.g. forcing the procedure for btn1_click to activate even when the button hasn't been clicked?
Calling the method btn1.click()  [or whatever syntax the language you're using has], is exactly what's going on somewhere in the code. I'm guessing you'd be using some kind of GUI building tool (VB.NET?) which for your convenience hand waves over all that work for you. I'm not sure if VB.NET will let you view all that code that it's handwaved over for you, that code might be somewhere in the automatically created files it makes. 

Have a read up on how to create a class in the language you're using and have a go at actually coding one that does something simple yourself. After taking a look at OOP outside of the context of GUIs (and more than just the idea of an object has methods and properties, which is pretty much all the study design requires of you), you might find it'll clear up some of these concepts for you.

This is the link for where I got that above car diagram, and steps you through the kind of code for Java: http://en.wikibooks.org/wiki/A-level_Computing/AQA/Problem_Solving,_Programming,_Operating_Systems,_Databases_and_Networking/Programming_Concepts/Object-oriented_programming_(OOP) (in other news A-Level Computing seems to have a pretty good syllabus).  If you're using VB.NET http://msdn.microsoft.com/en-us/library/ms973814.aspx Basically any language will have a tutorial like this.

Keep posting up anymore questions you might have.
« Last Edit: May 02, 2013, 05:20:36 am by laserblued »