Algorithms and OOD (CSC 207 2014F) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [Learning Outcomes] [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Readings]
Reference: [Student-Curated Resources] [Java 8 API] [Java 8 Tutorials] [Code Conventions]
Related Courses: [CSC 152 2006S (Rebelsky)] [CSC 207 2014S (Rebelsky)] [CSC 207 2014F (Walker)] [CSC 207 2011S (Weinman)]
Misc: [Submit Questions] - [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)] [Issue Tracker (Textbook)]
Overview
UshahidiTimestamp
Fields: day, week, year, hour
Constructor: UshahiTimestamp(day, week, year, hour)
Methods
toString
* Look at Java reference
* Shallow or deep analysis of Web site?
* Focus on the main objects you think you'll need
for representing the underlying data.
* Finding methods: Eclipse and the API pages should be useful
* For Part A's testing, can we just be thorough with individual tests,
rather than writing a for loop?
* Yes.
* Often, you want both.
* Individual tests for corner cases.
* Loops to ensure you check a broad range of values.
* How should we approach the "average doesn't work on all values"
issue?
* There's an implicit hint in part A.
* Think about special cases from your own work in C.
* The bug was found by someone at Google when they were working
with the built-in binary search in Java.
* Do we have to fix the code for real, or can we just specify
preconditions?
* You should fix the code so that it works for any pair
of integers.
* Do you want us to document classes and methods?
* Simple "this is what it does" documentation is nice, preferably
using Javadoc.
* Daily lab writeup: http://bit.ly/207writeup * Reading for Tuesday: * Arrays in Java
How do I declare a field? Type and name
int age;
Fields might also have a modifier
static - "It's own thing". "You can use it without creating
an object"final - constantHow do I declare a constructor?
NAME(PARAMETERS)
{
OPERATIONS
}
Notes