-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06a6e58
commit 0ab5290
Showing
2 changed files
with
30 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,17 @@ | ||
package ClassProblems.Class2; | ||
import java.awt.*; | ||
/** | ||
* penguin | ||
*/ | ||
public class Penguin { | ||
|
||
public Penguin(String name) { | ||
this.name = name; | ||
} | ||
|
||
private String name = "Tommy Gufano"; | ||
String nickname = "The Big Sleazy"; | ||
public void talk() { | ||
System.out.println("Howdy" + this.name + " otherwise known as, " + this.nickname); | ||
} | ||
public void draw(Graphics g){ | ||
// THis is Lab2 | ||
g.setColor(Color.YELLOW); | ||
g.fillOval(100, 100, 200, 200); | ||
|
||
} | ||
} | ||
|
||
|
||
// public class Penguin() { | ||
// String name = "Tommy The Big Sleazy Gufano"; | ||
// public void talk() { | ||
// System.out.println("Howdy" + name + " otherwise known as, " + this); | ||
// } | ||
// } | ||
|
||
public class Penguin { | ||
public Penguin(String name) { | ||
this.name = name; | ||
} | ||
private String name = "Tommy Gufano"; | ||
String nickname = "The Big Sleazy"; | ||
public void talk() { | ||
System.out.println("Howdy" + this.name + " otherwise known as, " + this.nickname); | ||
} | ||
public void draw(Graphics g){ | ||
g.setColor(Color.YELLOW); | ||
g.fillOval(100, 100, 200, 200); | ||
} | ||
} |