Question:
Object Oriented Programming and UML?
Scott H
2012-01-11 08:44:36 UTC
I have a question regarding OOP and UML.

Is this how it works, or can it be looked at this way:

Can I, as someone who wants a software program written in pure OOP, describe what I want to a developer, who in turn can create a requirements document?

Can that requirements document be turned into a UML document that contains how to build the classes that will make up the program? (fields, methods, relationships, etc...)

Can those UML files be turned over to other (and often unrelated) developers to create the actual/individual class files?

Once I have those, if built to the UML spec and unit tested to be bug free, can I put them together and have a working program?

The reason I ask, is that I am a novice programmer who has dealt with procedural languages and am looking to get into OOP. I want to understand why and how OOP software is (properly) built. I understand that each class file is in itself like a little program that instantiates objects that interact with other instantiated objects.

I want to test the idea that I could have random people build class files described from UML docs (and tested to be bug free according to their specification) and have them all work together? This is to test if the compartmentalization/encapsulation of a bunch of unique objects can work together.

So, theoretically, I could turn over my software “idea” to a developer who could create a requirements doc that would be further broken down to a UML doc that contains what classes to build, how to build them (fields/methods/relationships, etc...,), how they interact with each other. Once I had that – and it consisted of say 5 unique class files, and I wanted it written in Java, I could enlist 5 competent java developers (who may not know each other) and have them each write a single class file (along with the unit test code for a bug free class file) – put those class files together in the same directory and I would have a working program?

Is this the way it is done?

Thanks!
Three answers:
McFate
2012-01-11 09:02:38 UTC
Yes, it can be done that way. In my experience, usually a Business Analyst does the requirements working with the end-user. Then a Software Architect does the overall structure (which can be defined in UML), and then Developers code to it. In many cases, a code framework can be generated directly from the UML description, though a lot needs to be filled in afterward.



Also, I think the units that developers would work on would tend to be packages, rather than individual classes.



One other note: You can do things this way, but only for very simple "toy" projects will bug-free unit tests guarantee a bug-free whole. The complex interaction of the various classes needs to be worked out, and it may introduce bugs that are not apparent from the individual classes' definitions. There are likely to be issues to be worked out at integration time, but the unit-tests ensure that malfunctioning units are not the source of those higher-level issues.



@M
Julie
2016-05-16 11:18:42 UTC
An introduction to programming course will teach you the basic a key concepts in programming that you will require in nearly all the other programming courses that you take. Learning about control flow and basic programming will make your OO class so much more enjoyable and simple to understand as OO is simply an abstraction on data and functional programming methods. I would strongly recommend the Introduction to Programming course first as it will provide you with a solid basis on which to form the rest of your Information Technology knowledge.
chinna
2012-01-11 09:06:06 UTC
uml is power full it is mainly used for developing blue prints of the project ,we can generate code with the perfect uml diagram


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...