首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > C/C++ > My understanding of Object Oriented C++
【标  题】:My understanding of Object Oriented C++
【关键字】:My,understanding,of,Object,Oriented,C++
【来  源】:http://blog.csdn.net/yangjeep/archive/2007/01/29/1497472.aspx

My understanding of Object Oriented C++

If we say the thinking in Procedual programming C++ is to find out what we will do first, we can understand the OOP in this way:
Think about what we will do with in the procedual first. For instance, we want to build up a management program. So the basic element in this software is the employees. Thus we have the first class which focus on the instances, the people. Then let's think the method of the employees. A human should have his/her name. So set a public character string of name. Then, as a employee he/she should have an ID number. So set a integer variable to record ID. And that's it. We can just develop the software at the very begining like this. (JUST THE BACKBONES AT FIRST, it is also an advantage of OOP^^.)
Secondly we gonna build the method. First we have to make sure the validation of the ID number. What if the user input an wrong number or alphabet charactor? In case, we build a function isIDvalid() to solve this problem. We build the function in the class. When user want's to check they just input their information and the method can autometically check the validation.
At last, we set the main method. The main function call the class and its method, then the software runs. And that's it.
By try this we can obtain a conclusion. In object oriented programming, we firstly consider the class and the object, then we build the method later. And if we want to update the algrithm we just write the derived class. The derived class will obtain all the properties and methods within its bases class, and it owns its new methods. Thus we update the software~
 
如何用WINX实现可滚动的窗口(ScrollWindow):【上一篇】
什么是迭代跟递归算法?二者有什么区别?:【下一篇】
【相关文章】
  • 解决配合pmyadmin无法登陆问题
  • MYSQL字符串处理,比较全。
  • Jprofiler 监测远程linux jboss
  • sychronized的使用以及object lock
  • MyEclipse5.1的注册号
  • 获得当前系统时间(C/C++)
  • 用C++编写跨平台程序
  • Linux下安装Mysql5.0
  • C++总结(二)---gcc知识(一)
  • 从VC++到GCC移植:谈两者的语法差异
  • 【随机文章】
  • GridView数据服务器控件用法
  • 调试ASP脚本
  • usb structs
  • 一通进销存李翔鹏修改版2软件注册工具
  • [Diary]难得心情好
  • FreeBSD 安全 HOWTO
  • 五分钟学做Web服务器
  • C#起始屏的制作
  • asp中access到sql server导入升级后要做的工作。
  • smart at java(1)
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.