New version page

Berkeley COMPSCI 61B - Project 1

Documents in this Course
Lab

Lab

4 pages

Matrix

Matrix

3 pages

Numbers

Numbers

14 pages

Lectures

Lectures

12 pages

Exam

Exam

8 pages

Load more
Upgrade to remove ads

This preview shows page 1-2-23-24 out of 24 pages.

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

Upgrade to remove ads
Unformatted text preview:

DeadlinesOverviewThe Picture classThe Pixel class and the Color classDownloading and Running the Framework CodeDescription of Included FilesTasksLevel 1PhotonegativeChroma KeyLevel 2RotateFlipEdge DetectionLevel 3ASCII ArtBlurPaint BucketREADME and DocumentationTestingStyle GuideGrading and Submission DetailsShowing It OffFrequently Asked QuestionsAcknowledgmentsPROJECT: PiCTURETMProject 1Computer Science 61BL, Summer 2009Department of Electrical Engineering and Computer SciencesUniversity of California, BerkeleyCOLLEEN LEWIS, JONATHAN KOTKER, KAUSHIK IYER, GEORGE WANG, DAVID ZENGContents1 Deadlines 22 Overview 22.1 The Picture class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2 The Pixel class and the Color class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Downloading and Running the Framework Code 64 Description of Included Files 85 Tasks 105.1 Level 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105.1.1 Photonegative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105.1.2 Chroma Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105.2 Level 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.2.1 Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.2.2 Flip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.2.3 Edge Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.3 Level 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.3.1 ASCII Art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.3.2 Blur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.3.3 Paint Bucket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 README and Documentation 157 Testing 168 Style Guide 169 Grading and Submission Details 1710 Showing It Off 1811 Frequently Asked Questions 1812 Acknowledgments 2211 DeadlinesThis project is time-consuming; please start early. This project should also be done on your own. Your finalsolution to this project is due Monday, July 13 2009 at 10PM. We suggest that you finish the majority ofthe project before your first midterm on Tuesday, July 7 2009, in order to prevent a last-minute rush; also,project 2 will be released on Thursday, July 9 2009, before project 1 is due. To further ensure that you arealong the path to finishing your project on time, we will be instituting one checkpoint, due Thursday, July2 2009; the instructions for this checkpoint are given in the document appended to this specification.2 OverviewWe are just one week in, but we now have enough knowledge to complete our very own (albeit simpler)version of commercial picture manipulation software! We will call it PROJECT: PiCTURETM, an acronymfor Picture Construction and Transformation through the Utilization of Reliable Entities, and all of yourfirst project will be concerned with creating, debugging, and testing these ‘reliable entities’1. As a result ofthis project, we hope that you will feel considerably more comfortable with arrays, loops, invariants, andtesting, all while finishing something really cool that you can share!As part of this project, we will be mainly dealing with three classes: The Picture class encapsulates infor-mation associated with a picture, the Pixel class encapsulates the information associated with each elementof that picture (also called a pixel), and the Color class, which, as the name implies, stores information re-garding a particular color. All of these classes overload the toString and equals methods.2.1 The Picture classContinuing with the object-oriented programming paradigm that this class is based on, we represent apicture with the Picture class2. The constructors available for the Picture class are:1. Picture(): This no-argument constructor will create a default white picture of size 200 pixels by100 pixels.2. Picture(String fileName): This constructor takes the file name of the picture to be opened, andcreates a corresponding new Picture object.3. Picture(int width, int height): This constructor creates a new white picture with the widthand height specified.4. Picture(Picture pictureToCopy): This constructor creates a new Picture object that is acopy of the Picture object provided.We also provide methods that you will find useful for manipulating the picture associated with a Pictureobject:1. int getWidth(): This method returns the width of the picture associated with the Picture object.2. int getHeight(): This method returns the height of the picture associated with the Pictureobject.3. Pixel getPixel(x, y): This method returns a Pixel object associated with the pixel located atposition (x, y) in the picture. More information about the Pixel class is presented in section 2.2.1The ‘entities’ refer to the methods that you are going to code, and they are ‘reliable’ because you are going to test them thoroughly.2This class inherits most of its methods from the SimplePicture class, which also maintains methods and instance variablesassociated with the picture. However, we will only concern …


View Full Document
Download Project 1
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 Project 1 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 Project 1 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?