Skip to content

Commit 18f32b9

Browse files
committed
new recipe WhichFish with @samanthalangit
1 parent f5d1181 commit 18f32b9

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

0 Bytes
Binary file not shown.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package org.teachingkidsprogramming.section07objects;
2+
3+
//*************This Lesson is In Development*****************************//
4+
public class WhichFish
5+
{
6+
public static void main(String[] args)
7+
{
8+
// UNCOMMENT to create a variable called 'numberOfFish' to hold the result of the question "How many fishes?" -- #INFO
9+
// Use the FancyMessageBox with a title of "Are fishes like wishes?" -- #INFO
10+
// int numberOfFish = FancyMessageBox.askForNumericalInput("How many fishes?", "Are Fishes Like Wishes?"); --#1
11+
// Create recipe makeAFishyDecision using the numberOfFish (recipe below) --#2
12+
//----------recipe for makeAFishyDecision with the numberOfFish---------------------/
13+
// Use a switch...case on the numberOfFish --#3
14+
// When the numberOfFish is -1 --#4
15+
// UNCOMMENT to create a string of this image
16+
// String image = "../TeachingKidsProgramming.Source.Java/src/main/resources/icons/thumb-up.png";
17+
// Create a new ImageIcon from your image
18+
// UNCOMMENT to Show a message with the fancy message box this text, this title and this icon...
19+
// FancyMessageBox.showMesage("Had a Fish", "Not hungry anymore...", icon);
20+
// End
21+
// When the numberOfFish is 0 --#4
22+
// UNCOMMENT to create a string of this image
23+
// String image0 = "../TeachingKidsProgramming.Source.Java/src/main/resources/icons/information.png";
24+
// Create a new ImageIcon from your image
25+
// Show a message with the fancy message box this text, this title and this icon...
26+
// End
27+
// When the numberOfFish is 1 --#5
28+
// UNCOMMENT to create a string of this image
29+
// String image1 = "../TeachingKidsProgramming.Source.Java/src/main/resources/icons/star.png";
30+
// Create a new ImageIcon from your image
31+
// Show a message with the fancy message box this text, this title and this icon...
32+
// End
33+
// When the numberOfFish is 2 --#6
34+
// UNCOMMENT to create a string of this image
35+
// String image2 = "../TeachingKidsProgramming.Source.Java/src/main/resources/icons/github.png";
36+
// Create a new ImageIcon from your image
37+
// Show a message with the fancy message box this text, this title and this icon...
38+
// End
39+
// Otherwise --#7
40+
// UNCOMMENT to create a string of this image
41+
// String image4 = "../TeachingKidsProgramming.Source.Java/src/main/resources/icons/hint.png";
42+
// Create a new ImageIcon from your image
43+
// Show a message with the fancy message box this text, this title and this icon...
44+
// End
45+
//--------end of recipe for makeAFishyDecision-------------------------------------/
46+
}
47+
}

0 commit comments

Comments
 (0)