120 likes | 235 Views
CS123 Engineering Computation Lab Lab 4. Bruce Char Department of Computer Science Drexel University Spring 2010. Administrative Notes. Please contact your instructor immediately if you are eligible for extended time for the Proficiency Exam
E N D
CS123 Engineering Computation LabLab 4 Bruce Char Department of Computer Science Drexel University Spring 2010
Administrative Notes • Please contact your instructor immediately if you are eligible for extended time for the Proficiency Exam • Please also review your bbVista Lab and Quiz grades and report any discrepancies to your instructor • As with cs121 and cs122, there will be an opportunity to earn a 2% bonus for submitting a student evaluation. Details to follow!
Proficiency Exam Preview • Same logistics as in cs121 and cs122 • Proctored format • Two quizzes (about 25 and 70 minutes) • Sign-in and score verification • No access to bbVista – will have access to all course site materials • To be conducted during week of May 30 (week 10) in class for your regularly scheduled lab session • Note – Monday labs will be held on 6/6 (last day of classes) as opposed to 5/30 (Memorial Day) • Practice – week of May 23 (week 9) • All 4 quizzes taken throughout the term will be re-posted on Tuesday, 5/24 – note that quiz 4 will take place during week 9 • A special quiz containing some problems not included in regular quizzes will also be issued – these questions are candidates for inclusion • Lab solutions will be posted on bbVista • Full quiz week (9) CLC coverage – Monday through Friday • Graduating seniors are NOT exempt from the proficiency exam!!
Lab 4 Overview • Based on materials from Chapters 21 and 22 readings • Chapter 21 – Calculations that return true or false • Use of boolean expressions with a programming API • Chapter 22 – Review of course goals and objectives
Lab 4 Overview • Lab 4 outline – 5 parts • Part 0 – introduction to software mechanics and features • Part 1 - move car in a square • Part 2 – bump car back and forth between 2 walls • Part 3 – find gap in a wall and proceed to target • Part 4 – find the nth gap in a wall and proceed to target
Lab 4 Maple ConceptsDiscussion and Demo • Application Programming Interfaces (APIs) • An industry standard term for a package of procedures that simplifies the process of writing code for a particular purpose • An API usually provides a set of functions (user interfaces) to create applications • Maple provides an API for many common mathematical and computation tasks • Plotting, calculus, trigonometric functions • Why they are important • Entire courses on software design and reusability • Bottom line – give programmers a way of easily writing code for a particular platform • Encourages rapid development, saves work
Lab 4 Maple Concepts:Discussion and Demo • Car Simulator API • An API written by the course staff that enables you to animate and simulate car movement in conjunctions with walls, barriers, etc. • This simulator ignores forces of friction, focusing on the logic of controlling the (directional) movement of a car
Lab 4 Maple Concepts:Discussion • Car Simulator API – 4 key functions available • move(x) • Moves the car forward (in the direction it is currently pointed) x squares • Turn(d) • Turns the car d radians to the left • Turn (Pi/2) makes the car turn directly to the left • Turn (-Pi/2) makes the car turn directly to the right • The turn is always relative to the current direction of the car • isTouching(d,’stateOfCar’) • Returns “true” if the car is touching some object in the direction d radians above (PI/2), left(Pi), below(-PI/2) or right (0) • Direction d is always absolute in terms of the X-Y axis • It is OK to use ‘bt’ for ‘stateOfCar’
Lab 4 Maple Concepts:Discussion • Car Simulator API – 4 key functions available • getCURRENTLOCATION() • Get the current state of the car, which is a list with: • [x, y, dir, state] • [2, 0, 0, CarSimulation:-CARNORMAL]
Lab 4 Maple Concepts:Discussion and Demo • Car Simulator API – flow of lab • There are 4 sections to Part 0 (each contained in it’s own work sheet) and 4 problem work sheets associated with Parts 1, 2, 3 and 4 • You must open and perform the tasks for each of these work sheets in the order presented in the lab description • It is especially critical to 1st open and run the Part 0 tutorials. It loads the Car Simulator API software that is needed throughout these exercises
Lab 4 Maple Concepts:Discussion • Part 0 exercises • 1st copy the zipped file from the course site and then unzip (MAC may automatically unzip for you) • Open the Maple worksheets from the unzipped files as per the lab description instructions • Follow the directions in each work sheet - study the logic in each code edit region, run the code and review the output • Note that some regions produce an animation of the car’s movement
Quiz Week (9) Activities • Quiz 4 will be released on Friday (5/20) at 6 PM • Deadline: Wednesday (5/25) at 4:30 PM) • Makeup quiz – from Thursday (5/26) at 9 AM through Sunday (5/29) at 11:00 PM • 30% penalty • No Pre-lab quizlet • Be sure to visit the CLC for quiz assistance • Practice week for Proficiency Exam • Will be posting practice quizzes on Tuesday, 5/24 • Exam to be conducted during week of May 39 (final week of regular classes)