面向对象程序设计-2020级 (南京信息工程大学)

  • 实验四

    task2.cpp #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : just as a
    suanmeitang   2021-11-27 16:00   0   7
  • 实验4 继承

    实验任务2 修改前: #include <iostream> #include <typeinfo> class Graph { public: void draw() { std::cout << "Graph::draw() : just as an interface\n"; } }; cla
    Rougesss   2021-11-27 15:34   0   8
  • 实验4 继承

    实验任务2 #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: virtual void draw() { std::cout << "Graph::draw() : just
    sensenzd   2021-11-27 15:26   1   8
  • 实验4 继承

    task2.cpp #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : just as a
    Ksan   2021-11-27 15:19   0   4
  • 实验四

    #ifndef BATTERY_HPP #define BATTERY_HPP class Battery { private:double capacity; public:Battery(double ca = 70) :capacity(ca) {} double get_capacity()
    小小埋   2021-11-27 13:38   0   2
  • 实验四 继承

    task 2 未修改前: #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : just a
    小笙儿的妙妙   2021-11-27 12:47   0   12
  • 实验四 继承

    任务二 源代码 task2.cpp #include<iostream> #include<typeinfo> class Graph { public: void draw() { std::cout << "Graph::draw() : just as an interface\n"; } }
    Popcorn_ZSJ   2021-11-27 09:17   0   3
  • 实验四 继承

    任务2 源代码 task2.cpp #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : j
    RickyChan_Jan   2021-11-27 09:17   0   3
  • 实验四 继承

    task2 验证性实验 认识virtual的使用 1.基类函数成员draw前未加virtual 1 #include<iostream> 2 #include<typeinfo> 3 4 //definition of Graph 5 class Graph 6 { 7 public: 8 void
    海浩河   2021-11-26 23:56   0   5
  • 实验四 类的继承

    一、 task2程序源码: #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : just
    无心+之举   2021-11-26 21:22   0   2