class Player {

 private:

  int health; //these are the attributes

  int strength;

  int agility;









 public:

void move();

void attackEnemy(); //these are the method prototypes

void getTreasure();





};





Every Player object which gets created has three integers called health, strength and agility for its attributes.





The methods we can perform on a Player object are move, attackEnemy and getTreasure.

最新文章

  1. Windows Azure Storage (19) 再谈Azure Block Blob和Page Blob
  2. 说说设计模式~观察者模式(Observer)
  3. MYSQL:使用\G参数改变输出结果集的显示方式
  4. 【leetcode】Surrounded Regions
  5. ASP.Net Web.config 中引用外部config文件
  6. Vue基础---->VueJS的使用(二)
  7. thinkphp分页效果的制作,按查询条件分页正确做法
  8. nssm在windows服务器上部署nodejs,coffee启动方式
  9. java使用jacob将office转pdf
  10. SAO总结
  11. poj 1695 动态规划
  12. python生成html文件浏览器中文显示乱码问题
  13. Android 官方文档:(二)应用清单 —— 2.26 <uses-permission>标签
  14. 2761: [JLOI2011]不重复数字(平衡树)
  15. React入门---JSX内置表达式-6
  16. for循环 重点题
  17. 【转载】js常用方法和片段
  18. 发布时一键添加html中的css标签和script标签版本号来防止浏览器缓存
  19. 小甲鱼Python第十七讲课后习题
  20. LiveCharts文档-3开始-3类型和设置

热门文章

  1. Dark roads--hdoj
  2. BZOJ 1507 splay
  3. LeetCode Weekly Contest 22
  4. SqlServer显示“正在还原...”
  5. python 模块导入详解
  6. 大白话理解this
  7. Android Fragment 初步解析
  8. windows server 2008 不能执行bat
  9. 【Oracle】审计
  10. FAQ: SBS 2011. The Windows SBS Manager service terminated unexpectedly