-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject11.java
More file actions
105 lines (96 loc) · 2.97 KB
/
Project11.java
File metadata and controls
105 lines (96 loc) · 2.97 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
class Wonders {
void location() {
System.out.println("Location:");
}
void Famous() {
System.out.println("Famous For:");
}
}
class GreatWallOfChina extends Wonders {
void location() {
System.out.println("Location: Great Wall in China");
}
void Famous() {
System.out.println("Famous For: Being the longest wall in the world, historical significance.");
}
}
class Petra extends Wonders {
void location() {
System.out.println("Location: Petra in Jordan");
}
void Famous() {
System.out.println("Famous For: Ancient rock-cut architecture, rose-red city.");
}
}
class ChristTheRedeemer extends Wonders {
void location() {
System.out.println("Location: Christ the Redeemer in Rio de Janeiro, Brazil");
}
void Famous() {
System.out.println("Famous For: Iconic statue of Jesus Christ, panoramic views.");
}
}
class MachuPicchu extends Wonders {
void location() {
System.out.println("Location: Machu Picchu in Peru");
}
void Famous() {
System.out.println("Famous For: Ancient Incan city, breathtaking mountain views.");
}
}
class ChichenItza extends Wonders {
void location() {
System.out.println("Location: Chichen Itza in Mexico");
}
void Famous() {
System.out.println("Famous For: Mayan ruins, El Castillo pyramid.");
}
}
class RomanColosseum extends Wonders {
void location() {
System.out.println("Location: Roman Colosseum in Rome, Italy");
}
void Famous() {
System.out.println("Famous For: Ancient amphitheater, gladiator games.");
}
}
class TajMahal extends Wonders {
void location() {
System.out.println("Location: Taj Mahal in Agra, India");
}
void Famous() {
System.out.println("Famous For: Stunning marble mausoleum, symbol of love.");
}
}
public class Project11 {
public static void main(String[] args) {
GreatWallOfChina A = new GreatWallOfChina();
Petra B = new Petra();
ChristTheRedeemer C = new ChristTheRedeemer();
MachuPicchu D = new MachuPicchu();
ChichenItza E = new ChichenItza();
RomanColosseum F = new RomanColosseum();
TajMahal G = new TajMahal();
A.location();
A.Famous();
System.out.println("---------------------------------");
B.location();
B.Famous();
System.out.println("---------------------------------");
C.location();
C.Famous();
System.out.println("---------------------------------");
D.location();
D.Famous();
System.out.println("---------------------------------");
E.location();
E.Famous();
System.out.println("---------------------------------");
F.location();
F.Famous();
System.out.println("---------------------------------");
G.location();
G.Famous();
System.out.println("---------------------------------");
}
}