|
|
|
|
April 2nd
String str ="ABCDEFG"
String firstLetter = str.substring(0,1)
String firstTwoLetters = str.substring(0,2)
String lastLttr = str.substring(str.length() -1)
String last_2_lttrs = str.substring(str.length() -2 )
String middle_lttr = str.substring(str.length()/2 , str.length()/2 +1)
Unit 2
Extra credit: Looping over Strings
Unit I
Deadline the day you return from feb break
*Wed/Thursday 21st/22nd
Objective: Your goal is get your jeroo onto the right side of the island. Note that the red areas are nets. You must toss() a flower onto the net before you can go on the net.. You will need the following island file .
Monsoon rains have created a lake in the middle of Santong Island. Furthermore, that lake contains an island. Two Jeroos were separated by the rains. One is on the main part of Santong Island, but the other is on the island in the middle of the lake. The goal of this program is to have each Jeroo explore the shoreline of the lake.
Download Walk the Lake (This has several maps, choose any 1)
Acknowledgement
This problem is adapted from one that was created originally by Erica Eddy of The University of Wisconsin – Parkside.
Or you can try walk the lake using loops using this map and Jeroo assignment
Do you ever wish that you could make your Jeroo turn around 180 degrees?
Example 2 of a Custom Method to “Go Around a net”
You can download the files for the animation below here
Objective: Your goal is to have a jeroo beautify the Island. Instantiate a jeroo with 8 flowers in its pouch and have the jeroo plant the flowers in the pattern below Download these beginning-activites
![]() |
![]() |
![]() |
You have a lot of flexibility in creating this class, but here is what it should be able to do
It’s up to you to decide how to implement the functionality below. You will only lose credit if your methods clearly make no sense, have bad variable names/method names.
The functionality above ^^ can be implemented in any efficient way that makes sense, but it must be implemented. I am leaving that part up to you!
Constructor
instance Variables
Accesor Methods
Now, let’s refactor our class relationships to represent our new Iheritance Tree
Create the following class
Circle
Constructor
instance Variables
Accesor Methods