hi all i was wondering if there is anyone here familiar with uml as i am attempting to teach myself java and it has given me a problem to solve and was looking for a little help.
many thanks
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
hi all i was wondering if there is anyone here familiar with uml as i am attempting to teach myself java and it has given me a problem to solve and was looking for a little help.
many thanks
What about asking your question? It won't help you if I answered that I know UML and ran away.
My question is basically a little more than a question lol. I have been given a problem and need to determine the objects/classes that need to be written to solve the problem, also determine the attributes/behaviours of each class and then I have to use uml to visually plan each class.
The problem. Is,
A car dealer wants a program that tracks the profits/ loss of each vehicle bought and sold. They categorize their vehicles into cars, trucks, vans. Their experienced sales people sell new vehicles, while the other sales people sell the used vehicles.whether a car is new or used, they keep track of the profits the same. However, a sales person who sells a new vehicle received a higher commission than for selling a used vehicle. Each vehicle sold is assigned a sales person to collect the commission. The car dealer wants to use the profit information to compute the commissions for each sales person at the end of each month.
Could someone please give me a rough idea of how I would go about determining the classes and behaviours and such of this please?
Also no this. Is not for a college course or anything and I am not cheating before anyone thinks that lol it is a course I paid for a few years ago and am now sitting to learn as I have discovered forums are so much better than tutors that never reply lol.
All of your nouns are objects. In your case it would be the vehicles and sales people it seems like. Attributes are any time you describe one of those things. "Cars, trucks, vans" sounds like you need a type attribute. Price paid, price sold for. all these things are attributes that can be applied to your object. Any action that happens between objects would be a function. So things like "sale" or "getCommission". Just start asking yourself those questions and the classes, attributes, and functions should just flow. Put it into a story (aka workflow) and that should help.
Writing code is your job, helping you fix and understand it is mine.
<-- Be sure to thank and REP (Star icon) those who have helped you. They appreciate it!
ok cool thankyou for explaining that to me. ill get to work on that and see what i come up with. as i said im just learning and there is a lot to take in lol. a little daunting really but im determined to learn. another question.... will java help me in app building?
What kind of "app" are you talking about? If you mean iphone or droid apps then i really dont know. I dont have any experience in that field.
Writing code is your job, helping you fix and understand it is mine.
<-- Be sure to thank and REP (Star icon) those who have helped you. They appreciate it!
you have abstract class vehicles and classes cars, trucks, vans are subclasses from vehicles.