<<<<<<< HEAD
Title | Type | Duration | Author |
---|---|---|---|
Responsive Site Mockup | HW | 1:00 | Rachel Moskwoitz (adapted from NYC_SEI) |
You are being given a completed static website. However, it is not responsive! Your task is to take the site and make it responsive. Follow the directions at the bottom of /css/main.css
.
Here's a full-size mockup of what the site looks like: mockup.
Here's what the small or mobile version of the site should look like: mockup.
Instructor Note: This can be a pair programming activity or done independently.
This lab provides an opportunity to practice creating methods.
Write code that implements various methods, following the requirements listed below:
-
Define a method,
maxOfTwoNumbers()
, that takes two numbers as arguments and returns the largest of them. I would suggest using conditional statements. Do a Google search to figure this out if you forgot how conditionals work. -
Define a method,
maxOfThree()
, that takes three numbers as arguments and returns the largest of them. -
Write a method,
isCharacterAVowel()
, that takes a character (i.e., a string of length1
) and returnstrue
if it's a vowel andfalse
otherwise. -
Write a method that returns the number of arguments passed to it when called.
-
Define a method,
reverseString()
, that computes the reversal of a string. For example,reverseString("jag testar")
should return the string"ratset gaj"
.
Bonus
-
Write a method,
findLongestWord()
, that takes an array of words and returns the length of the longest one. -
Write a method,
filterLongWords()
, that takes an array of words and a number,i
, and returns the word(s) in the array that are longer thani
characters.
There is no starter code for this lab.
You'll review the answers with the instructor in class.
- Oracle Java Docs: Defining Methods
- Oracle Java Docs: A Closer Look at the "Hello World!" Application
- Princeton: Java Programming Cheat Sheet
- Java Modifier Types
- Princeton: Recursion
d0f277b2c8f9b3d2efad1b2439c8359e3153cbdb