Custom Class Project

Write your own custom-made class modelled on our Tank class demo that includes the following items:

  • a default constructor
  • 1 "other" constructor that takes parameters for each property
  • 5 or more properties (aka instance fields) which should be typed out at the bottom of the class
  • an accessor method (aka getter) for each property
  • a modifier method (aka setter) for each property
  • 2 "interesting" methods that each do something with one or more properties. For example, they may modify the values of properties in an interesting way
  • a static method that displays "I love this class"

The custom-made class must be named appropriately and the first letter must be uppercase. For example, if your class is used to create soccer players then the name of the class would be SoccerPlayer. The file should be saved as SoccerPlayer.java in NotePad or Eclipse (where your class name is substituted for SoccerPlayer).

Also, write a test class (aka client program) named SoccerPlayerTest (where your class name is substituted for SoccerPlayer). This class should be modelled on the TankTest demo. This class must instantiate (aka construct) one object from your class using the "other" constructor. Write code that makes use of every method from the class (except for the default constructor) and display output so the instructor can easily tell that the methods work properly. This file should be saved as SoccerPlayerTest.java in NotePad or Eclipse (where your class name is substituted for SoccerPlayer).

Your program must follow the class Coding Standards. Save all of the files associated with this assignment in the appropriate network folder.

Preconditions:

    • None

You must hand in the following on separate pages stapled in this specified order:

    1. The source code for your custom-made class.
    2. The source code for the test class.
    3. The printscreen of your console window output.