Skip to content

Commit 98a7351

Browse files
committed
Updated HOMEWORK & removed abstract (might be confusing)
1 parent e8b502b commit 98a7351

File tree

2 files changed

+34
-20
lines changed

2 files changed

+34
-20
lines changed

HOMEWORK

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,50 @@
11
INSTRUCTIONS
22

33
* Fork this repository to complete the homework assignment.
4-
* Add or update your code for each of the activities below.
5-
* When finished, push your work to your github account.
4+
5+
Complete step one here: https://help.github.com/articles/fork-a-repo
6+
Use the github client to download locally.
7+
8+
* Create a new project for this assignment using the wizard and selecting
9+
the "Create project from existing sources" option, point to the directory,
10+
and using defaults for all other options (keep pressing "Next").
11+
12+
* Update the project to complete the activities below.
13+
614
* We will review the homework and any questions you may have about the
715
assignment at the beginning of class 2.
816

917
HOMEWORK
1018

11-
1. Add another penguin to the zoo. It should appear in the list of penguins
12-
with out modification to the current output code in the main function
13-
of Zoo.
19+
1. Add another penguin to the zoo by adding an entry to the penguin array.
20+
Note: Adding it here should make the new penguin appear in the console
21+
output with out modification to the main function of Zoo.
1422

1523
2. When a penguin eats a fish, the full weight of the fish should not be
16-
added to the weight of the penguin (current behavior). Instead add 3/4 the
17-
weight of the fish to the penguin's weight.
18-
19-
3. When a penguin swims, it loses five pounds.
24+
added to the weight of the penguin (current behavior). Instead add 3/4
25+
of the weight of the fish to the penguin's weight.
2026

21-
4. A penguin dies when it weighs 0 pounds. Add a function to check the weight
22-
before a penguin swims. Add a way to track if a penguin is dead.
23-
24-
EXTRA CREDIT
25-
26-
* Add an aquarium to hold fish.
27-
* Add three fish to the aquarium with different characteristics.
28-
* Add the aquarium to the zoo and add print statements to describe it.
27+
3. When a penguin swims, it loses five pounds. Update the class to reflect
28+
this behavior.
2929

3030
OBJECTIVES
3131

32-
* Become comfortable with github, checking out a repository, and pushing
33-
changes to github.com.
3432
* Become familiar with IntelliJ.
3533
* Practice with Java variables, functions, arrays, math operations,
3634
and objects.
35+
* Become comfortable with github, checking out a repository, and pushing
36+
changes to github.com.
37+
38+
EXTRA CREDIT
39+
40+
1. When finished with the main assignment, commit your changes and push your
41+
work to your github account.
42+
43+
2. A penguin dies when it weighs 0 pounds. Add a function to check the weight
44+
before a penguin swims. Add a way to track if a penguin is dead.
45+
46+
3. Add an aquarium to hold fish.
47+
48+
4. Add three fish to the aquarium.
49+
50+
5. Add the aquarium to the zoo and add print statements to describe it.

src/animals/Animal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Date: 7/29/12
66
* Purpose: GDI classroom example
77
*/
8-
public abstract class Animal
8+
public class Animal
99
{
1010
String name = "";
1111
int age = 0;

0 commit comments

Comments
 (0)