+ All Categories
Home > Documents > CSE332: Data Abstractions Lecture 25: There is no lecture 25

CSE332: Data Abstractions Lecture 25: There is no lecture 25

Date post: 25-Feb-2016
Category:
Upload: faith
View: 55 times
Download: 2 times
Share this document with a friend
Description:
CSE332: Data Abstractions Lecture 25: There is no lecture 25. Dan Grossman Spring 2010. Huh?. We need most or all of the class to finish up concurrency, using the materials in lecture 24 - PowerPoint PPT Presentation
Popular Tags:
7
CSE332: Data Abstractions Lecture 25: There is no lecture 25 Dan Grossman Spring 2010
Transcript
Page 1: CSE332: Data Abstractions Lecture 25: There is no lecture 25

CSE332: Data Abstractions

Lecture 25: There is no lecture 25

Dan GrossmanSpring 2010

Page 2: CSE332: Data Abstractions Lecture 25: There is no lecture 25

2CSE332: Data Abstractions

Huh?

• We need most or all of the class to finish up concurrency, using the materials in lecture 24

• We spent a few minutes at the beginning of class discussing a small change to project 3, using the next few slides

Spring 2010

Page 3: CSE332: Data Abstractions Lecture 25: There is no lecture 25

3CSE332: Data Abstractions

GUI

Spring 2010

• Optional• Fun• Useful for testing against intuition• Easy to use

• Not good for testing timing• Not what we’ll grade against

Page 4: CSE332: Data Abstractions Lecture 25: There is no lecture 25

4CSE332: Data Abstractions

Small change to code

• To get the GUI to:– Be accurate– Give the same answers as your text version

• We had to make a small change to the code provided to you– No change to your code or what you do– But does change the answers you will get!

• And slightly harder to compare against answers manually

Spring 2010

Page 5: CSE332: Data Abstractions Lecture 25: There is no lecture 25

5CSE332: Data Abstractions

Projections

News update: The world is a globe and maps are flat

Spring 2010

To get a reasonable projection, we can basically change the latitude• The map in our GUI uses a Mercator Projection• So we’re changing the CensusGroup data to use the same

projection…

Page 6: CSE332: Data Abstractions Lecture 25: There is no lecture 25

6CSE332: Data Abstractions

Changed code

class CensusGroup { int population; float latitude; float realLatitude; // ignore but may help test float longitude; CensusGroup(int pop, float lat, float lon) { population = pop; latitude = mercatorConversion(lat); realLatitude = lat; longitude = lon; } float mercatorConversion(float lat){

// math here }

}

Spring 2010

Page 7: CSE332: Data Abstractions Lecture 25: There is no lecture 25

7CSE332: Data Abstractions

Bottom line

• You can swap in the new CensusGroup any time before next Tuesday

• Once you do, the latitude in the input file is not the latitude that will be used in your calculations– We did this for you– But will affect the result slightly: more so for data farther North– That’s all you have to understand

• Make sense?

Spring 2010


Recommended