DOC PREVIEW
Berkeley COMPSCI 61B - Lecture Notes

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

01/22/1402:46:13 101 CS 61B: Lecture 1 Wednesday, January 22, 2014 Prof. Jonathan Shewchuk, [email protected] Email to prof & all TAs at once (preferred): [email protected]’s reading: Sierra & Bates, pp. 1-9, 18-19, 84.Handout: Course Overview (also available from CS 61B Web page)Also, read the CS 61B Web page as soon as possible!>>> http://www.cs.berkeley.edu/˜jrs/61b <<<YOU are responsible for keeping up with readings & assignments. Few reminders.The Piazza board is required reading: piazza.com/berkeley/spring2014/cs61bLabs----Labs (in 271, 273, 275, 330 Soda) start Thursday. Discussion sections startMonday. You must attend your scheduled lab (as assigned by Telebears) to 1) get an account (needed for Lab 1 and Homework 1), and 2) login to turn on your ability to turn in homework (takes up to 24 hours).You may only attend the lab in which you are officially enrolled. If you arenot enrolled in a lab (on the waiting list or in concurrent enrollment), youmust attend a lab that has space. (Show up and ask the TA if there’s room foryou.)You will not be enrolled in the course until you are enrolled in a lab. Ifyou’re on the waiting list and the lab you want is full, you can change to onethat isn’t, or you can stay on the waitlist and hope somebody drops.If you’re not yet enrolled in a lab, just keep going to them until you find onethat has room for you (that week). Once you get enrolled in a lab, though,please always attend the one you’re enrolled in.Prerequisites-------------Ideally, you have taken CS 61A or E 7, or at least you’re taking one of themthis semester. If not, you might get away with it, but if you have notmastered recursion, expect to have a very hard time in this class. If you’vetaken a data structures course before, you might be able to skip CS 61B. Seethe Course Overview and Brian Harvey (781 Soda) for details.Textbooks---------Kathy Sierra and Bert Bates, Head First Java, Second Edition, O’Reilly, 2005. ISBN # 0-596-00920-8. (The first edition is just as good.)Michael T. Goodrich and Roberto Tamassia, Data Structures and Algorithms in Java, Fifth Edition, John Wiley & Sons, 2010. ISBN # 0-470-38326-7. (The first/third/fourth/sixth edition is just as good, but not the second.)We will use Sierra/Bates for the first month. Lay your hands on a copy as soonas possible.Buy the CS 61B class reader at Vick Copy, 1879 Euclid. The bulk of the readeris old CS 61B exams, which will not be provided online. The front of thereader is stuff you’ll want to have handy when you’re in lab, hacking.Grading------- 10 pts Labs There are 200 points total you can earn in this course, 20 pts Homeworks broken down at left. 185+ points is an A+, 175-184 is 70 pts Projects an A, and so on down to D- (85-94). There is NO CURVE. 25 pts Midterm I Late homeworks and labs will NOT be accepted, period. 25 pts Midterm II Late projects are penalized 1% of your score for every 50 pts Final Exam two hours by which you miss the deadline. ------- 200 ptsThere will be three projects, worth 20, 30, and 20 points respectively. Youwill do the first project individually, and the last two as part of a group oftwo or three students. You may not work alone on the last two projects.All homeworks and projects will be turned in electronically.Cheating--------...will be reported to the Office of Student Conduct.1) "No Code Rule": Never have a copy of someone else’s program in your possession and never give your program to someone else.2) Discussing an assignment without sharing any code is generally okay. Helping someone to interpret a compiler error message is an example of permissible collaboration. However, if you get a significant idea from someone, acknowledge them in your assignment.3) These rules apply to homeworks and projects. No discussion whatsoever in exams, of course.4) In group projects, you share code freely within your team, but not between teams.Goals of CS 61B---------------1) Learning efficient data structures and algorithms that use them.2) Designing and writing large programs.3) Understanding and designing data abstraction and interfaces.4) Learning Java.THE LANGUAGE OF OBJECT-ORIENTED PROGRAMMING===========================================Object: An object is a repository of data. For example, if MyList is a ShoppingList object, MyList might record your shopping list.Class: A class is a type of object. Many objects of the same class might exist; for instance, MyList and YourList may both be ShoppingList objects.Method: A procedure or function that operates on an object or a class. A method is associated with a particular class. For instance, addItem might be a method that adds an item to any ShoppingList object. Sometimes a method is associated with a family of classes. For instance, addItem might operate on any List, of which a ShoppingList is just one type.Inheritance: A class may inherit properties from a more general class. For example, the ShoppingList class inherits from the List class the property of storing a sequence of items.Polymorphism: The ability to have one method call work on several different classes of objects, even if those classes need different implementations of the method call. For example, one line of code might be able to call the "addItem" method on _every_ kind of List, even though adding an item to a ShoppingList is completely different from adding an item to a ShoppingCart.Object-Oriented: Each object knows its own class and which methods manipulate objects in that class. Each ShoppingList and each ShoppingCart knows which implementation of addItem applies to it.In this list, the one thing that truly distinguishes object-oriented languagesfrom procedural languages (C, Fortran, Basic, Pascal) is polymorphism.01/22/1402:46:13 201Java----Java allows you to store data in variables, but first you must _declare_ themand specify their _type_. Python: x = 1 Scheme: (let ((x 1)) ) Java: int x; x = 1;This Java declaration does two things. (1) It allocates a chunk of memory big enough to store an integer, which Java calls type "int". --- (2) It names the variable (chunk of memory) "x". x |1|


View Full Document

Berkeley COMPSCI 61B - Lecture Notes

Documents in this Course
Lab

Lab

4 pages

Matrix

Matrix

3 pages

Numbers

Numbers

14 pages

Lectures

Lectures

12 pages

Project 1

Project 1

24 pages

Exam

Exam

8 pages

Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?