M/F 2:30-3:20 |
CS 1130: Transition to OO Programming Spring 2016 |
Main
About: Overview Announcements Staff Consultants Calendar Materials: Texts DrJava Terminology Lectures: In-Class Web-Based VideoNote Assessment: Grading Assignments Labs Resources: CMS Piazza (link) Piazza (about) Java API Style Guide Academic Integrity |
Diagraming Objects and FramesDue in class or to CMS on Friday, February 13th. This is a simple written assignment where you are going to diagram a few objects. It should not take more a few minutes do to this assignment. So even if you are busy revising assignment 1, you should be able to do this assignment as well. "Diagraming" is what we do in the lecture notes where we draw the folders to represent the objects and associated variables. It also includes the methods frames that we talked about in class. These are a way of giving us a visual repreentation of what is going on in the computer when it runs Java. The purpose of this assignment is to see if you can keep track of what goes where in an object. Before You Get StartedCollaboration PolicyUnlike the previous assignment, we would like you to do this assignment on your own. The purpose of this assignment is to assess that you understand the material well enough to carry it out on the exam at the end of the course. Academic IntegrityFor this assignment, you must work on your own. Do not share your assignment with others; do not obtain or look at a copy of an earlier solution or a version from another sturent. Because purpose of this assignment is to assess your understanding before the exam, it only hurts you if you cheat on this assignment. Grading PolicyAs with the previous assignment, you are to resubmit this assignment until you pass. However, for this assignment, passing is considered 85%. You do not have to get a perfect to pass. We will not outline our grading scheme in this assignment. If you do not pass you will be told what to revise. Hopefully, everything should be correct within one revision. Getting HelpIf you do not know where to start or if you are completely lost, please see someone immediately. This can be the course instructor, a TA, or a consultant. Do not wait until the last minute. A little in-person help can do wonders. See the staff page for more information. Diagramming ConventionsMost of our diagramming conventions follow the lecture notes. However, in some places the lecture notes cut corners in order to be able to fit all the information on the slide. We do not want you to do that here. Therefore, we make several explicit conventions. Diagramming VariablesA diagram for a variable should include the variable name, a box for the value, and a type. For example, here is a diagram for the variable x:
We sometimes dropped the type in lecture, but you should not do that for this assignment. Diagramming ObjectsWhen you diagram a folder (object), you should obey the following conventions:
For example, a folder for a class
Diagramming ClassesWhen you diagram a file drawer (class), you should obey the following conventions:
The following shows the basic structure of a class with all of the details removed
Diagramming a Frame for a Method CallFrames should obey the following conventions:
See the lecture notes for more details on how to create a frame for a method call. In this exercise, we will not worry about putting local variables in a frame. Furthermore, the instruction counter will start at 1. Assignment InstructionsThe Class
|