Skip to content

Commit db62b4b

Browse files
committed
new recipe OneFishTwoFish
1 parent 18f32b9 commit db62b4b

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

0 Bytes
Binary file not shown.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package org.teachingkidsprogramming.section06modelviewcontroller;
2+
3+
//*************This Lesson is In Development*****************************//
4+
@SuppressWarnings("unused")
5+
public class OneFishTwoFish
6+
{
7+
// Create a Scanner to make a string
8+
public static void main(String[] args)
9+
{
10+
makeAString();
11+
}
12+
public static void makeAString()
13+
{
14+
final String input = "1 fish 2 fish red fish blue fish,black fish,blue fish,old fish,new fish ";
15+
// Use your scanner with your input
16+
// Display a new line and "We have: " and the input and then a new line
17+
// Now, tell a story with a new Scanner instance
18+
}
19+
private static void tellAStory(final String input)
20+
{
21+
// Use 'fish' as the base text w/your scanner [story] HINT: useDelimeter
22+
// Get the next number to use in your scanner [story] HINT: nextInt
23+
// Get the next value to use in your scanner [story] HINT: next
24+
// Iterate over each fish [string] HINT: Interable
25+
// Create a new string iterator
26+
// Create a new scanner for your input
27+
// Use a comma to separate the strings in your story HINT: useDelimeter
28+
// Return the result
29+
{
30+
// Display "And then: " and the fish in the console
31+
}
32+
System.out.println("");
33+
}
34+
}

0 commit comments

Comments
 (0)