CSE 8B Today

How was it? A. No sweat! B. Not too bad C. So-so D. Not so good E. Totally awful

Please do not talk about the exam with anyone outside this room until after 2pm today. (It’s impossible to make a completely different exam for the other section)

PSA3: The last element in the array “Knock” “Knock” “Who’s”

“Knock” “Knock” “Knock”

What’s the problem with the last element when counting the number of each word? How can you solve it?

Layout Managers public static void main(String[] args) { JFrame myFrame = new JFrame("This is my window"); myFrame.setSize( 300, 400 ); FlowLayout flow = new FlowLayout( FlowLayout.LEFT ); GridLayout grid = new GridLayout( 5, 6 ); myFrame.setLayout( flow ); for ( int i = 0; i < 20; i++ ) { JLabel label = new JLabel("CSE 8B"); label.setFont( new Font("Serif", Font.ITALIC, i*3 )); myFrame.add( label ); } }

Sketch (more or less) what you think this GUI will look like

A note about style… private char rc( char x, int y ) { if (!Character.isLetter(x)) return x; y = y % 26; if ( y < 0 ) y += 26; char z = (char)(x + y); if ( Character.isUpperCase(x) && z > 'Z' ) z = (char)(z - 26); if ( Character.isLowerCase(x) && z > 'z' ) z = (char)(z - 26); return z; }

What does this method do?? A. I have no idea B. I think I might know C. I am (pretty) sure I know

A note about style… private char rotateChar( char c, int rotation ) { if ( !Character.isLetter( c ) ) return c; rotation = rotation % 26; if ( rotation < 0 ) rotation += 26;

char charToReturn = (char)(c + rotation); if ( Character.isUpperCase(c) && charToReturn > 'Z' ) charToReturn = (char)(charToReturn - 26);

if ( Character.isLowerCase(c) && charToReturn > 'z' ) charToReturn = (char)(charToReturn - 26); return charToReturn; }

What does this method do?? A. I have no idea B. I think I might know C. I am (pretty) sure I know

And don’t forget your header comment!!

A note about style…

private char rotateChar( char c, int rotation ) { if ( !Character.isLetter( c ) ) meaningful variable return c; and method names rotation = rotation % 26; if ( rotation < 0 ) rotation += 26;

Proper indentation, short lines, and plenty of char charToReturn = (char)(c + rotation); whitespace if ( Character.isUpperCase(c) && charToReturn > 'Z' ) charToReturn = (char)(charToReturn - 26);

if ( Character.isLowerCase(c) && charToReturn > 'z' ) charToReturn = (char)(charToReturn - 26); return charToReturn; }

Short, targeted method

Style guidelines on the CSE8B homepage. Starting NOW (with PSA3) style matters!

A note about style… private char rotateChar( char c, int rotation ) { if ( !Character.isLetter( c ) ) meaningful variable return c; and method names rotation = rotation % 26; if ( rotation < 0 ) rotation += 26;

Proper indentation, short lines, and plenty of char charToReturn = (char)(c + rotation); whitespace if ( Character.isUpperCase(c) && charToReturn > 'Z' ) charToReturn = (char)(charToReturn - 26);

if ( Character.isLowerCase(c) && charToReturn > 'z' ) charToReturn = (char)(charToReturn - 26); return charToReturn; }

Short, targeted method

Welcome to CSE 8B!

(It's impossible to make a completely different exam for the other section). How was it? ... Style guidelines on the CSE8B homepage. Starting NOW (with PSA3) ...

473KB Sizes 1 Downloads 162 Views

Recommend Documents

8b Brogno.PDF
As an additional exploratory analysis, we examined. whether use of a PPI in combination with either. clopidogrel or prasugrel was associated with an increased.

api 8b pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. api 8b pdf.

Welcome to Rediffmail: Inbox
Jun 2, 2014 - Admin Office: # 5, Sambayar Street,. Second Floor, George Town, ... delete the material from any computer. Welcome to Rediffmail: Inbox.

Welcome to Google Editions
Google Editions lets you harness the power of the cloud to sell ebooks more cheaply and easily than ever. ... [email protected] with questions. Welcome to.

Welcome to Google Editions
Google is a trademark of Google Inc. All other company and product names may be ... Google Editions lets you harness the power of the cloud to sell ebooks.

Welcome to Services
Only one application per student please. If more than one is ... Design guidelines. The doodle should be presented on a white, landscape sheet of A4 paper only. You can download the Google logo template from our website: www.google.com.my/ ... At Goo

Welcome to Rediffmail: Inbox
Jun 2, 2014 - Email : [email protected]. Regd Office: #37, Kasi ... If you received this in error, please contact the sender and delete the material ...

welcome to egypt -
Cultural Outings ( Khan el Khalily, Cairo Citadel ). Week 2 : Trips (Coptic ... Sana. Problem: Moshkela. I love you: Ana Bahebak. Numbers. 1 : Wahed. 2 : Etnen.

Welcome To The Family - Kidung.com
Verse : G. Am. D. G. Welcome to the family, we're glad that you have come. Am. Dsus4. D. To share your life with us, as we grow in love and. G. Am. D. G. May we always be to you, what God would have us be. Am. Dsus4. G. A family always there, to be s

Welcome to HelloFax
Send or receive a fax ...and every document is automatically stored to Google Drive. That's it! You've gone paperless. Instead of your documents becoming paper and. cluttering your desk, you can now keep then digitally. and securely stored in your Go

Welcome to Orchard Lake Elementary
[email protected]. @OLEPrincipal. Like us on Facebook. Orchard Lake. Elementary http://www.ole.isd194.k12.mn.us/. Health Office. Immunizations.

welcome my son welcome to the machine.pdf
welcome my son welcome to the machine.pdf. welcome my son welcome to the machine.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying welcome ...

Welcome to Orchard Lake Elementary
School Day 9:25-3:55. About 460 Students grades K- ... Music, PE and Media/Tech. Math (70 minutes/day) ... Available to Attendance Area. Residents. Students ...

Welcome to Solstice -
Solstice applications live in a particular parent directory. Please specify ... solstice. Session. Database name: sessions. Generate Config. Welcome to Solstice.

Welcome to Beacon Hill School
Admissions in an ESF school. Mainstream applications. ▫ Apply online via the ESF web site usually in the September of the year. BEFORE the child is due to ...

Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-II.pdf
Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-II.pdf. Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-II.pdf. Open. Extract. Open with. Sign In.

Scheme-SVIIT-CSE-DD_28B.Tech_2BM. Tech_29-CSE-V.pdf
Scheme-SVIIT-CSE-DD_28B.Tech_2BM. Tech_29-CSE-V.pdf. Scheme-SVIIT-CSE-DD_28B.Tech_2BM. Tech_29-CSE-V.pdf. Open. Extract. Open with. Sign In.

Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-VIII.pdf
Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-VIII.pdf. Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-VIII.pdf. Open. Extract. Open with. Sign In.

8b. Rek Bank NTB Yayasan.pdf
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. 8b. Rek Bank NTB Yayasan.pdf. 8b. Rek Bank NTB Yayasan.pdf.

Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-III.pdf
Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-III.pdf. Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-III.pdf. Open. Extract. Open with. Sign In.

Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-VII.pdf
Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-VII.pdf. Scheme-SVIIT-CSE-DD_28B.Tech_2BMBA_29-CSE-VII.pdf. Open. Extract. Open with. Sign In.

Welcome to BNP PARIBAS
You will be mailed your confidential codes for www.bnpparibas.net (customer number and password under separate cover); keep them in a safe place! Your customer number is different from your BNP Paribas bank account number (this last one will begin by

Welcome to Google Editions Books
everyone already has: their own phone. Get Unbound. To sign up, log into your Partner ... [email protected] with questions. Welcome to. Google Editions.