-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSong.java
More file actions
144 lines (83 loc) · 2.74 KB
/
Song.java
File metadata and controls
144 lines (83 loc) · 2.74 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// author : shamar Gordon
// duedate : 02/06/2023
// purpose : to create a song using methods
//Assumptions : #2
//section :4
package Assignments;
public class Song {
// main method
public static void main (String[] avg) {
cat(); // call the cat method
hen(); // call the hen method
duck(); // call the duck method
goose(); // call the goose method
sheep(); // call the sheep method
pig(); // call the pig method
}
private static void sentence() {
System.out.print("Cat goes fiddle-i-fee.");
}
private static void sentence2() {
System.out.println("Hen goes chimmy-chuck, chimmy-chuck");
}
public static void sentence3 () {
System.out.println("Duck goes quack, quack,");
}
public static void sectence4 () {
System.out.println("Sheep goes baa, baa,");
}
public static void sectence5() {
System.out.println("Goose goes hissy, hissy");
}
public static void cat() {
System.out.println("\nBought me a cat and the cat pleased me, \n" +
"I fed my cat under yonder tree");
sentence();
System.out.println();
}
public static void hen() {
System.out.println("\nBought me a hen and the hen pleased me,\n" +
"I fed my hen under yonder tree ");
sentence2();
sentence();
System.out.println();
}
public static void duck() {
System.out.println("\nBought me a duck and the duck pleased me,\n" +
"I fed my duck under yonder tree ");
sentence3();
sentence2();
sentence();
System.out.println();
}
public static void goose() {
System.out.println("\nBought me a goose and the goose pleased me,\n" +
"I fed my goose under yonder tree ");
sectence5();
sectence4();
sentence3();
sentence2();
sentence();
System.out.println();
}
public static void sheep() {
System.out.println("\nBought me a sheep and the sheep pleased me,\n" +
"I fed my sheep under yonder tree ");
sectence5();
sectence4();
sentence3();
sentence2();
sentence();
System.out.println();
}
public static void pig() {
System.out.println("\nBought me a pig and the pig pleased me,\n" +
"I fed my pig under yonder tree \n" + "Pig goes oink, oink,");
sectence5();
sectence4();
sentence3();
sentence2();
sentence();
System.out.println();
}
}