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.