Record your participation in Piazza clicker question Lesson4 Q1
Which methods of the Day class are mutators? Select all that apply. (Here is documenation for the Day class - opens in a new window)
Record your participation in Piazza clicker question Lesson4 Q2
Which methods of the Day class are accessors? Select all that apply.
Record your participation in Piazza clicker question Lesson4 Q3
The getHeight method of the Picture class is an accessor. (Here is the picture class documentation - opens in a new window)
Record your participation in Piazza clicker question Lesson4 Q4
The grow method of the Picture class is an accessor
Record your participation in Piazza clicker question Lesson4 Q5
Look at the Java API at the public interface of the String class.
Record your participation in Piazza clicker question Lesson4 Q6
Enhance the StairsViewer from last class. You can download StairViewer project if you need it.
Do this
Record your participation in Piazza clicker question Lesson4 Q7
What does this code print? (Remember the grow method adds to both sides.)
Rectangle tile1 = new Rectangle( 10, 30, 50, 20); Rectangle tile2 = tile1; tile2.grow(5, 0); System.out.println(tile1.getWidth() + " " + tile2.getWidth());
Record your participation in Piazza clicker question Lesson4 Q8
What does this code print? (Remember the grow method adds to both sides.)
Rectangle tile1 = new Rectangle( 10, 30, 50, 20); Rectangle tile2 = new Rectangle( 10, 30, 50, 20); tile2.grow(5, 0); System.out.println(tile1.getWidth() + " " + tile2.getWidth());
Record your participation in Piazza clicker question Lesson4 Q9
What does this code print?
double salary1 = 12.50; double salary2 = salary1; salary2 = salary2 + 1.00; System.out.println( salary1 + " " + salary2);
Record your participation in Piazza clicker question Lesson4 Q10
What is printed here? Try it in code pad, and write your answers on a piece of paper or in text file.
String farewell = "Goodbye, Moon"; farewell.toLowerCase(); System.out.println(farewell); // 1 farewell.replace("o", ""); System.out.println(farewell); // 2 String changed = farewell.toLowerCase(); System.out.println(farewell); // #3 System.out.println(changed); // #4 changed = changed.replace("o", ""); changed = changed.replace("e", "3"); System.out.println(changed); // #5 System.out.println(farewell); // #6