-
Notifications
You must be signed in to change notification settings - Fork 0
/
Song.java
87 lines (84 loc) · 2.31 KB
/
Song.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
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
// Chris Student, CSE 142, winter 2016
// Programming Assignment #1, 06/07/42
//
// This program's behavior is to print out a cumlative song
public class Song{
public static void main(String[] args){
ver1();
ver2();
ver3();
ver4();
ver5();
ver6();
ver7();
}
//prints the first verse
public static void ver1(){
System.out.println("On the 1st day of \"Xmas\", my true love gave to me");
tree();
space();
}
//prints the second verse
public static void ver2(){
System.out.println("On the 2nd day of \"Xmas\", my true love gave to me");
dove();
space();
}
//prints the third verse
public static void ver3(){
System.out.println("On the 3rd day of \"Xmas\", my true love gave to me");
hens();
space();
}
//prints the fourth verse
public static void ver4(){
System.out.println("On the 4th day of \"Xmas\", my true love gave to me");
birds();
space();
}
//prints the fifth verse
public static void ver5(){
System.out.println("On the 5th day of \"Xmas\", my true love gave to me");
rings();
space();
}
//prints the sixth verse
public static void ver6(){
System.out.println("On the 6th day of \"Xmas\", my true love gave to me");
geese();
space();
}
//prints the seventh verse
public static void ver7(){
System.out.println("On the 7th day of \"Xmas\", my dog gave to me");
System.out.println("3 headaches,");
System.out.println("2 bit marks, and");
System.out.println("1 wet carpet.");
}
public static void space(){
System.out.println("");
}
public static void tree(){
System.out.println("a partridge in a pear tree.");
}
public static void dove(){
System.out.println("two turtle doves, and");
tree();
}
public static void hens(){
System.out.println("three French hens,");
dove();
}
public static void birds(){
System.out.println("four calling birds,");
hens();
}
public static void rings(){
System.out.println("five golden rings,");
birds();
}
public static void geese(){
System.out.println("six geese a-laying,");
rings();
}
}