1/17/2016B.Ramamurthy1 Final Review CSE321 B.Ramamurthy.

6
07/31/22 B.Ramamurthy 1 Final Review CSE321 B.Ramamurthy

description

Topics Object-oriented design: Classes and objects; See class notes posted on ublearns on the Ball and Box classes. pp Functions: Define and call a function: Arrays: defines and manipulate an array: mix, max, map functions: Switch statement: See class notes While loop: write a while loop for a given problem statement; classnotes Random number generation: generate an integer random number in a given range. Move objects using translate; pushMatrix and popMatrix Draw shapes using vertex: /17/2016B.Ramamurthy3

Transcript of 1/17/2016B.Ramamurthy1 Final Review CSE321 B.Ramamurthy.

Page 1: 1/17/2016B.Ramamurthy1 Final Review CSE321 B.Ramamurthy.

05/03/23 B.Ramamurthy 1

Final ReviewCSE321B.Ramamurthy

Page 2: 1/17/2016B.Ramamurthy1 Final Review CSE321 B.Ramamurthy.

05/03/23 B.Ramamurthy 2

Date, Time and PlaceDecember 9, 2015, Wednesday2.00-2.50PMNSC 215Please bring Pencils, pens and erasers. Any form of ID with photograph Closed book exam

Page 3: 1/17/2016B.Ramamurthy1 Final Review CSE321 B.Ramamurthy.

TopicsObject-oriented design: Classes and objects; See class notes posted on ublearns on the Ball and Box classes. pp.395-407Functions: Define and call a function: 181-192Arrays: defines and manipulate an array: mix, max, map functions: 301-312.Switch statement: See class notesWhile loop: write a while loop for a given problem statement; classnotes

Random number generation: generate an integer random number in a given range.

Move objects using translate; pushMatrix and popMatrix. 133-135.Draw shapes using vertex: 69-77

05/03/23 B.Ramamurthy 3

Page 4: 1/17/2016B.Ramamurthy1 Final Review CSE321 B.Ramamurthy.

05/03/23 B.Ramamurthy 4

Sample questionsDefine a class of objects of given type. Example: Define a class of objects of type car.Ans: Rectangular box with class name, class attributes and functions (no need for full function definition)Define a function with parameters and a return value? Example: Define a function rolldice that roll two dice and return the sum of the values of the dice.How will you call this function and assign its value to a variable?Define array and use it? Define an array and initialize it daily temperature for this week (assume some values). Use a for loop and array length function to sum up the elements and determine the average for the week.Convert an if statement to a switch statement? We will discuss this on Monday.Generate a random number in a given range? Use this in a while loop? Determine the sum of a random number until the sum becomes 100. Print all the random number inside the loop. We will discuss this Monday.How will you move an object in Processing using its x and y coordinates? If you understand translate, pushMatrxix and popMatrix that will be fine too. Otherwise just use x and y and try moving it.

Page 5: 1/17/2016B.Ramamurthy1 Final Review CSE321 B.Ramamurthy.

05/03/23 B.Ramamurthy 5

FormatOne question per topic discussed above. Only 6 questionsEach question may have subsectionsWe will NOT penalize you for syntax errors, but important elements should be there

Page 6: 1/17/2016B.Ramamurthy1 Final Review CSE321 B.Ramamurthy.

How to study? Prepare?Come prepared: there is no substitute for hard work Review class notes; Understand project work and class workFind ways to efficiently answer questionsFind ways to avoid silly mistakesCreate a mental checklist to make sure you have not missed anything important on the exam (like your name of the exam paper!)Read the question paper and strategize on the order in which you will answer the questionsBuild up competencies as you are reviewing the course material and not deficiencies…Good luck.

05/03/23 B.Ramamurthy 6