There are two parts to this homework: a written component worth 12 points, and programming component worth 13 points. Submission instructions are available here.
As to be described later in the homework submissions instructions, you may submit this as a hardcopy, or as a file along with your programming problems in one of four formats (Word, PDF, HTML, or plaintext).
Note that problems assigned from Schneider/Gersting or Lewis/Loftus are the exercise problems at the end of each chapter, not the practice problems or self-review questions. (The practice/self-review problems are optional, and solutions for them are provided in the book. For obvious reasons, the solutions for the exercises are not. ;-))
As described below, you will submit this part of the assignment as five files: three .java files, corresponding to the source for each problem, a .html file to run problem 3, and a README file (no typescript is necessary). Suggestion: do each of the problems in order, as they're of increasing difficulty.
BeanCounter
, which performs a few simple arithmetic operations on a pair of variables and prints the results to the screen. More specifically, your program should create two variables of type integer (call them var1
and var2
), assign them default values (they should be non-zero,
but they do not need to be acquired via interactive input), perform the following calculations and print the results of each out on the screen. The operations you need to implement are: java BeanCounter
:
* The sum of 50 and 20 is 70
* The product of 50 and 20 is 1000
* 50 divided by 20 is 2.5
* 50 % 20 is 10
* I computed (50+20)*(70+2.5)/10+1000 to equal 1507.5
* 50 > 20 is true
CoinCounter
, that reads integer values (from
System.in
) representing the number of pennies, nickels, dimes, and quarters, and outputs the
(floating-point) total in dollars to the screen.FaceApplet
, that
draws a person's face. (For inspiration, feel free to use your
own, a friend's, your instructor's, Lee Bollinger's, what have you.)
At a minimum, your face must consist of the following components and at
least two colors other than black and white (e.g., skin and hair tones).