Barnes Art Museum, Philadelphia

Slides:



Advertisements
Similar presentations
Cutting Created by Inna Shapiro ©2008 Problem 1 The figure on the right is composed of three equal squares. Can you cut it into four equal parts?
Advertisements

1 Value vs. reference semantics. Recall: Value semantics value semantics: Behavior where variables are copied when assigned to each other or passed as.
Transparency 4 Click the mouse button or press the Space Bar to display the answers.
7.3 Volumes by Cylindrical Shells
Physics 218, Lecture XVII1 Physics 218 Lecture 17 Dr. David Toback.
CS 106 Introduction to Computer Science I 10 / 16 / 2006 Instructor: Michael Eckmann.
Similar Shapes and Scale Drawings
Pastel Fruit Paintings
Dr. Serhat Eren DESCRIPTIVE STATISTICS FOR GROUPED DATA If there were 30 observations of weekly sales then you had all 30 numbers available to you.
Java Classes Using Java Classes Introduction to UML.
Bell Ringer x – 1.8 = x = x =  Solve. 1. x + 3 = x = 4 x =
BACK Time to Get Personal… We are heading into the Elements and Principles of Design part of our Housing class. We will make this part personal by focusing.
Plenary 4. I spin a spinner. I am twice as likely to get red as blue. I am half as likely to get blue as green. What could the probability of green be?
Elementary C++. Procedural Programming Split your problem into simpler parts then solve each part separately Recognize common parts and solve them only.
By: Zach Thompson.  A straight, linear, continuous mark.
Java – An Object Oriented Language CS 307 Lecture Notes Lecture Weeks 5-6 Khalid Siddiqui.
Classes and Objects Digging a little deeper. Rectangles We want a class to represent a rectangle which located somewhere in XY plane. The question is,
CS 1114: Finding things Prof. Graeme Bailey (notes modified from Noah Snavely, Spring 2009)
1 CSC103: Introduction to Computer and Programming Lecture No 17.
Bell work Wednesday 12/9/15 1)Which choice is equivalent to the expression 2(3x + y)? a)5x + y b)3x + 2y c)6x + y d)6x + 2y e)8xy 2)Which can be represented.
Chapter 8 Arrays and the ArrayList Class Arrays of Objects.
Advanced Painting and Drawing
Chapter 7 Memory Management
Chapter 9: Sorting and Searching Arrays
char first[10]="monkey"; char second[10]="fish"; char* keep;
Values vs. References Lecture 13.
Java Arrays and ArrayLists COMP T1 #5
Computer Organization and Design Pointers, Arrays and Strings in C
Weebly Elements, Continued
CS1020 – Data Structures And Algorithms 1 AY Semester 2
CSC 253 Lecture 9.
THE AREA OF A SHAPE.
What makes a GREAT photograph?
Algebra 7. Solving Quadratic Equations
Hashing Exercises.
Revise Re-back, again vis-look To look again!
Quicksort 1.
Perimeter.
Shape Elements of Art.
Algorithm design and Analysis
Bases and Representations, Memory, Pointers, Arrays, For-Loops
Using Newton’s Second Law
Unit-2 Divide and Conquer
Organizing Memory in Java
Programming paradigms
Arrays .
Parameter Passing in Java
Cs212: Data Structures Computer Science Department Lecture 2: Arrays.
Topics discussed in this section:
CS2011 Introduction to Programming I Arrays (I)
EOG Strategies! Take your time and do your best… I know that each one of you can achieve success! 
I can find the area of a rectangle.
Let's Tell Tall Tales! Tall tales are made-up stories that try to explain things that have happened. They usually make things sound bigger and more exciting.
CS 200 Primitives and Expressions
Surface Area of a Cylinder
Why did the programmer quit his job?
Lesson – Teacher Notes Standard: 7.G.A.1
Quicksort.
What is the net force on an object at rest?
Quicksort.
Multipage Sites.
Notebooks out Cellphones & Laptops away
Assignment due Write a program the generates a random integer expression, presents the two operands and the result to the user, and asks the user to tell.
CSC1401 Manipulating Pictures 2
Goal: The learner will find area and perimeter.
ECE 352 Digital System Fundamentals
Operating Systems: Internals and Design Principles, 6/E
Searching and Sorting Hint at Asymptotic Complexity
Quicksort.
Alignment and Proximity
Presentation transcript:

Barnes Art Museum, Philadelphia Dr. Albert C. Barnes built an art gallery in his house. A museum guard there actually said it was his Bat Cave, and he would go there at night and rearrange the pictures. (Interesting African-American social history story; The Art of the Steal 2009 movie about the continuing controversy) Unusual: Each wall had many paintings, closer together than in typical museums. (based on Barnes' principles of art history education.)

What Proj 06 involves Moving values around within a 3 element array, without losing any. Swapping 2 values between a given array element (given how?) WITH a simple variable. (don't lose either value) Layout problem solving: Where to copy the pictures so you can see them (easy) Where to copy the pictures so they are centered. Making it a 1-week project: limit to 4 pictures, with known maximum sizes. READ THE ASSIGNMENT!

iClicker: Each array element is a variable iClicker: Each array element is a variable. How is any one array element given—in Java? By the array name only. By a memory address. By the array reference AND and an int index value for the subscript. By an int index value only: The array reference in NOT NEEDED. By the array reference OR the index: You can choose which one to use, but only one is needed.

Project 6 data structure diagram favorite arrayPicts s are Java references, locations, (Java) “addresses” of 5 objects 3 length

3 s are Java references, locations, (Java) “addresses” of 5 objects favorite arrayPicts s are Java references, locations, (Java) “addresses” of 5 objects 3 length Java hides internal data for addressing the array in memory. You can read, not change the length field.

3 swap the ref. values: Now picture 3 is first, 2 middle! favorite arrayPicts swap the ref. values: Now picture 3 is first, 2 middle! s are Java references, locations, (Java) “addresses” of 5 objects 3 length

1492 1492 1984 1984 2001 2001 arrayNum Try to program swapping arrayNum[0] with arrayNum[1] First try: arrayNum[0] = arrayNum[1]; BAD!!! it loses data 1492 3 1984 1984 2001 length

THE CLUE:FIGURE YOURSELF HOW TO USE THIS CLUE! 1492 1984 1984 2001 2001 arrayNum Try to program swapping arrayNum[0] with arrayNum[1] int tempSaver;//use a temp! tempSaver = arrayNum[0]; tempSaver 1492 3 YOU: Figure out the 2 lines of code to achieve the goal below. length 1984 1492 2001

Problem: Make the computer calculate where to copy the pictures so the spacings are equal.

When somebody calls myHouseRef.showArtCollection( ) Each time the pictures are rearranged, the distances needed to keep them centered must be recomputed. When? When somebody calls myHouseRef.showArtCollection( ) You will write code to copy 4 Pictures into the ArtWall. Put that code in (the body of) the showArtCollection( ) House method)

Getting Started with Project 6: DON'T TRY FOR equal spacing at first! You'll get 90% if you just help Dr. Barnes re-arrange his favorite and 3 others with swaps and rotates, and see them; even if they are not centered.

Pre-calculate these distances: so any of the 4 test pictures can fit in any of the sub-rectangles. corner coordinates too.

PUT AWAY THAT COMPUTER! WRITE NO CODE! HOW TO Be Smart: PUT AWAY THAT COMPUTER! WRITE NO CODE! Figure out what needs figuring ON PAPER, so you understand EXACTLY what you are figuring. But first, get the facts. For our Proj06, read and make notes of the facts from the project assignment (on the computer). Ask Prof. for a free paper copy if that's your style.

Facts needed: How many pictures, where? Max height of one picture. Max width of one picture. (We show how to use these facts to solve the 90% problem on paper, and will scan it.)

Solve the centering problem (writing will be scanned and posted after the lecture)

Equal Equal Equal Equal