CS 1054 Introduction to Programming in Java (Spring 2008)
Lab 7: Loops
Lab Objective
- Use loops for printing shape objects.
Instructions
- Begin by downloading
Lab7.zip,
save the file, and then extract it in a folder you can locate.
Open this project in BlueJ.
- Study the Triangle, VLine, and ShapeRunner classes
(Ignore the ShapeConsole class, for now).
Execute ShapeRunner to see how the shapes are displayed.
- You will create four more classes:
HLine ,
LetterL ,
LetterU ,
and
InvertedTriangle .
Click on the class names for class documentation.
- Uncomment the portion in ShapeRunner
that uses these classes,
and then check the output that results when
you execute ShapeRunner.
If you wrote the four classes correctly,
the following output will result.
- Submit these four classes via Webcat.
You will need to submit a zip file; create this zip file
by selecting the four .java files and then zip.
- (Optional; will not be graded).
Revise the ShapeConsole class so that it supports
the new shape classes you have created.