Docsity

CS 123 Eng. Computation Lab: Lab 4 - APIs & Car Simulator API - Prof. Bruce W. Char, Lab Reports of Computer Science

Toggle sidebar
bg1
CS 123 Engineering Computation Lab
Lab 4
Dan De Sousa and Bruce Char
Department of Computer Science
Drexel University
May 2009
©By the author. All rights reserved. Permission is given to CS123 Spring
2009 staff and students to use and reproduce these not es for their own use.
Your class instructor and TA
• Instructor for this section:
Office:
Email:
Telephone:
• Your TAs are:
Announcements
• You may show us your completed Lab 3, Part 2 /
extra credit for points.
• This is the last lab of the term, Proficiency exam
next time we meet.
• No mercy quiz this coming quiz cycle.
• Next set of online chats on 5/27, 5/28. Format
TBD, will be communicated shortly.
Student Evaluations
• W e appreciate your honest feedback in making the course
better.
• Site will become available on 5/25 through 6/19.
• aefis.coe.drexel.edu
• 2% added to final grade for submissions received by midnight
on 6/9.
• Final grade of 89% will become a 91%.
• Student services will provide a list of responders.
• All responses will remain anonymous.
Lecture Overview
• Application Programming Interfaces (APIs)
• Car Simulator
• Proficiency Exam
Application Programming
Interfaces
• Application Programming Interfaces (APIs)
– An industry standard term for a package of
procedures that simplifies the process of
writing code for a particular purpose.
– Maple provides an API for many common
mathematical and computation tasks.
• Plotting, calculus, trigonometric functions.
– Imagine if you had to write your own plot
command!
pf3
pf4
pf5

Partial preview of the text

Download CS 123 Eng. Computation Lab: Lab 4 - APIs & Car Simulator API - Prof. Bruce W. Char and more Lab Reports Computer Science in PDF only on Docsity!

CS 123 Engineering Computation Lab

Lab 4

Dan De Sousa and Bruce Char Department of Computer Science Drexel University May 2009 ©By the author. All rights reserved. Permission is given to CS123 Spring 2009 staff and students to use and reproduce these notes for their own use.

Your class instructor and TA

  • Instructor for this section:

Office:

Email:

Telephone:

  • Your TAs are:

Announcements

  • You may show us your completed Lab 3, Part 2 / extra credit for points.
  • This is the last lab of the term, Proficiency exam next time we meet.
  • No mercy quiz this coming quiz cycle.
  • Next set of online chats on 5/27, 5/28. Format TBD, will be communicated shortly.

Student Evaluations

  • We appreciate your honest feedback in making the course better.
  • Site will become available on 5/25 through 6/19.
    • aefis.coe.drexel.edu
  • 2% added to final grade for submissions received by midnight on 6/9. - Final grade of 89% will become a 91%. - Student services will provide a list of responders. - All responses will remain anonymous.

Lecture Overview

  • Application Programming Interfaces (APIs)
    • Car Simulator
  • Proficiency Exam

Application Programming

Interfaces

  • Application Programming Interfaces (APIs)
    • An industry standard term for a package of procedures that simplifies the process of writing code for a particular purpose.
    • Maple provides an API for many common mathematical and computation tasks. - Plotting, calculus, trigonometric functions.
    • Imagine if you had to write your own plot command!

Application Programming

Interfaces

  • Why they are important.
    • Entire courses on software design and code reusability.
    • Bottom line: they give programmers a way of easily writing code for a particular platform.
    • Encourages fast development, saves a lot of work, and make a platform accessible.

Application Programming

Interfaces

  • Some Famous APIs
    • DirectX, OpenGL for gaming / 3d graphics.
    • Drupal, MediaWiki for web-based wikis.
    • Facebook API
    • Google Maps API
    • iPhone API
    • Windows API

Car Simulator API

  • Car Simulator API
    • An API written by the course staff that allows you to animate and simulate car movement.
    • The simulator ignores forces of friction, and focuses on the logic of controlling a car. - Important engineering problem - DARPA $2 million prize.

Car Simulator API

  • Overview
    • The tutorial worksheets will give you a more complete understanding of the API and its functionality but here are a few of the common features.
    • We’ll need to use the functions presented here, along with Maple built-in features (for, while loops and if statements) to control the car.
    • This overview covers the major parts of using the API by explaining the first tutorial.

Car Simulator API

  • move(x)
    • The move() function moves the car forward x squares. So move(1) moves the car forward by one square.
  • turn(d)
    • The turn() function turns the car d radians to the left (ccw). So turn(Pi/2) makes the car turn directly to the left.

Car Simulator API

  • getCURRENTLOCATION()
    • This function gets the current state of the car, which happens to be a list with its coordinate position, direction and car state.
  • isTouching(d, ‘stateOfCar’)
    • Returns true if the car is touching some object in the direction d radians to the left.

Proficiency Exam Information

Spring 2009

Proficiency Exam

  • In class exam, during regular class hour
  • The exam counts for approximately 36% of

your final grade

  • The exam will be in two Maple TA quizzes. One quiz will have How did I do? Turned on. One part will have it turned off. The part where it is turned off will be the multiple choice or similar questions where getting feedback would make the question useless from an evaluation viewpoint.

Proficiency Exam

  • Questions for the exam will be drawn from past quizzes, and from a small set of new questions.
  • This means that everyone will know what the questions could be, ahead of time. They will also be able to prepare a plan for answering them, ahead of time.

Practicing

  • All questions will be posted on Maple TA in practice form starting Wednesday May 27 and running through the exam period.
  • Lab Solutions will be available on Blackboard Vista at that time.
  • For exam security, we will turn off access to the practice quizzes while exams are being run in the labs.
  • Access to Blackboard Vista will be turned off during the exam, as well.

Exam Security

  • During the exam •You must use the laptop (be it Mac or Windows) provided. You may not use your own computer. •You may use •Maple •Maple TA •Browse cs.drexel.edu/complab/cs123/spring2009 , which has copies of the lab directions and lecture notes. •No notes or other aids •Blackboard access to the course turned off during the exam

Exam security

  • Computer usage will be monitored, both by visual checks by course staff and by software monitoring built into the computers you use.
  • Unlike the labs, we will be in full “Big Brother” mode during the exam: We will be able to watch what you do, log every key stroke and mouse click, and take movies and screenshots of what you are doing.

A reminder about cheating

•Unauthorized access to information for the exam will be a violation of the Academic Honesty policy. So will accessing unauthorized information non- electronically or any other form of cheating. •The minimum penalty will be a reduction in the final grade for the course. •We reserve the right to give you a course grade of F with no opportunity to withdraw, or to begin proceedings to expel you from the university. •If you have concerns about your grade for the course, talk to your instructor.

Proficiency Exam Policy

  • If you have a conflict or are unable to

attend the scheduled exam due to a

reasonable medical or personal excuse,

you should contact your section instructor

and arrange an alternative time as soon as

possible.

  • If you miss your exam and delay

contacting your instructor until after the

proficiency exam week has passed, our

policy will be to give you a zero for the

exam.

What you should do now

  • Connect to class web page:

www.cs.drexel.edu/complab

  • Start up Maple 12
  • Read Lab 4 directions.
  • Do the work with your partner(s). Both

should try to do the work, but the grader

will need to look at only one answer to

give you credit for doing the problem.

Finishing up – save files

  • Make sure your name/user id/section number/ date,time/instructor name are on the verification sheet.
  • Get the verification sheet signed and handed in.
  • Save worksheet on desktop if you haven’t done so already. You can call the file “MyLab4CS123”. This will create a file called MyLab4CS123.mw.
  • Submit a copy to Blackboard site.
  • Email a copy to yourself and/or your lab partners as an attachment so you can look at what you did for review purposes later.
  • .mw file should open correctly on any Maple 12 (Mac, Windows, Linux) – file format is portable across system types.

Next week – Take quiz 4!

  • Take the fourth quiz!
    • NO mercy quiz this week!
  • Go to CLC if you need face-to-face help!
  • Don’t wait until the last minute to start the

work!

  • Prepare for the proficiency exam!