Software Design & Development Marathon [2012] (1 Viewer)

GoldyOrNugget

Señor Member
Joined
Jul 14, 2012
Messages
583
Gender
Male
HSC
2012
Hey, can anyone tell me if the 'developing a solution package' topic is examinable. Also, do we need to know how to use Prolog or any other language for option 1?

cheers, any help appreciated!
Yes, yes (I'm pretty sure -- just look at past papers)
 

Cyberbully

Where do you live?
Joined
Oct 29, 2011
Messages
122
Gender
Undisclosed
HSC
2012
Q.

The following algorithm (this is one of the std. algorithms) prints n unique random numbers in the range 0..1000 inclusive

Code:
BEGIN GenerateRandoms(n)
    used = boolean array of size 1001
    FOR i=0 TO 1000
        used(i) = FALSE
    NEXT i
    FOR i=1 TO n
        nextNum = random integer in range 0..1000
        WHILE used(nextNum) DO
            nextNum = random integer in range 0..1000
        ENDWHILE
        PRINT nextNum
        used(nextNum) = TRUE
    NEXT i
END GenerateRandoms
1. Dave calls the routine GenerateRandoms(1337). Identify the error that subsequently occurs, and describe why it occurs. (2 marks)

2. Dave now requires the generation of n unique random numbers in the range 0..1012. Outline potential issues that would occur if the existing algorithm was modified to accommodate this new range. (2 marks)

3. Dave additionally guarantees that n will always be less than 1000. Propose and give pseudocode for a new algorithm that resolves the issues raised in part (2). (4 marks)

4. You are given access to a library routine that randomly shuffles a list of k items very quickly. Outline how this subroutine could be utilised in an efficient algorithm to solve part (3). (3 marks)

5. Explain how the shuffling subroutine in the library could be implemented. (2 marks)
lazy responses

1. infinite loop after 1000 numbers, things bo batcrap cray cray. convert 1000 to n.
2. i will need 10 kilograms (that's right) of ram - http://www.downloadmoreram.com/
3. add line:
IF n >= 1000 THEN
PRINT You screwed up. This is a useful error message.
ENDIF
4. just apply it, less runtime/processingpower. what is it, O(e^-x)?
5. gorosort. seriously, just use da fn

you do realise they wouldnt ask anywhere as hard as this in HSC?

also, 0...1000 is wrong. 1....1000 inclusive is ok? your algorithm is unclear
 
Last edited:

sddmoustache

New Member
Joined
Oct 24, 2012
Messages
26
Gender
Female
HSC
2012
1. Urghh. You can't generated 1337 unique random numbers in the range 0..1000? So it'll be a runtime error due to infinite loop

2. Doesn't the question ask what potential problems are? It doesn't ask to propose any solutions.
 

JaySimmo

New Member
Joined
Feb 14, 2012
Messages
7
Gender
Male
HSC
2012
Q.

The following algorithm (this is one of the std. algorithms) prints n unique random numbers in the range 0..1000 inclusive

Code:
BEGIN GenerateRandoms(n)
    used = boolean array of size 1001
    FOR i=0 TO 1000
        used(i) = FALSE
    NEXT i
    FOR i=1 TO n
        nextNum = random integer in range 0..1000
        WHILE used(nextNum) DO
            nextNum = random integer in range 0..1000
        ENDWHILE
        PRINT nextNum
        used(nextNum) = TRUE
    NEXT i
END GenerateRandoms
1. Dave calls the routine GenerateRandoms(1337). Identify the error that subsequently occurs, and describe why it occurs. (2 marks)

2. Dave now requires the generation of n unique random numbers in the range 0..1012. Outline potential issues that would occur if the existing algorithm was modified to accommodate this new range. (2 marks)

3. Dave additionally guarantees that n will always be less than 1000. Propose and give pseudocode for a new algorithm that resolves the issues raised in part (2). (4 marks)

4. You are given access to a library routine that randomly shuffles a list of k items very quickly. Outline how this subroutine could be utilised in an efficient algorithm to solve part (3). (3 marks)

5. Explain how the shuffling subroutine in the library could be implemented. (2 marks)
1. The integer 1337 is outside of the domain of the 'used' array, considering that the second part of the algorithm is dependent on the boolean returns of the used array, if an index in the used array is called outside of range (any number > 1001) the algorithm will return and index out of range error, and inexorably break.

2. Considering that 10^12 is a billion, this scope could conjure arithmetic overflow issues, to avoid this, the processor power should be enhance, but also having less loops in the algorithm (such as removing the while inside the for loop), should reduce delay and subsequent overflow.

3.
Code:
Begin generateRandoms (n)
     let rndNum be an integer
     used = boolean array of size n
     For i = 0 to n-1
             used (i) = False
     Next i
     For i = 0 to n-1
             If used (i) = False THEN
                    rndNum = random integer in range 0...10^12
             End If
             Print rndNum
     Next i
End generateRandoms
4. You could use this customised library routine to shuffle a large list of integers that range for 0 to 10^12, each time the list is shuffled you would execute a print of any index, lets consider index(0) for the sake of it, every time it shuffles, assuming that the library routine is accurate, the algorithm will print a random number every in the range n times.

5. The shuffling subroutine, considering it is customised and downloadable, the library routine would be downloaded and read into the coding program, this method is then accessible by the developer. The implementation of the subroutine is like calling any other subroutine (i.e. shuffleList() )

hope im not too wrong :)
 

GoldyOrNugget

Señor Member
Joined
Jul 14, 2012
Messages
583
Gender
Male
HSC
2012
you do realise they wouldnt ask anywhere as hard as this in HSC?
1,2,3 are stock-standard SDD questions. I just realised that my soln to 4 is derped and I'm an idiot ^_^ so ignore Q4. 5 is probably too challenging for an SDD exam, but it's good algorithm practice.
 

GoldyOrNugget

Señor Member
Joined
Jul 14, 2012
Messages
583
Gender
Male
HSC
2012
1. Urghh. You can't generated 1337 unique random numbers in the range 0..1000? So it'll be a runtime error due to infinite loop

2. Doesn't the question ask what potential problems are? It doesn't ask to propose any solutions.
1. yep.

2. yeah ok fair enough. I meant for Q3, your solution needs 8TB of RAM, which is not viable.
 

Cyberbully

Where do you live?
Joined
Oct 29, 2011
Messages
122
Gender
Undisclosed
HSC
2012
1,2,3 are stock-standard SDD questions. I just realised that my soln to 4 is derped and I'm an idiot ^_^ so ignore Q4. 5 is probably too challenging for an SDD exam, but it's good algorithm practice.
it's 4 and 5 that went (almost) wtf to 95% of the state - it ain't comp1927. 1 is great, 2 unlikely, 3 sounds like you're making this an AIO question

lol sdd is barely algorithms though, it's more "define quality assurance"
 
Last edited:

sddmoustache

New Member
Joined
Oct 24, 2012
Messages
26
Gender
Female
HSC
2012
Someone plz help? I know you guys are having fun...but I'm gonna fail. How do you calculate RAM as goldy said? I don't want to lose marks coz of RAM... D: D: D:
 

GoldyOrNugget

Señor Member
Joined
Jul 14, 2012
Messages
583
Gender
Male
HSC
2012
Question: Describe the three levels of testing a software solution (3)
The three levels of testing are module testing, program testing and system testing.

- Module testing involves testing each subroutine, procedure and module independently to make sure it works. Unit tests or 'drivers' are short pieces of code that are written to test each of these components and ensure they produce the correct output for a range of inputs. Module testing eliminates many bugs that would otherwise be hard to locate further in the testing process.

- Program testing involves testing the integration of and interface between all the modules in the program. Individual programs are tested as a whole. (how much more is there to say about this?)

- System testing tests the final system's operation, particularly the interfaces between programs. Often, even though the programs work perfectly, errors arise in other aspects of the system, such as telecommunications links. System testing will often use live test data to test how the system responds to a mix of transaction types, large file sizes, and volume data (load testing). The response time of the system is measured to ensure it is satisfactory, and the system's outputs are compared to expected outputs. Alpha and beta testing also occur at this stage. Alpha testing involves testing by the developers and other project members. Following this, beta testing involves releasing the product to a small group of people representative of the client and obtaining feedback via surveys, interviews and similar techniques. The system is benchmarked and the original list of requirements is consulted to ensure that all have been met in the quality assurance process. Acceptance testing is finally performed, usually by the client, to ensure that the system conforms to their standards. If the client accepts the system, final payments are made and the client can sign off.
 

Cyberbully

Where do you live?
Joined
Oct 29, 2011
Messages
122
Gender
Undisclosed
HSC
2012
The three levels of testing are module testing, program testing and system testing.

- Module testing involves testing each subroutine, procedure and module independently to make sure it works. Unit tests or 'drivers' are short pieces of code that are written to test each of these components and ensure they produce the correct output for a range of inputs. Module testing eliminates many bugs that would otherwise be hard to locate further in the testing process.

- Program testing involves testing the integration of and interface between all the modules in the program. Individual programs are tested as a whole. (how much more is there to say about this?)

- System testing tests the final system's operation, particularly the interfaces between programs. Often, even though the programs work perfectly, errors arise in other aspects of the system, such as telecommunications links. System testing will often use live test data to test how the system responds to a mix of transaction types, large file sizes, and volume data (load testing). The response time of the system is measured to ensure it is satisfactory, and the system's outputs are compared to expected outputs. Alpha and beta testing also occur at this stage. Alpha testing involves testing by the developers and other project members. Following this, beta testing involves releasing the product to a small group of people representative of the client and obtaining feedback via surveys, interviews and similar techniques. The system is benchmarked and the original list of requirements is consulted to ensure that all have been met in the quality assurance process. Acceptance testing is finally performed, usually by the client, to ensure that the system conforms to their standards. If the client accepts the system, final payments are made and the client can sign off.
so much bullcrap. but i'll take it (Y)

Q: Describe three elements of individual screen design that must be considered. (3)
Q2: Describe three factors that need to be addressed when considering a programming language (3)
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top