CS 50 Homework 2 (Section 2 — Prof. Brown)

Due by class time Tuesday, February 5
  1. Find at least three logic errors in this program.

  2. Programming Exercise P2.6 (page 96). Name your program Rectangle.java

  3. Programming Exercise P2.10 (page 97). Name your program Efficiency.java

  4. Programming Exercise P2.14 (page 97). Name your program Grid.java

  5. Programming Exercise P2.15 (page 98). Name your program Digits.java

  6. Programming Exercise P2.19 (page 99). Name your program Military.java


Turning in Your Homework

To turn in your homework, put your Java source code files (i.e., the ones that end in .java, NOT .class) into a single folder named Your Name HW 2 and drop this folder into the drop box.

If you are an off-campus student, you may copy your folder to a CLEAN floppy disk (i.e., one containing no other files or folders), and hand this in at the beginning of class, instead of using the drop box.