[Current] [News] [Glance] [Search] [Instructions] [Links] [Handouts] [Project] [Outlines] [Labs] [Homeworks] [Quizzes] [Exams] [Examples] [EIJ] [API]

Back to Discussion of Exam 1; Javadoc. On to Project Discussion.

**Held** Tuesday, September 26, 2000

**Summary**

Today we continue our discussion of exam 1 by visiting the latter parts of the exam.

**Notes**

- Exam 1 returned.
- Please don't discuss your grades with others; you should decide whether or not you're satisfied with your work on the basis of your work alone.
- I've asked some of you to come see me about questions on your exam. Please do so ASAP.
- You may also see me if I didn't include a note to that effect.
- Today, we're going to continue to discuss the exam, particularly part C, since there was some confusion.
- I'll get notes on Part C posted on the Web later this week.

- Are there questions on phase 2 of the project?
- I've decided that I will not be grading homework 1. At this point, I think you've gotten everything you would have out of that assignment.
- Homework 3 is almost ready.

**Overview**

- Proper citation
- A GCD algorithm in Java
- Orderings and more

- All works should have an author and a publisher.
- If you can't determine the author, use Anonymous or the publisher (whichever seems more appropriate).
- If you can't determine the publisher, incldue a note to that effect.

- Because Web pages change, you need to include
*additional*information.- Date visited.
- Date last modified.

- Recursive
__public____static____void__gcd(__int__x,__int__y) {**// The GCD of anything and 0 is that thing**__if__(x == 0)__return__y;**// The GCD of anything and 0 is that thing**__else____if__(y == 0)__return__x;**// If y evenly divides x then y is the GCD of x and y**__else____if__((x % y) == 0)__return__y;__else____return__gcd(y, x%y); } // gcd(int,int) - Iterative
__public____static____void__gcd(__int__x,__int__y) {__if__(x == 0)__return__y;__if__(y == 0)__return__x;__int__smaller = y;__int__larger = x;__int__tmp;__while__((tmp = larger % smaller) != 0) { larger = smaller; smaller = tmp; } // gcd(int,int) - Most of you got 8 and 9.
- Any questions?

- To be held as a discussion.
- One great observation from your exams
- ``Classes are like nouns, interfaces are like adjectives''

- If you have associated data or an implementation of a method, you need a class. Otherwise, an interface should suffice.

Wednesday, 23 August 2000

- Created as a blank outline.

Thursday, 24 August 2000

- Slight reorganization to page design.

Tuesday, 26 September 2000

- Filled in details.

Back to Discussion of Exam 1; Javadoc. On to Project Discussion.

[Current] [News] [Glance] [Search] [Instructions] [Links] [Handouts] [Project] [Outlines] [Labs] [Homeworks] [Quizzes] [Exams] [Examples] [EIJ] [API]

**Disclaimer** Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS152/2000F/Outlines/outline.19.html

Source text last modified Wed Oct 25 10:05:37 2000.

This page generated on Fri Oct 27 08:19:55 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at rebelsky@grinnell.edu