CS46A Introduction to Programming—Online Section
Spring 2014 | Cay S. Horstmann | Department of Computer Science | San Jose State University
Week 14
Videos: Introduction Solutions to Homework 13a | 13b | 13c
Work through Udacity videos Lesson 9 up to "Implementing Comparable".
Read Sections 10.1.1, 10.1.2, 10.2., 10.3 of the textbook. Note that the Udacity videos talk about interfaces first, so you skip to chapter 10 of the textbook.
Take the quizzes on Monday and Thursday.
Turn in the draft of Homework 14 on Wednesday and the final version on Sunday.
Work through Lab 13 and join a Webex session if you have a question and when you are ready show off your work.
Week 13 homework solutions are here.
Homework
BlueJ projects are here. Problem descriptions are in the code-check links.
- Part A. code-check for draft | final
- Part B. code-check for draft | final
You may want to add the following method to your Data
class:
/**
Turns an array list into an array.
@param items an array list of measurable items.
@return an array with the same items
*/
public static Measurable[] toArray(ArrayList<Measurable> items)
{
Measurable[] result = new Measurable[items.size()];
for (int i = 0; i < items.size(); i++) { result[i] = items.get(i); }
return result;
}
- Part C. code-check for draft | final