Homework 1 - Chapters 1,2
- 1.9.2 Show your math. That is, write down all the steps in your calculation even if you can do all/most of them in your head.
- 1.9.3 Draw a square that's going to be 200 by 200 for you and then draw all the graphics objects inside the same box being careful with spacing and such. I do *not* want this as a computer printout. I want you to do it by hand.
Labeling your drawing:
- For Line objects, label both endpoints with coordinates.
- For FramedRect objects, label upper left and lower right vertices.
- For FilledOval objects, put a small + in the center and label the coordinates.
- 1.9.3 again this time with a window which is 100 pixels wide and 200 high again all in the same square and drawn by hand.
- 2.7.4 ("Write a program" means just that. Should compile & interpret properly.)
- 2.7.6 ("Modify Scribble". Should compile & interpret properly.)
Be careful here!
Many students in the past have not turned the page to see the REST OF THE QUESTION, ie, a) & b) on the next page. Don't let this be you! This code does not refer to Scribble.java & friends.
Also, if you feel the code is different you must explain *exactly* how it will behave differently. Do not just point out where the code changed.
All are syntactically correct.
In a) and b), do the i) and ii) parts do the same thing or not? Why or why not? What does each do?
- 2.8.2 Write a program ...
Please read instructions carefully. 2.8.2 is NOT a repeat of 2.7.4 w/
frame/fill reversed and a larger size square.
The programs (red font) should be emailed to me as separate files. ALL others should be done "by hand". However, in this case, "by hand" means "in your head but showing me all the steps you took". You are welcome to type up all steps and submit your non-program problems that way whenever I don't explicitly say I want a hand drawing like in 1.9.3 I will need hard-copy (paper printout) of everything except your programs, please.
All the programs should be attached (not inline) to a single email. The subject line should read
"CS 157 - HW 1". Do not send me your separate programs as separate emails. If you have already submitted one or more of these programs, not to worry. Simply resend as part of the "whole package" when you complete the others. Thank you.