C#讲义第五讲继承、多态.pptxVIP

  • 0
  • 0
  • 约1.1千字
  • 约 36页
  • 2017-07-16 发布于四川
  • 举报
第五讲 继承、多态 ;类的继承;5.1 类的继承;;;;5.1.2 继承的实现;C#中继承的特点:;;;5.2 类与类之间的关系;;;;;;Public class Order { ?????? Public ListProduct order; Public?void?AddOrder(Product product ) ?????? { ????????????? order.Add(product); }???????????? } Public Class Product { } ;;;;;;5.3 多态;;;;;;;;例:分析以下程序的运行结果。 using System; namespace Test { class Student { protected int no;  //学号 protected string name; //姓名 protected string tname; //班主任或指导教师 public void setdata(int no1, string name1,string tname1) { no = no1; name = name1;tname=tna

文档评论(0)

1亿VIP精品文档

相关文档