-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bat.java
51 lines (44 loc) · 1.02 KB
/
Bat.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
public class Bat extends Mammal implements Flying{
/**
* This is the default constructor for my Bat
*/
public Bat()
{
}
/**
* This is the constructor for the bat with one parameter
* @param age
*/
public Bat(int age)
{
this.age = age;
}
/**
* This is the constructor for the bat with two parameters
* @param age
* @param name
*/
public Bat (int age, String name)
{
this.age = age;
this.name = name;
}
/**
* This is the overriden makeNoise method
*/
@Override
public void makeNoise()
{
System.out.println("screeeeech");
}
/*
* This is a sample private method that makes no
* sense at all. It is here to show a private comment.
* Private comments are not public to the user via docs.
*/
private String saySomethingWeird(String thing)
{
//this outputs to the console stuff
System.out.println("Pizzas are not actually " + thing);
}
}