栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

MVC系统实现:eclipse软件实现一个模型、两个视图和至少两个控制器的功能,程序界面及其功能如下图

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

MVC系统实现:eclipse软件实现一个模型、两个视图和至少两个控制器的功能,程序界面及其功能如下图

Plantuml工具绘制UML用例图、类图、顺序图。

 类图脚本:

@startuml
class SphereWindow [[java:SphereWindow]] {
    +SphereWindow()
    +actionPerformed(e: ActionEvent): void
    +{static} main(args: String[]): void
}
class Sphere {
}
SphereWindow --> "1" Sphere : sphere
class JFrame {
}
JFrame <|-- SphereWindow
interface ActionListener {
}
ActionListener <|.. SphereWindow
class TextController [[java:Controller.TextController]] {
    +TextController(sphere: Sphere)
    +actionPerformed(e: ActionEvent): void
}
class Sphere {
}
TextController --> "1" Sphere : sphere
class TextView {
}
TextController --> "1" TextView : textView
class TextView {
}
TextController --> "1" TextView : getTextView()
interface ActionListener {
}
ActionListener <|.. TextController
class GraphicController [[java:Controller.GraphicController]] {
    +GraphicController(sph: Sphere)
    +mouseReleased(e: MouseEvent): void
    #pointDistance(x1: double, y1: double, x2: double, y2: double): double
}
class Sphere {
}
GraphicController --> "1" Sphere : sphere
class GraphicsView {
}
GraphicController --> "1" GraphicsView : graphicView
class GraphicsView {
}
GraphicController --> "1" GraphicsView : getGranphicView()
class Sphere [[java:Model.Sphere]] {
    -radius: double
    -area: double
    -volume: double
    +Sphere()
    +getRadius(): double
    +getArea(): double
    +getVolume(): double
    +setRadius(radius: double): void
}
class Observable {
}
Observable <|-- Sphere
class GraphicsView [[java:View.GraphicsView]] {
    -radius: double
    +x: int
    +y: int
    +bShowDim: boolean
    ~radiusJpanel: JPanel
    +GraphicsView()
    +paint(g: Graphics): void
    +update(o: Observable, arg: Object): void
}
class JPanel {
}
JPanel <|-- GraphicsView
interface Observer {
}
Observer <|.. GraphicsView
class TextView [[java:View.TextView]] {
    -radiusLab: JLabel
    -radiusTextField: JTextField
    -areaLab: JLabel
    -areaTextField: JTextField
    -volumeLab: JLabel
    -volumeTextField: JTextField
    +TextView()
    -Init(): void
    +update(o: Observable, arg: Object): void
    +addActionListener(controler: TextController): void
}
class JPanel {
}
JPanel <|-- TextView
interface Observer {
}
Observer <|.. TextView
@enduml

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/988463.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号