Results 1 to 6 of 6
  1. #1
    JavaNoob22 is offline Member
    Join Date
    Mar 2014
    Posts
    4
    Rep Power
    0

    Unhappy Need help in determine Class and Attributes

    Hi, I am new to Java and i am doing an assignment to identify Class and Attributes from below example.
    can someone help me to identify 7 classes and its attributes from this scenario:

    ABC Maps Maker produces electronic maps for global positioning systems. Every map
    needs to define the latitude and longitude of the centre of the map, together with the length
    and breadth of the map. A map also has a name, and a set of geographical features.

    A geographical feature is something noticeable in a a map; e.g., a hill, or valley. Among the
    types of features are the following: trace features, track features and tract features.

    All features have a name that is displayed on the map next to the feature.
    A trace feature has a coordinate point to indicate its location relative to the centre of the map.
    Broadcasting stations, mountain peaks, and transmission towers, are examples of trace
    features. Every trace feature has a description associated with it.

    Examples of track features include roads, railways and rivers. Each track feature has a list of points that define its course, and a line pattern. The line pattern specifies the colour, and the thickness.
    Like a track feature, a tract feature also has set of points, except that when drawn on the map, the last point is linked to the first point to enclose a complete region. Additionally, it has a fill pattern which incorporates essentially a colour.

    Recall that there is a class, Point, in the java.awt package this can be used to hold the co-ordinate of a point


    Class:
    Attributes:

    Class:
    Attributes:

    Class:
    Attributes:

    Class:
    Attributes:

    Class:
    Attributes:

    Class:
    Attributes:

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,661
    Blog Entries
    7
    Rep Power
    21

    Default Re: Need help in determine Class and Attributes

    You go first; if you're stuck we'll try to help you out but we are not going to do your homework for you.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    JavaNoob22 is offline Member
    Join Date
    Mar 2014
    Posts
    4
    Rep Power
    0

    Default Re: Need help in determine Class and Attributes

    Thanks JonAH -
    here what i have so far, i really hope someone could guide me to the right direction.
    because after this i need to determine Hierarchy, draw UML etc...

    Class: Map
    Attributes: name , georgraphicalFeature , coordinate

    Class: Feature
    Attributes: trackFeature , traceFeature , tractFeature

    Class: Coordinate
    Attributes: latitude , longitude , length , breadth

    Class: Pattern
    Attributes: linePattern , fillPattern

    Did I get it right and should there be more?

    Thanks!

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,661
    Blog Entries
    7
    Rep Power
    21

    Default Re: Need help in determine Class and Attributes

    According to the assignment text, a map has features (plural), as well as a lat/long coordinate (singular) of the middle of the map and a length and a width. Those features are more interesting: features come in the following types: trace, tract and track. Those three types are ideal candidates for subclasses of an abstract 'feature'. No matter its (sub)type, each feature has a name and a lat/long coordinate telling where the feature is located on a map. The text also mentions some more properties per sub-feature.

    So a map has a: feature (plural), coordinate, length, width
    a feature has a : name, coordinate
    a trace feature is a feature and has a ...
    etc. etc.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    JavaNoob22 is offline Member
    Join Date
    Mar 2014
    Posts
    4
    Rep Power
    0

    Default Re: Need help in determine Class and Attributes

    Thanks Jos -
    i will try that...

  6. #6
    JavaNoob22 is offline Member
    Join Date
    Mar 2014
    Posts
    4
    Rep Power
    0

    Default Re: Need help in determine Class and Attributes

    Jos -
    i come up with this:
    please comment on what i have, really appreciate your input. (also i need at least 1 more class, but i cant seem to come up with one.

    Map
    name, feature, coordinate, length, width

    Feature
    name, coordinatePoint, description

    Trace
    coordinatePoint, description

    Track
    coordinatePoint, pattern

    Tract
    coordinatePoint, pattern

    Pattern
    linePattern , fillPattern

Similar Threads

  1. Replies: 16
    Last Post: 01-08-2014, 06:02 PM
  2. What field represents attributes for an object of a class?
    By GraceBrennan11 in forum New To Java
    Replies: 3
    Last Post: 11-26-2012, 09:56 PM
  3. class attributes vs instance attributes in web apps
    By rdangelo in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-26-2012, 12:39 PM
  4. Replies: 4
    Last Post: 06-18-2010, 10:08 AM
  5. Replies: 2
    Last Post: 12-04-2007, 10:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •