SE1011
Homework
There are four sources for the homework problems:
- CodingBat assignment (with link to assignment provided).
- Exercise: 3.4 means exercise number 4 at the end of chapter 3.
- Project: 2.5 means project number 5 for chapter 2.
- Instructor written assignment.
Week 1 (doable by Tuesday of week 2)
- Exercise 3.4
Week 2 (doable by end of week 2)
Note: You'll need to create an account on the CodingBat site (make sure you enter your name in the Name field (even though it says it is optional). You will also need to put your instructor's email address in the "Share To" field (see preferences). (5 minute tutorial video)
- CodingBat: sum
- CodingBat: helloName
- CodingBat: makeAbba
- Project: 3.7
- Exercise: 2.5 (long form only)
- Project: 2.5, 2.8, 2.9
- Download this file. For each part, first predict what you think will be displayed, then run the code (commenting/uncommenting as needed) and verify your prediction.
- Download this file. For each part, first predict what you think will be displayed, then run the code (commenting/uncommenting as needed) and verify your prediction.
- Write a program that will initialize a variable named
myHelloWorldwith the string literalMy Hello World"and print to the console the index of the letter H. - Write a program that will initialize a variable named
firstNamewith your first name. Without using loops, print to the console each letter in your name on a separate line by using thecharAt()method. - Using the String class documentation, explain what the
replace()method does and write a program to demonstrate its usefulness. - Using the String class documentation, explain what the
trim()method does and write a program to demonstrate its usefulness.
Week 3 (doable by end of week 3)
- CodingBat: comboString
- CodingBat: sortaSum
- CodingBat: alarmClock
- CodingBat: twoAsOne
- CodingBat: inOrder
- CodingBat: bobThere (video solution)
- CodingBat: starOut
Week 4 (doable by Tuesday of week 4)
- CodingBat: closeFar
- CodingBat: makeChocolate
- CodingBat: sumDigits
- CodingBat: middleThree
- Exercise: 4.9, 5.5
- Project: 4.2, 5.2
Week 5 (doable by Friday of week 5)
- Exercise: 5.3, 5.7, 5.8
- Project: 5.3, 5.4, 5.6, 6.1
Week 6 (doable by Friday of week 6)
- Exercise: 6.6, 6.10, 6.11, 6.13, 7.2
- Project: 6.5
- In the
Studentclass developed in lecture, replaceString dateinstance variable with LocalDate date. Hint:java.time.temporal.ChronoUnit.YEARS.between(a, b);returns the number of years between twoLocalDates.
Week 7 (doable by Thursday of week 7)
- Exercise: 7.2, 7.7
Week 8 (doable by on Tuesday of week 8)
- Exercise: 9.9
- Project: 9.5
- Implement
calculateTermQuizScore()that accepts an array ofints as an argument and returns adoublerepresenting the quiz grade for the quarter.
Week 9 (doable by Friday of week 9)
- Exercise: 10.7, 10.9, 10.10
- CodingBat: lucky13
- CodingBat: sum28
- CodingBat: centeredAverage
- The above centeredAverage problem with an ArrayList instead. (
public int centeredAverage(ArrayList<Integer> nums)) - CodingBat: linearIn
- Exercise: 10.10
- Project: 10.2
Week 9 (doable by Monday of week 10)
Week 10 (doable by Friday of week 10)
- Project: 10.7
Last modified: Friday, 04-Nov-2016 13:48:35 EDT