Java Reference
In-Depth Information
΢΢G Exercise P3.16. Change the car drawing program to make the cars
appear in different colors. Each Car object should store its own color.
Supply modified Car and CarComponent classes.
΢΢G Exercise P3.17. Change the Car class so that the size of a car can be
specified in the constructor. Change the CarComponent class to make
one of the cars appear twice the size of the original example.
΢΢G Exercise P3.18. Write a program to plot the string ȒHELLOȓ, using only
lines and circles. Do not call drawString , and do not use
System.out . Make classes LetterH , LetterE , LetterL , and
LetterO .
΢΢G Exercise P3.19. Write a program that displays the Olympic rings. Color
the rings in the Olympic colors.
Provide a class OlympicRingViewer and a class
OlympicRingComponent .
΢΢G Exercise P3.20. Make a bar chart to plot the following data set. Label
each bar. Make the bars horizontal for easier labeling.
Bridge Name
Longest Span (ft)
Golden Gate
4,200
Brooklyn
1,595
Delaware Memorial
2,150
Mackinac
3,800
129
130
Additional programming exercises are available in WileyPLUS.
Search WWH ::




Custom Search