1
h01
CS56 W20
Name:
(as it would appear on official course roster)
Umail address: @umail.ucsb.edu section
5pm, 6pm, 7pm
Optional: name you wish to be called
if different from name above.
Optional: name of "homework buddy"
(leaving this blank signifies "I worked alone"

h01: HFJ Ch 1,2; JN7: Ch1; Rational-ex01

ready? assigned MW due MW assigned TR due TR points
true Wed 01/08 12:00AM Mon 01/13 12:30PM Thu 01/09 12:00AM Tue 01/14 11:00AM

Printable PDF  You may collaborate on this homework with AT MOST one person, an optional "homework buddy".

MAY ONLY BE TURNED IN IN THE LECTURE/LAB LISTED ABOVE AS THE DUE DATE,
OR IF APPLICABLE, SUBMITTED ON GRADESCOPE. There is NO MAKEUP for missed assignments;
in place of that, we drop the three lowest scores (if you have zeros, those are the three lowest scores.)


Throughout the quarter:

READING ASSIGNMENT

Then answer the questions on both sides of this sheet, and bring your competed sheet to class on the due date listed above.

If you don’t have your books yet, buy them! But in the meantime, you can try the UCSB library course reserves, or look online (from on-campus network addresses, or using the UCSB VPN https://www.library.ucsb.edu/services/using-vpn. Both textbooks are available online on a limited basis to UC students/faculty/staff with UC login credentials.

Be warned though, there are a limited number of seats available for those online books, and they tend to be “used up” right before exams. You are encouraged to get your own copy of the books if you want to be sure to have access. They are relatively inexpensive compared to most textbooks.

  1. (10 pts) Please fill in the information at the top of this homework sheet, including your name and umail address. Put the time your discussion section starts (5pm, 6pm, 7pm) in the space indicated (the one you are registered for—even if you usually attend a different one.) If the other two items apply, please fill them in as well. Please do this every single time you submit homework for this class.
  2. According to JN7 Ch1, among versions 1 through 11 of Java, one specific version introduced the most radical changes.
    1. (10 pts) Which one?
    2. (10 pts) List two of those changes.
  3. (10 pts) According to HFJ Chapter two, anytime you need to test a class in Java, you need at least two classes. (As we'll discuss in lecture, this isn't strictly true, but let's go with it for now.) In the (oversimplified) view the HFJ authors present what are the two roles that these two classes are playing? Idenfity the roles, and explain each briefly,
  4. (10 pts) Throughout the book, some important material is sometimes in the little "side boxes" and dialogues. It's important to read everything on every page. One of these little side-boxes contains some important information about the "heap" in Java, and how it differs from the heap in C++. (C++ is not specifically mentioned, but from taking CS32, you should know about how the heap works in C++.) Briefly explain what the authors tell us about the heap in Java—something that is definitely different from the heap in C++.
  5. After reading the explanation in both HFJ and JN7, explain briefly each of the following, in your OWN words (not just copying words from the textbooks):
    1. (10 pts) What does the term "Java Ecosystem" refer to?
    2. (10 pts) In what sense is the Java compiler actually a "compiler", and in what sense is it not really a "compiler"?
    3. (10 pts) The relationship between Java Source Code and bytecode
    4. (10 pts) The relationship between bytecode and the JVM
  6. (10 pts) The following line of code from part 1 of the Rational tutorial implicitly invokes a particular method.

    System.out.println("r = " + r);
    

    What is that method?