All students will sit a test in regular lab times in Week 4.
Your lab test will include the HelloWorld exercise from Lab 1, plus four questions chosen at random from the homework questions for units J1, J2, J3, J4, J5 , J6, and O1). The test will not contain any questions that you have not seen before. Work through all of your homework questions to ensure that you are fully prepared for the exam.
The lab test will be distributed via the CECS exam GitLab server. You will clone the lab test repository using the same steps as you used to clone your own fork of the comp1110-labs repository - please review the instructions for Lab 1 to ensure you know what to do.
Your mark in the lab test is redeemable against the final exam.
The structure of the test will be as follows:
COMP1110 Lab Test
The test is marked out of 20. Your mark will be divided by 4 to give a final mark out of 5.
Tasks#
No Materials permitted.
Question 1 (5 Marks)#
You will be asked to answer the following question:
- Using IntelliJ, clone your labtest exam (select File -> New -> Project from Version Control…), and enter the https URL provided to you.
- Within the
comp1110.labtest
package of thecomp1110-labtest
project, find the class calledHelloWorld
. This should appear as a fileHelloWorld
within a packagecomp1110.labtest
. This detail is important because the tests assume that your work appears in exactly this location. - Run the Q1 HelloWorld test from the dropdown menu. This should run five tests, and all five should fail with a message
java.lang.NoSuchMethodError: void comp1110.labtest.HelloWorld.main(java.lang.String[])'
. - If the above does not happen, you should consult your tutor.
- Now navigate to your
HelloWorld
class, and modify it so that its main method printsHello world!
. - Test your
HelloWorld
class by selecting the Q1 HelloWorld option in the drop-down next to green arrow. - Once your
HelloWorld
class passes the tests, commit it to your Git repo, and push to the server (this is critical, since you will only be marked on what is actually pushed to the server).
Question 2 (5 Marks)#
You will be asked to answer one of the following questions:
Question 3 (5 Marks)#
You will be asked to answer one of the following questions:
Question 4 (5 Marks)#
You will be asked to answer one of the following questions: