1 / 6

Exam2 Review

Exam2 Review. CSE113 B.Ramamurthy. Date, Time and Place. April 8, 2015 Hoch 114, 2.00-2.50 Please bring Pencils, pens and erasers. Any form of ID with photograph Closed book exam. Topics. Functions: Define and call a function: 181-192

pnegrin
Download Presentation

Exam2 Review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exam2 Review CSE113 B.Ramamurthy B.Ramamurthy

  2. Date, Time and Place • April 8, 2015 • Hoch 114, 2.00-2.50 • Please bring • Pencils, pens and erasers. • Any form of ID with photograph • Closed book exam B.Ramamurthy

  3. Topics • Functions: Define and call a function: 181-192 • Arrays: defines and manipulate an array: mix, max, map functions: 301-312. • 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. 133-135. B.Ramamurthy

  4. Sample questions • 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, pushMatrxi and popMatrix that will be fine too. Otherwise just use x and y and try moving it. B.Ramamurthy

  5. Format • One question per topic discussed above. Only 8 questions • Each question may have subsections • We will NOT penalize you for syntax errors, but all important elements should be there B.Ramamurthy

  6. How to study? Prepare? • Come prepared: there is no substitute for hard work • Review class notes; Review sample questions; • Understand project work and class work • Find ways to efficiently answer questions • Find ways to avoid silly mistakes • Create 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 questions • Build up competencies as you are reviewing the course material and not deficiencies… • Good luck. B.Ramamurthy

More Related