FIT1051 S1 2022 – Ed Lessons N
This course has been archived
Lessons Slides Prev Next
Assessment #3
Assessment #3
Submission deadline: 24th April 2022 11:59pm AEST via Moodle
Instruction
Below are the coding tasks that you need to complete individually for assessment 3. You should download the IntelliJ project folder as below and unzip it. Then work on the tasks in the project folder.
Assessment3.zip
This assessment is worth 18% of the unit total. It contains 100 marks, which has two components.
Task correctness weighted 100 and will be converted to 90 marks.
Task 1 has 15 marks Task 2 has 6 marks Task 3 has 12 marks Task 4 has 22 marks Task 5 has 20 marks Task 6 has 11 marks Task 7 has 14 marks
Code readability & documentation has 5 marks. Code development has 5 marks.
Academic Integrity
Please be reminded of the academic integrity mentioned in Week 01. You should code alone and ask the unit sta for help. Do not post your code in public forums.
Task 1 (W5 – 15 marks)
Code the following in Task 1 to demonstrate side e ects in methods. Brie y explain step by step how side e ect occur to reference types but not to value types as inline comment.
Code a calling method that declares an array of double type and initialised with 5 sensible values. Call task1b method (called) in task1a method (calling). Display your array before and after to prove side e ect has taken place for reference types but not to value types.
Code a called method that takes two parameters, an array of double as reference type and a double value. In the method, manipulate the argument by incrementing the value of the array. Note that you are not required to manipulate the entire array.
Task 2 (W5 – 6 marks)
Code in task2() method as below. Using the String format method just once, display the integer values 1, 10, 100, 1000 each on its own line right justi ed. The values must not be hard-coded. Example of the output as below.
Hints: Inserting the character sequence \n in a String embeds a ‘line feed’ (new line – similar to pressing ENTER when typing words in Notepad) in the string e.g. “ line1\nline2 “
Task 3 (W5 – 12 marks)
Code in task3() method by implementing the following sequence using ArrayList.
1. Declare an array list named myList which has the capacity of 10.
2. Add the following numbers: “one”, “seven”, “