zoukankan      html  css  js  c++  java
  • 2017《面向对象程序设计》课程作业四

    2017《面向对象程序设计》课程作业四

    on 类

    class CExpression
    {
     public:
      RandomNumber();
      RandomOperator();
      SetNumber();
      SetOperator();
      GetExpression();
     private:
      int num;
      int operator;
      string expression;
    };
    

    Control 类

    class CControl
    {
      public:
        JudgeExpression();
        JudgeResult();
        JudgeFilePath();
        JudgeIfRight();
    };
    

    Scan 类

    class CScan
    {
     public:
     TatisticalAnswers();
     ChooseLanguage();
     ScanfEAndExit(); 
     private:
      int wrong;
      int right;
    }
    

    File 类

    class CFile
    {
      public:
      ReadFile();
      PrintFile();
      private:
      string InputFilePath;
      string OutputFilePath;
    }
    

    感受

    既然设置类的功能

    是为了使功能相对的独立

    只要调用接口就可以得到相应的事情

    那么   在主函数再调用一个生成随机数的函数。。。然后再赋值给成员变量。。。

    这不是就。。。还是主函数控制。。。

  • 相关阅读:
    c# 并行运算二
    c# 并行运算
    Task+http请求
    Task多线程
    SSO系统认证
    web系统权限设计
    AutoMapper的使用
    中间件
    express-middleware
    中间件概念
  • 原文地址:https://www.cnblogs.com/linshen/p/6853715.html
Copyright © 2011-2022 走看看