Work through the list without notes. If you cannot do a statement, follow its link, then come back. Guide = study guide; Practice = practice questions.
Understanding
- I can say that
Mathis injava.lang, needs no import and contains only class methods. (Guide: “A toolbox of mathematical class methods”; Practice Question 1) - I can state the return type of
abs(both versions),pow,sqrtandrandom. (Guide: the table of methods; Practice Questions 2 and 3) - I can state the range of
Math.random()and which end is inclusive. (Guide: “Random numbers from Math.random”) - I can explain what inclusive and exclusive ends of a range mean. (Guide: “Random numbers from Math.random”; Practice Question 10)
Skills
- I can evaluate expressions that combine
abs,powandsqrtand give the value and type. (Guide: Worked example 1; Practice Questions 2, 3 and 4) - I can write a random
intexpression for a given inclusive range using scale, cast and shift. (Guide: Worked example 2; Practice Questions 5 and 8) - I can write a random
doubleexpression for a given range. (Guide: “The general recipe”; Practice Question 8) - I can work out the possible range of a given random expression. (Practice Question 6)
- I can write a class method that uses Math methods. (Practice Question 9)
Reasoning
- I can test a random expression by trying the smallest and largest possible values. (Guide: Worked example 2; Practice Questions 8 and 10)
- I can explain why
(int) Math.random() * 6is always 0. (Guide: “Common misconceptions”; Practice Question 7) - I can explain why the multiplier is the count of values, not the upper end. (Guide: “The general recipe”; Practice Questions 5 and 6)
All ticked? Move on to the Topic 1.12 study guide, Objects: Instances of Classes, or return to the course roadmap.