06. The “Card” class

Okay, so we’ve created a Card class template and Eclipse will have probably started you off with this:

The package reference just states where this card class is being used and we’re not going to worry about that from here on in, what’s most important is the structure of our Card class.

You might recall I mentioned a class has Fields, Methods and a Constructor. This is true of most classes so let’s start with some comments and place holders for those things. Change your Card class to look like this:

From now on, rather than use screen captures for everything I’ll just use pre-formatted text to show you the code to add. Since this┬átutorial is about learning Object-Oriented programming I’m not going to make you solve all the┬áprogramming┬áproblems as we go, we’ll simply add them and explain any OO programming techniques you should know about along the way.

Leave a Comment

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>