|
home—info—lects—labs—exams—hws
textbook—java.lang docs—java.util docs
You might want to refer to yesterday's lecture notes to do these problems.
Here's a riddle: Q: What is at the center of gravity? A: The letter 'v'! |
String riddledCenter; riddledCenter = "gravity"; |
5 jelly-filled donuts cost $1.25. |
Optional, if you finish the first two problems: modify the problems so that they interactively ask the user for the word to use for riddledCenter and donutType. (See yesterday's lecture notes.)
For an added challenge, also ask for the number and price of donuts interactively, using Java's methods Double.parseDouble(String) and Integer.parseInt(String) to convert a String into an double or int.
home—info—lects—labs—exams—hws
textbook—java.lang docs—java.util docs
©2009, Ian Barland, Radford University Last modified 2009.Jan.27 (Tue) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |