Академический Документы
Профессиональный Документы
Культура Документы
Assignment 2
Deadline: Day 30/11/2019 @ 23:59
[Total Mark for this Assignment is 5]
Student Details:
Name: ### ID: ###
CRN: ###
Instructions:
You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on
Blackboard via the allocated folder. These files must not be in compressed format.
It is your responsibility to check and make sure that you have uploaded both the correct files.
Zero make will be given if you try to bypass the SafeAssing (e.g. misspell words, remove spaces between
words, hide characters, use different character sets or languages other than English or any kind of
manipulation).
The work should be your own, copying from students or other resources will result in ZERO marks.
Use Times New Roman font for all your answers.
Pg. 01 Question One
Learning
Outcome(s): Question One 1 Mark
LO4: Write a for Loop statement and a While Loop statement to print Odd numbers
from 10 to 0.
Develop a
Note: Write your code in here as a text, a screenshot of the code will not
program based on
be accepted.
specification
using Typical run:
programming
language
elements
including syntax,
data types,
for loop While loop
conditional
statement, control
structures,
procedures and
arrays.
Pg. 02 Question Two
Outcome(s):
Write a Java Program that do the following:
LO3+LO4: A. Create an ArrayList of type Integer.
Demonstrate B. Store 20 random integer numbers in the ArrayList using a for loop. The
Integrated
random numbers range should be between 1 and 100.
Development
C. Print the ArrayList using a print statement.
Environment
D. Find and print the average value of the entire ArrayList.
(IDE) for the
editing, building, E. Run the program multiple times. show at least 4 screenshot of the
debugging, and outputs.
testing of F. Write your observation on the value of average.
programs.
Note: Write your code in here as a text, a screenshot of the code will not
Develop a be accepted.
program based on
specification
Typical run 1:
using
programming
language
elements
including syntax, Typical run 2:
data types,
conditional
statement, control
structures, Typical run 3:
procedures and
arrays.
Typical run 4: