COMP3200 Anonymous Questions and Answers |
This page lists the various questions and answers. To submit a question, use the anonymous questions page. You may find the keyword index and/or top-level index useful for locating past questions and answers.
We have taken the liberty of making some minor typographical corrections to some of the questions as originally put. Although most of the questions here will have been submitted anonymously, this page also serves to answer some questions of general interest to those on the course.
Submission reference: IN3727
In assignment 3, in the examples given it also displays the common string count but it does not tell us to add any common string count in the ArrayAnalyser class area. so do we need to add this count?
You only need to implement the methods described in the brief.
The count results from calling the getCommonStrings method. Rather than printing the common strings, the example output just shows how many there were.
Submission reference: IN3726
Hi, I've heard some people have got an email about their result for the weekly exercises last term, I haven't had any messages - could you tell me what this is about and how we will find our results? thanks
They didn't get an email. The marks are in KV.
Submission reference: IN3725
does the output have to look exactly the same as the one on the word doc ? mine looks something like this;
Array Analyser for Kennedy Building Concatenation: hello:world:this:is:one:small:file:of:data:hello:here:is:more:data:this:is: file:number:two Longest length: 6 Unique count: 8 Number of Common Strings; 5 The sorted common Strings are : [file, data, this, is, hello] Product: 2 This is assessment 3 for module COMP3200
No, you have a free choice over how the output looks. It is purely to help you check the results of your implementation. When your code is tested, the tests will call your methods and check what they return, rather than looking at the output from the Main class.
Submission reference: IN3724
How do I get started with assignment 3? I have no idea what its actually asking me to code
Have you read the assessment description at least a couple of times? From what you have read, what do you think it is asking you to do? If you can give me some sense of what understanding you have, I can try to help you work out the next step.
Submission reference: IN3723
Hi, I need some help with assignment 3, it may be me being stupid though. The getUniqueCount method says "Write a method to count how many of the strings in the two arrays only occur once in total." The basic configuration contains these arrays:
"hello, world, this, is, one, small, file, of, data" "hello, here, is, more, data, this, is, file, number, two"The document says this should give the result of 8 unique strings. But it looks like there are more than 8: "hello, world, this, is, one, small, file, of, data, here, more, number, two" That's 13, right?
Have I misunderstood the logic its asking for or is the document wrong?
(Also the run config tries to use dataX.txt and listX.txt but they are actually called basicX.txt and advancedX.txt in the folder. Might help the person in the previous question) Sorry for the long question. Thanks
The word "hello" occurs more than once, so that should not be counted, for instance. It is 'unique' strings that count.
Submission reference: IN3722
the assignment 3 , should the code run properly on all 3 configurations , mine only works on the noargs.
Yes, it should work properly on all three. The 'basic' and 'advanced' configurations allow files to be passed to the program. The provided Main class will read files passed in that way.
Submission reference: IN3720
Are we allowed to use HashMap's in the Assignment 3? I'm Using it for the 'getUniqueCount' Method, but if not ill try and use arrays or if there's a simpler method I'm not seeing.
Yes, absolutely fine. We will cover HashMap in COMP5200 but you are welcome to use things we haven't covered in COMP3200.
Submission reference: IN3719
If I get 100% on 9/10 of my weekly pc class exercises could I get 100% overall?
Yes, because you are marked on the best 8 out of 10. Well done, if that is the case!
Submission reference: IN3718
Sorry, I know you've said this before but I can't find where: when will we get the results to the in class assessment? I think you said at the start of next term. Thanks
Yes, at the start of next term.
Submission reference: IN3717
When will the submission area for assignment 3 be made avaialable?
After the end of today. Some people were confused by it during last week's assessments and uploaded to the wrong area. There is one more session to go and then I will re-open it.
Submission reference: IN3716
How do I write a Junit test for a void function? I've tried assertEquals but I cant pass anything through since my method takes no parameters and searching online I cant find anything that I understand.
For there to be anything to test, the method you call must have some effect - either on the state of the object on which it was called, on another object, or by outputting something.
So, before the method is called, you would get the state of whatever is expected to change, and then get the state after. Then check the after state to make sure it is what you expect it to be.
For instance, to test the printTicket method of a TicketMachine, get the balance before the call and the balance after and make sure the balance has been reduced by the price of the ticket.
Submission reference: IN3715
Hello, I had a question regarding the in class times assessment, my question was will we get marked on our Main method where the code is executed or run? I know this wasn't the case for assignment two since it was marked by test classes instead.
No, you won't be marked on that, so you will be free to write whatever you like in it to test your code.
Submission reference: IN3714
Is there a reason why we're not allowed to charge our laptops? I would understand if they weren't allowed at all but no charging seems odd. The PCs seem to store IDE settings on the C drive so if I use a different PC I would have to change my settings to what I'm used to which is a little annoying
It's because we can't guarantee that you will have access to a socket and we don't want unsafe wires trailing about the room. It shouldn't be difficult to bring a laptop fully charged that will last for the duration of the class and it also shouldn't take long to set up the IDE before the session starts if you choose to use a desktop PC.
Submission reference: IN3713
Few questions about the assessment: Aer we are allowed to use IntelliJ's line completion? Can we use our own laptop? And are we only allowed to open documents in our onedrive, or can we look things up online? Thanks
The answers to alll those questions are given in the Rules document, which you can find in the Assignment 5 section of the Moodle page.
Submission reference: IN3712
I just want to inquire that is it enough to just have an overview on what does the path and paths do, or do we need to thoroughly to know about it as the other libraries that we've learnt? Also i actually understood how does the Scanner work, is it expected from us during the quiz to know about it ?
It is worth knowing about Scanner, in general, so if you know it for the quiz you would be able to use it there if necessary.
Submission reference: IN3711
hey david, just inquisitive question, regarding about the classes that we've imported them which are the Path and Paths, are we suppose to know them really good as the random, array list and the other packages that we've discovered ?
No, you don't have to know them really well because you will typically use them in fairly standard ways. When you need to use them you can look at examples of what you need to do, and the IDE will also help you with the imports and the method calls.
Submission reference: IN3710
If we used 'for' in Assignment 2 for 'removeType', despite it being a worse alternative to while in this instance, will we lose marks?
No, as long as it was done accurately so that your code passed the tests. The primary aim is to get correctly functioning code. You can always improve its quality after once you know what is good and what is not so good.
Submission reference: IN3709
For the Mock Assignment 5. the third question asks that we must return the new ArrayList created from the method. But whenever I return it, it returns the Memory Address instead of the element in String format Is the question asking for this type of output or do I need to return it like the getDetails() method? My Output:
[Alien@1b2c6ec2, Alien@4edde6e5]My Code:
code deletedIf this is not what the question is asking for, how could I fix the this code? I have tried using toString but I cant seem to get it to work.
Your code is fine. The issue is trying to print what is in the list returned by the method. If you just write:
System.out.println(list);
then the list doesn't know to call getDetails on an Alien to print its details. You can check that the contents of the returned list are correct by printing the list in a for-each loop in the main method, calling getDetails on each Alien.
Submission reference: IN3708
how similar will the mock be to the actual exam , will it be the same amount of questions (3) and so on ?
Hopefully you can see from the mock that we want you to be able to demonstrate competence with the core elements we have covered in the course so far. So, the real one won't be much different in that respect. The structure might vary a little, but probably not much.
Submission reference: IN3707
Hi When will the mock assessment be uploaded ? and also on vevox , it was said that we can use files that we save on the one drive during the assessment. Does this mean we can add useful notes and lecture slides to the one drive and use it during the time limited assessment. Thanks
We will probably upload the mock on Wed 20th Nov.
Yes, you can have notes available via OneDrive.
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. |