Scientific Programming II

ModSim

Maps


Problem 1 (5 Points)

Write a program that takes in an input sentence (punctuation not required) and prints out the number of each word in that sentence. Use maps!


Problem 2 (10 Points)

Write a small graphical program with a JPanel and JTextField. The user should be able to type in the name of a color, and a shape in that color will be drawn on the JPanel. The shapes need not be random.

Note: Check the available colors in the java.awt.Color API.