Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2010.

Similar presentations


Presentation on theme: "CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2010."— Presentation transcript:

1 CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2010

2 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!

3 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 31 (week 10) in class for your regularly scheduled lab session –Note – Monday labs will be held on 6/7 (last day of classes) as opposed to 5/31 (Memorial Day) Practice – week of May 24 (week 9) –All 4 quizzes taken throughout the term will be re-posted – 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!!

4 Lab 4 Overview Based on materials from Chapters 19 and 20 readings –Chapter 19 – Calculations that return true or false Use of boolean expressions with a programming API –Chapter 20 – Review of course goals and objectives

5 Lab 4 Overview Lab 4 outline – 1 part, 5 problems –Problem 1- Using the Car Simulator API to move a car forward 3 steps –Problem 2 – move car in a square –Problem 3 – bump car back and forth between 2 walls –Problem 4 – find gap in a wall and proceed to target –Problem 5 – find the nth gap in a wall and proceed to target

6 Lab 4 Maple Concepts Discussion 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

7 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

8 Lab 4 Maple Concepts: Discussion and Demo 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’

9 Lab 4 Maple Concepts: Discussion and Demo 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]

10 Lab 4 Maple Concepts: Discussion and Demo Car Simulator API – flow of lab –There are 5 tutorials and 5 problem work sheets associated with the lab –You must open and perform the tasks for each of these 10 work sheets in the order presented in the lab description –It is especially critical to 1 st open and run tutorial 1. It loads the Car Simulator API software that is needed throughout these exercised

11 Lab 4 Maple Concepts: Discussion and Demo Demo of Tutorial 1 execution Open the Maple worksheet (Lab4Tutorial1.mw) file from the course web site –1 st copy the zipped file from the course site and then unzip (MAC may automatically unzip for you) Explain 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

12 Quiz Week (9) Activities Quiz 4 will be released on Friday (5/21) at 6 PM –Deadline: Wednesday (5/26) at 4:30 PM) –Makeup quiz – from Thursday (5/27) at 9 AM through Sunday (5/30) at 11:30 PM 30% penalty No Pre-lab quizlet Be sure to visit the CLC for quiz assistance Practice week for Proficiency Exam –Will announce posting of practice quizzes shortly –Exam to be conducted during week of May 31 (week 10)


Download ppt "CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2010."

Similar presentations


Ads by Google