-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
32 lines (25 loc) · 826 Bytes
/
Main.java
File metadata and controls
32 lines (25 loc) · 826 Bytes
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
// package src;
/**
* Main
*/
// import src.game.concrete.ConcreteGuessGame;
import game.fun.MultiFunc;
import game.abs.*;
import game.concrete.*;
public class Main {
public static void main(String[] args) {
System.out.println("Hello world.");
ConcreteGuessGame c = new ConcreteGuessGame();
c.process();
MultiFunc m = new MultiFunc("george", 1984);
System.out.println("Age: " + m.getAge() + " name: " + m.getName());
Person p = new Person();
Man man = new Man("Peter", 2001);
Woman w = new Woman("may", 1999);
p.showHello();
System.out.println("p: " + p.toString());
man.showHello();
w.showHello();
System.out.println("name: " + man.getName() + " age: " + man.getAge());
}
}