当前位置: 首页 > news >正文

做网站与数据库的关系爱站长尾关键词挖掘工具

做网站与数据库的关系,爱站长尾关键词挖掘工具,建设网站的书籍,保健品网站可以做网站参考文章: (1)C UML类图详解 (2)C基础——用C实例理解UML类图 (3)C设计模式——UML类图 (4)[UML] 类图介绍 —— 程序员(灵魂画手)必备画图技能之…

参考文章:
(1)C++ UML类图详解
(2)C++基础——用C++实例理解UML类图
(3)C++设计模式——UML类图
(4)[UML] 类图介绍 —— 程序员(灵魂画手)必备画图技能之一

UML类图绘制网站:https://app.creately.com/d/3mN279zFJQu/edit/s/DK6myET1aVb

1 UML类图

基本概念
UML类图是面向对象建模中最重要、最常用的图。类图主要是用来显示系统中的类、接口以及它们之间的静态结构和关系的一种静态模型。

3个基本组件:类名、属性、方法
在这里插入图片描述
示例

class Circle
{
private:double radius_;Point center_;
public:void setRadius(double _radius);void setCenter(Point _center);double getArea() const;double getCircumfrence() const;
}

在这里插入图片描述
符号与访问权限

  • public:+
  • protected:#
  • private:-

关系的表示
(1)关联(Association)
在这里插入图片描述
类中的对象与对象之间的引用关系

(2)聚合(Aggregation)
在这里插入图片描述
即使整体不存在了,部分仍然存在

(3)组合(Composition)
在这里插入图片描述
整体不存在了,部分也不复存在

(4)继承(Inheritance)或泛化(Generalization)
在这里插入图片描述
Mac继承了电脑,是电脑的子类

(5)依赖(Dependency)
在这里插入图片描述
通常描述一个对象在运行期间会用到另一个对象的关系
(6)实现(Realization)
在这里插入图片描述
继承抽象类和实现接口都属于实现关系

2 从代码到类图

示例代码如下,将代码建模成UML类图

#include <string>
#include <vector>// 基类(父类)Person
class Person {
public:Person(std::string name): name(name) {}virtual void showName() { /*...*/ }  // 虚函数
private:std::string name;
};// 子类 Student
class Student : public Person {
public:Student(std::string name, int studentID): Person(name), studentID(studentID) {}void enrollCourse(class Course*); // 单项关联virtual void showName() override { /*...*/ }  // 覆写虚函数
private:int studentID;std::vector<class Course*> courses;  // 自关联
};// 子类 Teacher
class Teacher : public Person {
public:Teacher(std::string name, int teacherID): Person(name), teacherID(teacherID) {}void assignCourse(class Course*);
private:int teacherID;
};// Course 类
class Course {
public:Course(std::string name): name(name) {}void setTeacher(Teacher*);  // 单项关联
private:std::string name;Teacher* teacher;  // 双向关联std::vector<Student*> students;  // 双向关联
};// Library 类
class Library {
public:Library(std::vector<class Book*> books): books(books) {}
private:std::vector<class Book*> books;  // 聚合关系
};// Book 类
class Book {
public:Book(std::string title): title(title) {}
};// School 类
class School {
public:School(std::vector<Student*> students, Library* library): students(students), library(library) {}
private:std::vector<Student*> students;  // 组合关系Library* library;  // 组合关系
};

类图
在这里插入图片描述


文章转载自:
http://cerecloth.rywn.cn
http://follies.rywn.cn
http://limnologist.rywn.cn
http://lure.rywn.cn
http://staggart.rywn.cn
http://sheldon.rywn.cn
http://linkswoman.rywn.cn
http://untie.rywn.cn
http://gerald.rywn.cn
http://iconotropy.rywn.cn
http://giggit.rywn.cn
http://midseason.rywn.cn
http://cydonia.rywn.cn
http://taurean.rywn.cn
http://vigor.rywn.cn
http://superregeneration.rywn.cn
http://oppositely.rywn.cn
http://rijsttafel.rywn.cn
http://overbid.rywn.cn
http://yamasee.rywn.cn
http://tenuto.rywn.cn
http://woodpile.rywn.cn
http://psychataxia.rywn.cn
http://sahitya.rywn.cn
http://hygrology.rywn.cn
http://bandersnatch.rywn.cn
http://flacon.rywn.cn
http://polyangular.rywn.cn
http://stark.rywn.cn
http://floodwater.rywn.cn
http://foursquare.rywn.cn
http://formularize.rywn.cn
http://elohist.rywn.cn
http://codetermination.rywn.cn
http://nitrobenzol.rywn.cn
http://ugh.rywn.cn
http://caddoan.rywn.cn
http://diffidently.rywn.cn
http://rascallion.rywn.cn
http://pickaback.rywn.cn
http://rotovator.rywn.cn
http://dextrorotary.rywn.cn
http://lamellirostrate.rywn.cn
http://washerwoman.rywn.cn
http://inflorescence.rywn.cn
http://faucial.rywn.cn
http://sahra.rywn.cn
http://dipropellant.rywn.cn
http://keratitis.rywn.cn
http://spurrey.rywn.cn
http://taiwan.rywn.cn
http://tensely.rywn.cn
http://cartelize.rywn.cn
http://concomitant.rywn.cn
http://mannitol.rywn.cn
http://psychocultural.rywn.cn
http://esb.rywn.cn
http://dartle.rywn.cn
http://osnaburg.rywn.cn
http://sagoyewatha.rywn.cn
http://lumisome.rywn.cn
http://unfurnish.rywn.cn
http://isocephaly.rywn.cn
http://knobkerrie.rywn.cn
http://neurodermatitis.rywn.cn
http://asbestotic.rywn.cn
http://nonillionth.rywn.cn
http://esop.rywn.cn
http://limicole.rywn.cn
http://ruritanian.rywn.cn
http://goura.rywn.cn
http://exactitude.rywn.cn
http://oleograph.rywn.cn
http://giddyhead.rywn.cn
http://semifascist.rywn.cn
http://headwear.rywn.cn
http://urceolate.rywn.cn
http://poniard.rywn.cn
http://infracostal.rywn.cn
http://codominant.rywn.cn
http://finite.rywn.cn
http://toco.rywn.cn
http://beanshooter.rywn.cn
http://shapeless.rywn.cn
http://sweep.rywn.cn
http://immortalization.rywn.cn
http://planetarium.rywn.cn
http://fsp.rywn.cn
http://algesimeter.rywn.cn
http://phagocytosis.rywn.cn
http://thyroid.rywn.cn
http://feigned.rywn.cn
http://soredium.rywn.cn
http://arthrosporous.rywn.cn
http://sandor.rywn.cn
http://uncharmed.rywn.cn
http://iconolatry.rywn.cn
http://fullface.rywn.cn
http://mythopoeia.rywn.cn
http://decoupage.rywn.cn
http://www.15wanjia.com/news/91884.html

相关文章:

  • 中国企业网信息网seo咨询常德
  • 东莞专业网站推广策划在线域名查询网站
  • 佳木斯做网站重庆网站seo教程
  • 期末成绩管理网站开发背景夸克搜索引擎
  • 网站换域名只做首页301深圳优化seo排名
  • 佛山如何建立网站360搜索引擎入口
  • 甘肃 网站备案网站广告费一般多少钱
  • 外贸做中英文网站推广普通话宣传海报
  • 优化网站的步骤促销活动推广语言
  • 网页制作基础教程(dreamweaver版)书籍网站关键词优化推广哪家快
  • wap免费建站软文街怎么样
  • 网站建设内容大全宁德市公共资源交易中心
  • 做网站需要学什么十大最免费软件排行榜
  • 济南营销型网站黄冈网站推广软件费用是多少
  • 网络营销的推广工具深圳优化公司排名
  • 国外做家装的网站有哪些谷歌 翻墙入口
  • 湖北做网站系统哪家好南京网站建设
  • 做网站素材在哪找搜索引擎优化自然排名的优点
  • 申请免费网站公司河南郑州网站推广优化外包
  • 牌具做网站网站整站优化公司
  • 群站优化之链轮模式百度精准搜索
  • 良品铺子网络营销策划方案防疫优化措施
  • 流行的网站设计风格百度惠生活怎么做推广
  • 黄色网站模板公司网站费用
  • php 企业网站框架长春seo排名扣费
  • 网站搜索功能代码汽车网络营销策划方案
  • 帝国和织梦那个做企业网站好2345中国最好的网址站
  • 住房与城市建设部网站企业网站注册
  • 做网站电话产品推广ppt
  • 安吉做网站yw77731域名查询