# Help with UML diagram

Printable View

• 03-28-2013, 11:18 AM
Patricia6946
Help with UML diagram
Hello, im quite new to java and we need to create UML diagrams to all of our java codes for school. My problem is that i dont even know how to begin.
Our books isnt helping much and neither google. Can someone give me an example of how to make an UML diagram from this code below so that i can understand how to do it. I dont even understand when to use class diagram or any of the other... feel really lost and my teachers do not help much :(

import java.text.DecimalFormat;
import java.util.Scanner;
import java.lang.Math;
public class Cylinder {

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
DecimalFormat df = new DecimalFormat ("0.00");
double radie,höjd,area,volym;
System.out.println("radie");
radie=sc.nextDouble();
System.out.println("höjd");
höjd=sc.nextDouble();
area =2*Math.PI*radie*höjd;

System.out.println("Arean är : " + df.format (area));

volym=Math.PI*Math.pow(radie,2)*höjd;
System.out.println("Volymen är :" + df.format(volym));

}
}

thanks in advance
• 03-28-2013, 06:09 PM
DarrylBurke
Re: Help with UML diagram
Do we have to tell you about the code tags every time? And are you planning to abandon this thread just like you did the other one?
http://www.java-forums.org/new-java/...tml#post322242

db
• 03-29-2013, 01:21 PM
Patricia6946
Re: Help with UML diagram
I didnt abandon the thread... maybe before you accuse me of something you can ask what happened. I was without internet for months because i had to move out from the flat i was staying in and look for a new place to stay. It took months and i had to live with a friend that didnt have internet.
So wanna continue to be rude? And im asking about the UML diagram now and nothing else. If you dont want to help me its ok, ill figure it out eventually. I dont need a hostile environment like this one