자바 용 클래스 다이어그램을 디자인하는 것을 배우고 있는데 이것이 첫 번째 시도입니다. 괜찮은지 말해 줄래. 여기 자바 클래스 다이어그램
여기에 내가 Visio에서 전문 사용하여 그린 그림의 소스 코드public class DiceRoll1 extends JFrame implements ActionListener {
private JTextField txtNotation;
private JButton btRoll, btShuffle;
private List<Integer> dealtCard;
private History history;
public DiceRoll1() {
initComponents();
dealtCard = new ArrayList<>();
history = new History();
}
public void initComponents() {
//designing the userform
setSize(400, 500);
setLayout(new FlowLayout());
setTitle("Dice Roll");
txtNotation = new JTextField("2d6");
btRoll = new JButton("Roll");
btShuffle = new JButton("Shuffle");
txtNotation.setColumns(20);
getContentPane().add(txtNotation);
getContentPane().add(btRoll);
getContentPane().add(btShuffle);
btRoll.addActionListener(this);
btShuffle.addActionListener(this);
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
new DiceRoll().setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
JButton source = (JButton) e.getSource();
if (source.equals(btRoll)) {
} else if (source.equals(btShuffle)) {
}
}
public void displayOutput(String message) {
System.out.println(message);
}
}
입니다 :
MagicDraw 또는 Sparx EA와 같은 전문 도구의 평가판을 다운로드하는 것이 좋습니다. 이러한 도구를 사용하면 올바른 UML을 쉽게 만들 수 있습니다. 영업 담당자에게 질문하면 일반적으로 제한없이 더 긴 평가 기간을 제공합니다. –
@ JimL에 감사드립니다. –