?
Solved

OO concepts

Posted on 2005-03-14
7
Medium Priority
?
275 Views
Last Modified: 2010-03-31
Hi All.

Im a java beginner and am embarking on a project to build some kind of app to collect car data.

Im looking into a building a class diagram first , but im not sure what parts of the info belong to which classes

Theres some info here of the car data collected

http://homepages.nildram.co.uk/~natkins/car/test.html#

but im trying to figure out the classes i'd be utilising.

Im sure that there will be a Car class , but would the owners verdicts be a part of an OwnersVerdict.class or something more obscure like a Person.class since all this info is collected from questionairre recipients/respondents?

theres also Evaluation information, but this info doesnt actually BELONG to the car its just an aspect of it so would it be or would it be some aggregation of the collected info?

Hope this question isnt too vague and someone can point me in the right direction!

MetalMickey

0
Comment
Question by:metalmickey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 37

Expert Comment

by:zzynx
ID: 13533456
>> Im sure that there will be a Car class, but would the owners verdicts be a part of an OwnersVerdict.class
Sounds OK to me.
class Car having a member ownersVerdict of type OwnersVerdict

public class Car {

    // Data members
    OwnersVerdict ownersVerdict;
   
}

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13533461
You would have a larger enclosing class which related the entities. Class Car should be probably be related throuhg a one-to-many collection relationship to a an Owner(depending on amount of 'owner' info actually held) or an OwnerVerdict class
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13533470
>>class Car having a member ownersVerdict of type OwnersVerdict

Not such a good idea having such a tight coupling between the two (see above)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Author Comment

by:metalmickey
ID: 13533529
Thanks for the Quick response,
ive just checked and this data is not going to be aggregated or queried, which makes my task a lot easier.

So essentially i'll have a Car class and all the data are to be considered as attributes of the car. Which i think kind of answers my own Q. Although id still be intersted in any views on how to keep the Verdicts/Evaluation info together.

Thanks for your time.
MM
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 375 total points
ID: 13533599
>>this data is not going to be aggregated or queried

Irrespective of data usage, if you have any relation between Car and Owner//Owner verdict, the previous comments apply
0
 
LVL 6

Author Comment

by:metalmickey
ID: 13572983
Thanks CEHJ

Ive followed your advice and broken down the information into groups of small constituents and then am anaylsing thier relationships with other classes.

I think doing it this way will allow be to understand the data model in greater detail, and then discount relationships that are of no use to me.

MM
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13573017
8-)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month12 days, 6 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question