Lab Test
Skip navigation Structured Programming Research School of Computer Science Search query Search ANU web, staff & maps Search current site content Search Menu Search query Search COMP1110/6710 Lectures Labs Assessments Help Search ANU web, staff & maps Search current site content COMP1110/6710 Lectures Labs Assessments Help menu Search query Search COMP1110/6710 Search query Assessments Assessment Deliverables Assignment 1 Assignment 2 Class Engagement Lab Test Mid-Semester Exam Final Exam Redeemable Assessments Related sites Piazza You are here » Assessment » Lab Test All students will sit a 90-minute test in regular lab times in week 3. You will not use the labs repository to complete the lab test. Instead, you will create your own repository as part of the test. When you sit the test, you will find instructions on the desktop of the computer when you log in. 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 how-to video Lab test, question 1 shows you how to complete Question 1 of the lab test. Be sure to watch it and ensure that you can complete question one without help (the video is from 2016, so there are minor differences to the appearance of IntelliJ, however, the steps remain the same). 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, create a new Java project called comp1110-labtest. Import the project into git (VCS -> Import into Version Control... -> Create Git Repository.... Select the default location (comp1110-labtest) to create the new git repository. Within your project’s src directory, create a new Java class called comp1110.labtest.HelloWorld (you should add the file to git when prompted). Force JUnit to be added to your project’s classpath. Place your cursor within your HelloWorld class, and type Ctrl+Shift+T (or Navigate -> Test). Select OK when prompted with “Create test in the same source root?”. This will bring up the Create New Test dialogue. In the “Testing library:” drop-down, select Junit4. Use the Fix button to add Junit to your module. You can then press Cancel. Be sure to choose Junit4 (not Junit3 or Junit5). Now add comp1110-labtest.jar to your module’s dependencies. File -> Project Structure..., choose Modules and select the Dependencies tab. Use the + button (mid-right of window) and select JARs or directories... then navigate to your comp1110-labtest.jar which you should download if you’re practising, or you’ll find on your desktop when you’re sitting the lab exam. You should now see that comp1110-labtest.jar is within your External Libraries folder within your IntelliJ project. Navigate to your External Libraries folder and you should see comp1110-labtest.jar. Expand the jar, and you should see runConfigurations. Select runConfigurations and copy it (right mouse click or ctrl+C) and then paste it inside your .idea folder. Once you do that, you should see tests appear next to the green run button at the upper right of your screen. Navigate back to your HelloWorld class, and modify it so that its main method prints Hello world!. Test your HelloWorld class by selecting the Q1 HelloWorldTest option from the drop-down next to the green run button. Once your HelloWorld class passes the tests, commit it to your git repo. Question 2 (5 Marks) You will be asked to answer one of the following questions: Greet Literals Name NumberWord ShoeSize SimpleInt SimpleString Square Question 3 (5 Marks) You will be asked to answer one of the following questions: BMI Even Grade Movie Odd Question 4 (5 Marks) You will be asked to answer one of the following questions: Ones Permute Prime Updated: 22 Jan 2021 / Responsible Officer: Head of School / Page Contact: Josh Milthorpe Contact ANU Copyright Disclaimer Privacy Freedom of Information +61 2 6125 5111 The Australian National University, Canberra CRICOS Provider : 00120C ABN : 52 234 063 906 You appear to be using Internet Explorer 7, or have compatibility view turned on. Your browser is not supported by ANU web styles. » Learn how to fix this » Ignore this warning in future