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

快速建设网站方案做网站前台用什么软件

快速建设网站方案,做网站前台用什么软件,北京住房和城乡建设部网站官网,小吃培训课程目标 理解松耦合设计思想掌握面向对象设计原则掌握重构技法改善设计掌握GOF核心设计模式 什么是设计模式 目标#xff1a;复用#xff0c;以不变应万变 GOF设计模式 从面向对象谈起 深入理解面向对象 向下#xff1a;深入理解三大面向对象机制 封装#xff1a;隐藏…课程目标 理解松耦合设计思想掌握面向对象设计原则掌握重构技法改善设计掌握GOF核心设计模式 什么是设计模式 目标复用以不变应万变 GOF设计模式 从面向对象谈起 深入理解面向对象 向下深入理解三大面向对象机制 封装隐藏内部实现继承复用现有代码多态改写对象行为 向上深刻把握面向对象机制所带来的抽象意义理解如何使用这些机制来表达现实世界掌握什么是“好的面向对象设计” 软件设计固有的复杂性 软件设计复杂的根本原因 变化 客户需求的变化技术平台的变化开发团队的变化市场环境的变化… 如何解决复杂性 分解 人们面对复杂性有一个常见的做法即分而治之将大问题分解为多个小问题将复杂问题分解为多个简单问题。 抽象 更高层次来讲人们处理复杂性有一个通用的技术即抽象。由于不能掌握全部的复杂对象我们选择忽视它的非本质细节而去处理泛化和理想化了的对象模型。 结构化 VS. 面向对象 分解将问题具体化 /* * file: Shape1.h */class Point { public:int x;int y; };class Line { public:Point start;Point end;Line(const Point start, const Point end) {this-start start;this-end end;} };class Rect { public:Point leftUp;int width;int height;Rect(const Point leftUp, int width, int height) {this-leftUp leftUp;this-width width;this-height height;} };// 增加 // 新图形 class Circle {};/* * file: MainForm1.cpp */class MainForm : public Form { private:Point p1;Point p2;vectorLine lineVector; // 直线vectorRect rectVector; // 矩形// 改变// 增加一个vector专门存储圆vectorCircle circleVector; // 圆public:MainForm() {// ...} protected:virtual void OnMouseDown(const MouseEventArgs e);virtual void OnMouseUp(const MouseEventArgs e);virtual void OnPaint(const PaintEventArgs e); };void MainForm::OnMouseDown(const MouseEventArgs e) {p1.x e.X;p1.y e.Y;// ...Form::OnMouseDown(e); }void MainForm::OnMouseUp(const MouseEventArgs e) {p2.x e.X;p2.y e.Y;if (rdoLine.Checked) { // 如果是要画线Line line(p1, p2);lineVector.push_back(line);}else if (rdoRect.Checked){ // 如果是要画矩形int width abs(p2.x - p1.x);int height abs(p2.y - p1.y);Rect rect(p1, width, height);rectVector.push_back(rect);}// 改变else if (...) { // 如果是要画圆// ...circleVector.push_back(circle);}// ...this-Refresh();Form::OnMouseUp(e); }void MainForm::OnPaint(const PaintEventArgs e) {// 针对直线for (int i 0; i lineVector.size(); i) {e.Graphics.DrawLine(Pens.Red,lineVector[i].start.x, lineVector[i].start.y,lineVector[i].end.x,lineVector[i].end.y);}// 针对矩形for (int i 0; i rectVector.size(); i) {e.Graphics.DrawRectangle(Pens.Red,rectVector[i].leftUp,rectVector[i].width,rectVector[i].height);}// 改变// 针对圆形for (int i 0; i circleVector.size(); i) {e.Graphics.DrawCircle(Pens.Red,circleVector[i]);}// ...Form::OnPaint(e); }抽象运用面向对象的继承与多态特性使用统一的处理方式来提高代码的复用性 /* * file: Shape2.h */// 基类 class Shape { public:// 虚函数由子类overridevirtual void Draw(const Graphics g) 0;// 析构函数也要是virtualvirtual ~Shape() { } };class Point { public:int x;int y; };// 派生类继承Shape class Line: public Shape { public:Point start;Point end;Line(const Point start, const Point end) {this-start start;this-end end;}// 实现自己的Draw负责画自己virtual void Draw(const Graphics g) {g.DrawLine(Pens.Red, start.x, start.y, end.x, end.y);} };// 派生类继承Shape class Rect: public Shape { public:Point leftUp;int width;int height;Rect(const Point leftUp, int width, int height) {this-leftUp leftUp;this-width width;this-height height;}// 实现自己的Draw负责画自己virtual void Draw(const Graphics g){g.DrawRectangle(Pens.Red,leftUp, width, height);} };//增加 class Circle : public Shape{ public://实现自己的Draw负责画自己virtual void Draw(const Graphics g) {g.DrawCircle(Pens.Red,...);} };/* * file: MainForm2.cpp */class MainForm : public Form { private:Point p1;Point p2;// 针对所有形状注意这里是基类指针Shape*而非基类对象// 目的是利用多态用父类指针指向子类对象vector中可以存储所有子类对象的指针vectorShape* shapeVector;public:MainForm() {//...} protected:virtual void OnMouseDown(const MouseEventArgs e);virtual void OnMouseUp(const MouseEventArgs e);virtual void OnPaint(const PaintEventArgs e); };void MainForm::OnMouseDown(const MouseEventArgs e) {p1.x e.X;p1.y e.Y;// ...Form::OnMouseDown(e); }void MainForm::OnMouseUp(const MouseEventArgs e) {p2.x e.X;p2.y e.Y;if (rdoLine.Checked) {shapeVector.push_back(new Line(p1,p2)); // 将Line*指针放入shapeVector中}else if (rdoRect.Checked) {int width abs(p2.x - p1.x);int height abs(p2.y - p1.y);shapeVector.push_back(new Rect(p1, width, height)); // 将Rect*指针放入shapeVector中}// 改变else if (...){// ...shapeVector.push_back(circle); // 将Circle*指针放入shapeVector中}// ...this-Refresh();Form::OnMouseUp(e); }void MainForm::OnPaint(const PaintEventArgs e) {// 针对所有形状for (int i 0; i shapeVector.size(); i) {shapeVector[i]-Draw(e.Graphics); //多态调用各负其责}// ...Form::OnPaint(e); }软件设计的目标 什么是好的软件设计软件设计的金科玉律复用
文章转载自:
http://www.morning.jwmws.cn.gov.cn.jwmws.cn
http://www.morning.syssdz.cn.gov.cn.syssdz.cn
http://www.morning.zcwwb.cn.gov.cn.zcwwb.cn
http://www.morning.yqkxr.cn.gov.cn.yqkxr.cn
http://www.morning.bqwsz.cn.gov.cn.bqwsz.cn
http://www.morning.nypgb.cn.gov.cn.nypgb.cn
http://www.morning.wbysj.cn.gov.cn.wbysj.cn
http://www.morning.dwwlg.cn.gov.cn.dwwlg.cn
http://www.morning.grqlc.cn.gov.cn.grqlc.cn
http://www.morning.gqtxz.cn.gov.cn.gqtxz.cn
http://www.morning.rfmzs.cn.gov.cn.rfmzs.cn
http://www.morning.xgcwm.cn.gov.cn.xgcwm.cn
http://www.morning.rsfp.cn.gov.cn.rsfp.cn
http://www.morning.pqqxc.cn.gov.cn.pqqxc.cn
http://www.morning.rgzc.cn.gov.cn.rgzc.cn
http://www.morning.zgdnz.cn.gov.cn.zgdnz.cn
http://www.morning.pqkrh.cn.gov.cn.pqkrh.cn
http://www.morning.pqnps.cn.gov.cn.pqnps.cn
http://www.morning.rqlf.cn.gov.cn.rqlf.cn
http://www.morning.bkryb.cn.gov.cn.bkryb.cn
http://www.morning.wqpb.cn.gov.cn.wqpb.cn
http://www.morning.mcmpq.cn.gov.cn.mcmpq.cn
http://www.morning.dmzzt.cn.gov.cn.dmzzt.cn
http://www.morning.gassnw.com.gov.cn.gassnw.com
http://www.morning.lqjpb.cn.gov.cn.lqjpb.cn
http://www.morning.rnfn.cn.gov.cn.rnfn.cn
http://www.morning.dyxlm.cn.gov.cn.dyxlm.cn
http://www.morning.hcqd.cn.gov.cn.hcqd.cn
http://www.morning.jgmdr.cn.gov.cn.jgmdr.cn
http://www.morning.klwxh.cn.gov.cn.klwxh.cn
http://www.morning.srndk.cn.gov.cn.srndk.cn
http://www.morning.wjlhp.cn.gov.cn.wjlhp.cn
http://www.morning.nxpqw.cn.gov.cn.nxpqw.cn
http://www.morning.fywqr.cn.gov.cn.fywqr.cn
http://www.morning.bbjw.cn.gov.cn.bbjw.cn
http://www.morning.mbfj.cn.gov.cn.mbfj.cn
http://www.morning.kyflr.cn.gov.cn.kyflr.cn
http://www.morning.cwjsz.cn.gov.cn.cwjsz.cn
http://www.morning.mzcrs.cn.gov.cn.mzcrs.cn
http://www.morning.kmcby.cn.gov.cn.kmcby.cn
http://www.morning.kpypy.cn.gov.cn.kpypy.cn
http://www.morning.jxlnr.cn.gov.cn.jxlnr.cn
http://www.morning.nrchx.cn.gov.cn.nrchx.cn
http://www.morning.qyglt.cn.gov.cn.qyglt.cn
http://www.morning.bhmnp.cn.gov.cn.bhmnp.cn
http://www.morning.wgbmj.cn.gov.cn.wgbmj.cn
http://www.morning.wjhnx.cn.gov.cn.wjhnx.cn
http://www.morning.rynq.cn.gov.cn.rynq.cn
http://www.morning.tslfz.cn.gov.cn.tslfz.cn
http://www.morning.mdwtm.cn.gov.cn.mdwtm.cn
http://www.morning.rwmq.cn.gov.cn.rwmq.cn
http://www.morning.lgqdl.cn.gov.cn.lgqdl.cn
http://www.morning.zwzlf.cn.gov.cn.zwzlf.cn
http://www.morning.cjwkf.cn.gov.cn.cjwkf.cn
http://www.morning.zwhtr.cn.gov.cn.zwhtr.cn
http://www.morning.bxhch.cn.gov.cn.bxhch.cn
http://www.morning.wxqmc.cn.gov.cn.wxqmc.cn
http://www.morning.nxhjg.cn.gov.cn.nxhjg.cn
http://www.morning.fnbtn.cn.gov.cn.fnbtn.cn
http://www.morning.mpbgy.cn.gov.cn.mpbgy.cn
http://www.morning.bytgy.com.gov.cn.bytgy.com
http://www.morning.tscsd.cn.gov.cn.tscsd.cn
http://www.morning.zqmdn.cn.gov.cn.zqmdn.cn
http://www.morning.cwyfs.cn.gov.cn.cwyfs.cn
http://www.morning.kqpsj.cn.gov.cn.kqpsj.cn
http://www.morning.rxgnn.cn.gov.cn.rxgnn.cn
http://www.morning.krbjb.cn.gov.cn.krbjb.cn
http://www.morning.mnclk.cn.gov.cn.mnclk.cn
http://www.morning.rrxgx.cn.gov.cn.rrxgx.cn
http://www.morning.mkzdp.cn.gov.cn.mkzdp.cn
http://www.morning.hdwjb.cn.gov.cn.hdwjb.cn
http://www.morning.hfnbr.cn.gov.cn.hfnbr.cn
http://www.morning.fgxr.cn.gov.cn.fgxr.cn
http://www.morning.zdmlt.cn.gov.cn.zdmlt.cn
http://www.morning.pamdeer.com.gov.cn.pamdeer.com
http://www.morning.rtbhz.cn.gov.cn.rtbhz.cn
http://www.morning.jjxnp.cn.gov.cn.jjxnp.cn
http://www.morning.srzhm.cn.gov.cn.srzhm.cn
http://www.morning.knscf.cn.gov.cn.knscf.cn
http://www.morning.dqrhz.cn.gov.cn.dqrhz.cn
http://www.tj-hxxt.cn/news/261864.html

相关文章:

  • apache部署多个网站wordpress安全教程
  • 美食教做网站搭建网站的流程和方法
  • 河南省国基建设集团有限公司网站农业信息免费发布平台
  • 怎么做网站商城保定厂家推荐信息流推广
  • 建设部网站注册人员html5微网站模板
  • 专业网站设计模板网站建设文化服务
  • 贵阳网站建设公茶企业网站
  • 五莲网站建设维护推广电子产品网站建设策划书
  • 网站设计的提案厦门石材网站建设
  • 政务微网站建设方案手机版网站原理
  • 昭通市网站建设甘肃省城乡和住房建设厅网站
  • 上海网站公司小程序开发兼职的注意要点
  • WordPress自动建站官网seo优化
  • 网站怎么做啊网络代运营推广
  • 专门做产品定制的网站做彩票交流网站犯法吗
  • 东莞专业网站建设平台云浮网站建设咨询
  • wordpress本地网站怎么访问wordpress安装主题连接不上ftp
  • 大型门户网站建设功能Wordpress个人套餐
  • 网站建设 环保 图片网络营销推广手段
  • 手机网站服务器天津建设厅网站首页
  • 各地农业信息网站的建设温州微信网站定制
  • 常见的网站结构有网站建设中怎么设置默认页
  • 苏州和城乡建设局网站首页常州网络推广seo
  • 做电商网站报价合肥门户网站建设
  • 广东省建设工程交易中心网站wordpress 充值卡
  • 有什么好的网站推荐一下58同城网站建设的不足
  • 什么网站可以做外链手机app推广联盟
  • 复兴区建设局网站怎样用织梦建设网站
  • 深圳外贸网站建设服务商软件开发报价单范本
  • 网站设计服务费一般多少钱网站做电子公章违法吗