For this assignment, you will write a bunch of classes, as described below. Put all of the classes into a single project called "classes," and submit that project.
You may work alone or with a partner for this assignment.
Write a class called PlayingCard. Each PlayingCard instance will, not surprisingly, represent a single playing card. The only data member in this class should be a single integer called cardNumber whose value is between 0 and 51, inclusive. The numbers 0 through 12 will represent the 2 of clubs through the ace of clubs, 13-25 will be the 2 through ace of diamonds, 26-38 will be the hearts, and 39-51 will be the spades. The methods for this class should be:
Also, write a class called PlayingCardTester that contains a main method and nothing else. The main method should instantiate one PlayingCard object and then use getValue, getSuit, and getCardNumber to print out their results using System.out or an OutputBox. If you want to get fancy, you can use a loop to print out a whole bunch of cards at once.
Write a class called Target. Each Target instance will represent a target shape (a bunch of concentric circles) that can be drawn on a DrawingBoard. The data members of Target should store a radius, a color, and a number of rings. The public methods should include a 0-parameter constructor, a 3-parameter constructor (radius, color, and ring count), setColor, and draw. The draw method should take a DrawingBoard and center coordinates as parameters, and draw the target in the appropriate place on the given DrawingBoard.
Write a class called TargetTester that contains a main method and nothing else. This main method should invoke all the Target methods (including both constructors) at least once each, and demonstrate everything that the Target class is capable of doing. You may design your main method to test Target with or without input from the user.
Write a class called Triangle, each instance of which will represent a triangle to be drawn on a DrawingBoard (check the DrawingBoard documentation for a description of the drawLine method). You go ahead and decide what data members and methods this class should have. But at minimum, Triangle should provide appropriate constructors, a draw method, a getPerimeter method, and a getArea method (I trust that the names of these methods will make their purpose clear). Write a class called TriangleTester to test all of your Triangle code.
You may find it tempting to put OutputBox code inside the getArea and getPerimeter methods. Do not succumb to the temptation. These methods should communicate with the main method in TriangleTester, which in turn may communicate with the user. But getArea and getPerimeter must not ask the user questions, nor may they use OutputBox or System.out. Let the main method of TriangleTester talk to the user.