Lab 11: Objects and Classes
CS141: Introduction to Programming,
Fall 2011
Due Date: see instructions below
Summary of Goals
- Begin to work with classes and objects.
Activities
- During Lab this week:
- If you have lab before the exam, you may use lab time to ask questions and review previous assignments.
- If you have lab after the exam, you should begin to work on the new assignment on classes:
Assignments to do (or complete) on your own
Due on Monday, Nov 21:
Due on Wednesday, Nov 23:
- Part 1 of Classes & Objects Programming Assignment (Database or
Game)
- Database: See the instructions for what to turn on on Nov 23.
- Game:
- Carefully read through the entire instructions so that you are clear on how to play the game and you are clear
about the class structure.
- Try to do as much of Phase One as you can: Reading and printing the board.
- See the example code above for how to read from a file.
- Create a "data file" containing the board layout as shown in the Phase One.
- Read the data file one line at a time (as a String) and create a 2D char array. (Once you create the Piece classes
you will convert your char array to a 2D Piece array, but one thing at a time).
- Download the TextFrame.java class (see link in "Printing out board section") and add this to the folder containing
your other classes. You do not need to modify this class. In class, we will go over how to use it. Once, you
create a TextFrame, print the board (e.g. the 2D char array) to the TextFrame object.
[top] [Schedule]
[Home]