Classes And Methods In Java Essay Example
The problem is to design a software to keep track of people, property, and criminal activity. The system must be able to store information about every object of tracking. Therefore, there must an implementation of the corresponding database. Objects of tracking are divided into three categories. There are person objects, property objects, and criminal activity objects. In addition, the property may also be movable and immovable. These categories have some similar characteristics and behavior. Also, there are some unique attributes for each category. Such as a person can change his location and immovable property cannot. The user will be able to get all information about the exact object of tracking such as its status, location, personal information, history of movement (for movable objects), information about the owner (for property), type of crime etc.
There must be several classes in design. The first one is the general class for the tracking object (TrackingObject class). It should have some general private properties such as its ID, location. Also, it will have some methods such as getter for the ID field and getter and setter for the location field. There also must be three inherited (from TrackingObject) classes: Person, Property, and CrimeActivity. Other classes (MovableProperty and ImmovableProperty) should be inherited from the class Property. Class Person will have private fields about personal information such as name, date of the birth, place of living etc. In addition, some array or list field for storing person’s history of locations. The Class Property will have private fields about its owner information and some information about the property. Inherited MovableProperty may have private fields about its number, model year, history of locations, and corresponding public getters and setters. ImmovableProperty class may include fields of the address, people, who lives there, type of the place (living quarters, house or other facilities), and corresponding public getters and setters. CriminalActivity class will have private fields of the time of commitment, suspects and victims (their personal information), and corresponding public getters and setters. In addition, the last class may have some connections with Property and Person classes.