Skip to content

Commit 9844b2a

Browse files
authored
Merge pull request bhoffman0#217 from bhoffman0/JuiceMind-links-replit-cleanup
Remove replit iframes, add JuiceMind links
2 parents bd9b1a7 + 7720046 commit 9844b2a

20 files changed

Lines changed: 262 additions & 140 deletions

_sources/HiddenFiles/topic-3-9-toggle-write-code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ This is the write code problems associated with the mixed up code problems.
145145
:practice: T
146146
:autograde: unittest
147147

148-
Write code that tests if x is between 1 and 10, and prints ``1 <= x <= 10`` or ``x is not in range``.
148+
Write code that tests if x is between 1 and 10 inclusive, and prints ``1 <= x <= 10`` or ``x is not in range``.
149149
~~~~
150150
public class Test1
151151
{

_sources/Unit1-Getting-Started/topic-1-4-assignment.rst

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,18 @@ score variable is set to the previous value of score plus 1.
178178
Input with Variables
179179
--------------------
180180

181-
.. |JavaIOExample| raw:: html
181+
.. |JavaIOExampleJuiceMind| raw:: html
182182

183-
<a href="https://firewalledreplit.com/@BerylHoffman/JavaIOExample" target="_blank">Java Scanner Input Repl</a>
183+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/2e6655aa-a1b1-446e-9302-8ae43ab07e54#18fe2d0b-9011-40b1-b384-f956576a86a7" target="_blank">Scanner input example in JuiceMind</a>
184184

185+
.. |JavaIOExampleReplit| raw:: html
185186

186-
.. |JavaIOConsole| raw:: html
187+
<a href="https://replit.com/@BerylHoffman/JavaIOExample" target="_blank">Scanner input example in Replit</a>
187188

188-
<a href="https://firewalledreplit.com/@BerylHoffman/JavaIOConsole" target="_blank">Java Console Input Repl</a>
189+
190+
.. |JavaIOConsoleReplit| raw:: html
191+
192+
<a href="https://firewalledreplit.com/@BerylHoffman/JavaIOConsole" target="_blank">Console input example</a>
189193

190194

191195
Variables are a powerful abstraction in programming because the same algorithm can be used with different input values saved in variables. The code below using the ``Scanner`` class will say hello to anyone who types in their name and will have different results for different name values. First, type in your name below the code and then click on run. Try again with a friend's name. The code works for any name: behold, the power of variables!
@@ -230,7 +234,7 @@ Variables are a powerful abstraction in programming because the same algorithm c
230234
}
231235

232236

233-
Although you will not be tested in the AP CSA exam on using the Java input or the ``Scanner`` or ``Console`` classes, learning how to do input in Java is very useful and fun. For more information on using the ``Scanner`` class, go to https://www.w3schools.com/java/java_user_input.asp, and for the newer ``Console`` class, https://howtodoinjava.com/java-examples/console-input-output/. We are limited with the one way communication with the Java server in this Runestone ebook, but in most IDEs like replit, the input/output would be more interactive. Here are some examples in replit for |JavaIOExample| using the ``Scanner`` class and |JavaIOConsole| using the ``Console`` class that you can try out.
237+
Although you will not be tested in the AP CSA exam on using the Java input or the ``Scanner`` or ``Console`` classes, learning how to do input in Java is very useful and fun. For more information on using the ``Scanner`` class, go to https://www.w3schools.com/java/java_user_input.asp, and for the newer ``Console`` class, https://howtodoinjava.com/java-examples/console-input-output/. We are limited with the one way communication with the Java server in this Runestone ebook, but in most IDEs, the input/output would be more interactive. You can try this |JavaIOExampleJuiceMind| (click on Create Starter Code after login with a Google account) or |JavaIOExampleReplit| using the ``Scanner`` class and |JavaIOConsoleReplit| using the ``Console`` class.
234238

235239

236240

@@ -644,7 +648,11 @@ In this programming challenge, you will calculate your age, and your pet's age f
644648

645649
.. |repl template| raw:: html
646650

647-
<a href="https://firewalledreplit.com/@BerylHoffman/Challenge1-4-Dog-Years-Template" target="_blank">repl template</a>
651+
<a href="https://replit.com/@BerylHoffman/Challenge1-4-Dog-Years-Template" target="_blank">repl template</a>
652+
653+
.. |JuiceMind template| raw:: html
654+
655+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/2e6655aa-a1b1-446e-9302-8ae43ab07e54#de42baff-8802-40d7-a3a5-74701999c5ba" target="_blank">JuiceMind activity</a>
648656

649657
Your teacher may suggest that you use a Java IDE like |repl| for this challenge so that you can use input to get these values using the |Scanner|. Here is a |repl template| that you can use to get started if you want to try the challenge with input.
650658

_sources/Unit1-Getting-Started/topic-1-6-casting.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,13 @@ This would be a good project to work together in pairs, and switch drivers (who
597597

598598
.. |repl template| raw:: html
599599

600-
<a href="https://firewalledreplit.com/@BerylHoffman/Challenge1-6-Average-Template#Main.java" target="_blank">repl template</a>
600+
<a href="https://replit.com/@BerylHoffman/Challenge1-6-Average-Template#Main.java" target="_blank">replit template</a>
601601

602-
Your teacher may suggest that you use a Java IDE like |repl| for this challenge so that you can use input to get these values using the |Scanner|. Here is a |repl template| that you can use to get started if you want to try the challenge with input.
602+
.. |JuiceMind template| raw:: html
603+
604+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/5f00d71e-df8f-448f-a767-ed49e7af6f05#cb460a02-de03-4328-b310-ba057cb47a39" target="_blank">JuiceMind template</a>
605+
606+
Your teacher may suggest that you use a different Java IDE for this challenge so that you can use input to get these values using the |Scanner|, for example with this |JuiceMind template| or |repl template| that you can use if you want to try the challenge with input.
603607

604608

605609
.. |Unicode| raw:: html

_sources/Unit2-Using-Objects/topic-2-1-objects-intro-turtles.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
|Time45|
88

9-
.. |repl link| raw:: html
9+
.. |replit| raw:: html
1010

11-
<a href="https://replit.com/@BerylHoffman/Java-Swing-Turtle#Main.java" target="_blank" style="text-decoration:underline">replit link</a>
11+
<a href="https://replit.com/@BerylHoffman/Java-Swing-Turtle#Main.java" target="_blank" style="text-decoration:underline">replit</a>
1212

1313
.. |github| raw:: html
1414

@@ -163,13 +163,17 @@ Intro to Objects with Turtles
163163

164164
The Turtle class (that we've written for you and hidden on this page) is a blueprint for turtle objects. It defines attributes for graphical turtles like their color and position and methods to make the turtles move. Try the Java program below that creates a Turtle object called yertle using the Turtle class.
165165

166+
.. |JuiceMind| raw:: html
167+
168+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/beca9c16-4004-4a4e-b4b0-11593e140808#f5357602-b60b-44c3-be0e-dfb07de2a778" target="_blank" style="text-decoration:underline">JuiceMind</a>
169+
166170
.. activecode:: TurtleTest
167171
:language: java
168172
:autograde: unittest
169173
:datafile: turtleClasses.jar
170174

171175
Try clicking the run button below to see what the following program does.
172-
(If the code below does not work or is too slow in your browser, you can also see the ``Turtle`` code in action at this |repl link| (refresh page after forking and if it gets stuck) or download the files |github| to use in your own IDE.)
176+
(If the code below does not work or is too slow in your browser, you can also see the ``Turtle`` code in action on |JuiceMind| or |replit| or download the files |github| to use in your own IDE.)
173177
~~~~
174178
import java.awt.*;
175179
import java.util.*;

_sources/Unit2-Using-Objects/topic-2-2-constructors.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77
.. index::
88
pair: class; constructor
99

10-
.. |repl link| raw:: html
10+
.. |JuiceMind| raw:: html
1111

12-
<a href="https://replit.com/@BerylHoffman/Java-Swing-Turtle#Main.java" target="_blank" style="text-decoration:underline">replit.com link</a>
12+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/0994743d-f2f4-4c7b-9060-c2c9ff9ddcb1#fb8aa8d3-66b8-4c2d-b64f-c078e80cc53c" target="_blank" style="text-decoration:underline">JuiceMind</a>
13+
14+
.. |replit| raw:: html
15+
16+
<a href="https://replit.com/@BerylHoffman/Java-Swing-Turtle#Main.java" target="_blank" style="text-decoration:underline">replit</a>
1317

1418
.. |github| raw:: html
1519

@@ -150,7 +154,7 @@ There is another ``Turtle`` constructor that places the turtle at a certain (x,y
150154

151155
Try changing the code below to create a ``World`` object with 300x400 pixels. Where is the turtle placed by default? What parameters do you need to pass to the ``Turtle`` constructor to put the turtle at the top right corner? Experiment and find out. What happens if you mix up the order of the parameters?
152156

153-
(If the code below does not work in your browser, you can also use the ``Turtle`` code at this |repl link| (refresh page after forking and if it gets stuck) or download the files |github| to use in your own IDE.)
157+
(If the code below does not work in your browser, you can also use the ``Turtle`` code on |JuiceMind| or |replit| or download the files |github| to use in your own IDE.)
154158
~~~~
155159
import java.awt.*;
156160
import java.util.*;

_sources/Unit2-Using-Objects/topic-2-3-methods-no-params.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ Every method call is followed by parentheses. The parentheses ``()`` after metho
7272

7373

7474
After you put the mixed up code in order above, type in the same code below to make the turtle draw a 7.
75-
(If the code below does not work for you, you can also use the ``Turtle`` code at this |repl link| (refresh page after forking and if it gets stuck) or download the files |github| to use in your own IDE.)
7675

7776
.. activecode:: TurtleDraw7
7877
:language: java
@@ -371,7 +370,7 @@ Before you call a method from ``main`` or from outside of the current class, you
371370
|Groupwork| Programming Challenge : Draw a Letter
372371
-------------------------------------------------
373372

374-
Working in pairs, use the area below (or the |repl link|) to use a turtle to draw a simple block-style letter or number that uses just straight lines (no curves or diagonals). It could be one of your initials or a number from today's date.
373+
Working in pairs, use the area below (or on |JuiceMind| or |replit|) to use a turtle to draw a simple block-style letter or number that uses just straight lines (no curves or diagonals). It could be one of your initials or a number from today's date.
375374

376375
It may help to act out the code pretending you are the turtle. Remember that which way you turn depends on which direction you are facing, and the turtle begins facing north (towards the top of the page).
377376

@@ -384,9 +383,13 @@ Here are some simple turtle methods that you can use:
384383
- ``penUp()``
385384
- ``penDown()``
386385

387-
.. |repl link| raw:: html
386+
.. |JuiceMind| raw:: html
388387

389-
<a href="https://replit.com/@BerylHoffman/Java-Swing-Turtle#Main.java" target="_blank">replit.com link</a>
388+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/0b7dfa62-2c9a-4914-8c1e-b49e6ea2fee7#53fcf7f6-0de1-46bb-a4b0-0c6475b96f19" target="_blank" style="text-decoration:underline">JuiceMind</a>
389+
390+
.. |replit| raw:: html
391+
392+
<a href="https://replit.com/@BerylHoffman/Java-Swing-Turtle#Main.java" target="_blank">replit</a>
390393

391394
You may notice that it is challenging to have your turtle draw with these simple methods. In the next lesson, we will use more complex ``Turtle`` methods where you can indicate how many steps to take or what angle to turn that will make drawing a lot easier!
392395

_sources/Unit2-Using-Objects/topic-2-4-methods-with-params.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ different **method signature**, where it requires a different number or type of
124124

125125
|CodingEx| **Coding Exercise**
126126

127-
(If the code below does not work in your browser, you can also use the Turtle code at this |repl link| (refresh page after forking and if it gets stuck) or download the files |github| to use in your own IDE.)
127+
(If the code below does not work in your browser, you can also use the Turtle code in |JuiceMind| or |replit| or download the files |github| to use in your own IDE.)
128128

129129

130130
.. activecode:: TurtleTestMethods1
@@ -462,7 +462,7 @@ Try this |visualization| to see this code in action.
462462
:align: left
463463
:alt: simple house
464464

465-
This creative challenge is fun to do collaboratively in pairs. Design a house and have the turtle draw it with different colors below (or with this |repl link|). Can you add windows and a door? Come up with your own house design as a team.
465+
This creative challenge is fun to do collaboratively in pairs. Design a house and have the turtle draw it with different colors below (or on |JuiceMind| or |replit|). Can you add windows and a door? Come up with your own house design as a team.
466466

467467
To draw a window, you will need to call ``penUp`` to walk the turtle into position, for example:
468468

@@ -474,9 +474,14 @@ To draw a window, you will need to call ``penUp`` to walk the turtle into positi
474474
475475
It may help to act out the code pretending you are the turtle. Remember that the angles you turn depend on which direction you are facing, and the turtle begins facing up.
476476

477-
.. |repl link| raw:: html
477+
.. |JuiceMind| raw:: html
478478

479-
<a href="https://replit.com/@BerylHoffman/Java-Swing-Turtle#Main.java" target="_blank">replit.com link</a>
479+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/76a43c53-53ab-43d4-8ac5-4feadcd5c7f0#f53a5f87-d51e-4f70-802d-9e5a24023d4c" target="_blank" style="text-decoration:underline">JuiceMind</a>
480+
481+
482+
.. |replit| raw:: html
483+
484+
<a href="https://replit.com/@BerylHoffman/Java-Swing-Turtle#Main.java" target="_blank">replit</a>
480485

481486

482487
.. activecode:: challenge2-4-TurtleHouse

_sources/Unit2-Using-Objects/topic-2-6-strings.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,24 +396,25 @@ What if you wanted to print out a double quote " character? Since the double quo
396396

397397
Have you ever played MAD LIBS? In this game, you first choose a bunch of words without looking at the story and then those words are filled into the story to make it sound very wacky! Fill in the variables below with Strings for each word, and then run to see the wacky story.
398398

399-
.. |repl| raw:: html
400399

401-
<a href="https://replit.com" target="_blank">replit.com</a>
400+
.. |JuiceMind| raw:: html
401+
402+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/31e68cdd-7147-41d8-9f08-1d526c382c89#4caf97eb-ae16-4498-afce-41e1dfd4f164" target="_blank" style="text-decoration:underline">JuiceMind</a>
402403

403404

404405
.. |Scanner| raw:: html
405406

406407
<a href="https://www.w3schools.com/java/java_user_input.asp" target="_blank">Scanner class</a>
407408

408409

409-
Then, working in pairs, come up with another silly story that uses at least 5 new String variables. When you're done, try another team's mad libs code. Your teacher may ask you to create this program in a Java IDE like |repl| so that you can use input to read in the words (see input examples using the |Scanner|).
410+
Then, working in pairs, come up with another silly story that uses at least 5 new String variables. When you're done, try another team's mad libs code. Your teacher may ask you to create this program in a Java IDE that can do input for example this coding exercise on |JuiceMind| using the |Scanner| to read in input into the variables.
410411

411412
.. activecode:: challenge2-6-MadLibs
412413
:language: java
413414
:autograde: unittest
414415
:practice: T
415416

416-
If you used replit.com for this challenge, copy the url of your repl here to turn in.
417+
Replace the nulls below with silly words to create a silly poem. Run the code to see the poem. Then, create your own silly story using 5 more String variables.
417418
~~~~
418419
public class MadLibs1
419420
{

_sources/Unit2-Using-Objects/topic-2-7-string-methods.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,16 +446,16 @@ Here is a list of common mistakes made with Strings.
446446

447447
Create a program that takes a word and transforms it to Pig Latin using String methods. You may need the word's length, a substring that does not include the first letter, and a substring that is just the first letter (you can get the ith letter of a string using substring(i,i+1) so for example the letter at index 3 would be substring(3,4)).
448448

449-
.. |repl| raw:: html
450449

451-
<a href="https://replit.com" target="_blank">replit.com</a>
450+
.. |JuiceMind| raw:: html
452451

452+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/4c344344-c426-4ef9-949b-14bedc3d2b4a#c6d0509b-69a9-4910-bf0e-d7fae497fbf1" target="_blank" style="text-decoration:underline">JuiceMind</a>
453453

454454
.. |Scanner| raw:: html
455455

456456
<a href="https://www.w3schools.com/java/java_user_input.asp" target="_blank">Scanner class</a>
457457

458-
Your teacher may ask you to create this program in a Java IDE like |repl| so that you can use input to read in the word (see input examples using the |Scanner|).
458+
Your teacher may ask you to create this program in a Java IDE that can use input to read in the word, for example in |JuiceMind| using the |Scanner|.
459459

460460

461461
.. activecode:: challenge2-7-PigLatin

_sources/Unit3-If-Statements/magpie2.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,15 @@ When different methods are called from the main method, the control flows to the
199199
}
200200
}
201201

202-
.. |Magpie lab on replit.com| raw:: html
202+
.. |JuiceMind| raw:: html
203203

204-
<a href="https://firewalledreplit.com/@BerylHoffman/Magpie-ChatBot-Lab-v2#Main.java" target="_blank">Magpie lab on replit.com</a>
204+
<a href="https://play.juicemind.com/dashboard/teams/Mk2wWMTqPkekcxTDWqRn/item/a5853d60-d1d4-43d1-b38f-4d123b61e2c1" target="_blank">JuiceMind</a>
205+
206+
.. |replit| raw:: html
205207

206-
You can also run a version of the |Magpie lab on replit.com| that uses the Scanner class for input so that you can type in your own input to interact with it.
208+
<a href="https://replit.com/@BerylHoffman/Magpie-ChatBot-Lab-v2#Main.java" target="_blank">replit</a>
209+
210+
You can also run a version of the Magpie lab on |JuiceMind| or |replit| that uses the Scanner class for input so that you can type in your own input to interact with it.
207211

208212
As you can see the ``getResponse`` method of Magpie2 looks for certain keywords like ``"mother"`` and ``"brother"``. Why do you think the response to "Do you know my brother?" isn't "Tell me more about your family."? Discuss this with partner in pairs and see if you can figure it out.
209213

@@ -248,9 +252,7 @@ Alter the code above or in your own IDE (see section below) to do the following.
248252
Activity 2: Actual Code - (Optional)
249253
-------------------------------------
250254

251-
You can do all of Activity 2 with the actual code using the Scanner class for input instead if you prefer.
252-
253-
Here is the actual code for the |Magpie lab on replit.com|. It uses the ``Scanner`` class to read input from the user. The ``Scanner`` class is not on the AP CSA exam. You can log in to replit.com and use this code and change it to do this lab.
255+
You can do all of Activity 2 with the actual code using the Scanner class for input instead if you prefer. The ``Scanner`` class is not on the AP CSA exam. You can use |JuiceMind| or |replit| online.
254256

255257
Or you can copy and paste in the code from below into any Integrated Development Environment (IDE) like DrJava or JGrasp to run on your computer.
256258

0 commit comments

Comments
 (0)