Basics: Convert Simple UML Class Diagram to Code


show more Class diagrams are representations of hierarchical and relational data among objects. This online training video covers the basics of converting class diagrams to code. Learn the step-by-step procedures of this intermediate level technical task in order to turn a simple UML class diagram to code in programming languages. show less
please wait ...

Converting class diagrams to code

We're focused on the ideas and concepts of object orientation here, but we never forget that the entire point is that we'll convert this into a programming language. And it can be useful to see just how close many of the languages are with these same concepts. So I have a very simple UML class diagram here with a couple of attributes and a couple of behaviors, because I want something I can demonstrate in just a few lines of code in several different languages. So, this will be a Spaceship class. It has two attributes, one is called name which is a String, and the other is shieldStrength which I've said here will be an Integer.

Name is public and shieldStrength is private, meaning it would be hidden from other objects directly. And it has two operations, two behaviors. They're both public. Fire is going to return us a string and reduceShields returns nothing or at least nothing that's written in this diagram and takes an Integer, very straightforward, very simple. Obviously, a ful...

Converting class diagrams to code
Video duration: 4m 57s 3h 1m Intermediate

Viewers:

Class diagrams are representations of hierarchical and relational data among objects. This online training video covers the basics of converting class diagrams to code. Learn the step-by-step procedures of this intermediate level technical task in order to turn a simple UML class diagram to code in programming languages.

Subject:
Developer
Software:
Java
Author:
please wait ...