report

WC final report for mbaxswx3

Overview

Requirement met:

  • Counting lines, words, bytes, chars and the number of longest sentences.
  • Supporting different input files.
  • Supporting different combination of flags(-l,-w,-c,-m,-L)
  • Verifying illegal options.
  • Calculating total result for multiple input files.
  • Displaying version and manual information.
  • Supporting ' Stdin ' mode with a combination of flags.

Requirement missed:

  • flags from -lwc, -lm etc.

Product: Design and implementation

  • Architecture:
    The wc.py follows the MVC design pattern:
  1. Controller Layer: The argparse module receives parameters from users and then to determine which function should be called.
  2. Model Layer: The functions(countLine, countWord and countBytes) are responsible to count the correct result of input files.
  3. View Layer: The displaying function(miniwc1,miniwc2 etc) receives the data from Model Layer and then print it out on the terminal

Source code metrics

As for the input data, it is suitable to give various types of data in order to test the robustness under different situations to the software.
separating each output variable by using \t tag.
Sometimes forget some possible combinations of different flags

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 接下来几天妈妈灵感爆发,画出了几张让我感到意外的作品。那个花瓶如果没有那圈红边边就更完美啦! 那天妈妈说没东西画,...
    梅子鱼阅读 3,957评论 1 4
  • 早已习惯了走,习惯了跑,到哪都会看到不一样的风景,也许别人看来在普通不过的街道、灯光、车流在我眼里都是别致的一景,...
    suyuan1992阅读 1,612评论 0 0
  • 我知道春雨的心事 在微风下 田野上的绿意盎然里 给农夫一个硕果累累的梦 我知道落日的心事 在倦鸟的心头刻一抹晚霞 ...
    河水悠悠小蒋阅读 2,435评论 12 14
  • 吸引成交第六重天:当下我允许(超载你的放任配套) 共四题 1.XX,成交只需吸引来一个对的人,你认同这种说法吗?为...
    贵州省心协阅读 4,042评论 0 0

友情链接更多精彩内容