文件名称:CodeAnalyazer
介绍说明--下载内容来自于网络,使用问题请自行百度
掌握 Java 语言的字符串处理、文本文件的读写。
编写一个类名为 JavaCodeAnalyzer 的类,实现以下功能:
<1> 该类可以以一个 Java 源程序文件名创建一个对象,如果文件不存在,或扩展名不
是“ .java”,应提示文件错误;
<2> 对该源程序文件进行分析其中的: 代码行数、注释行数和空行数。
<3> 统计并按从多到少输出出现次数最多的 5 个关键字及其出现次数。
<4> 统计分析的结果输出到名为: result.txt 的文本文件中。
<5> 测试时要通过以 Java7 的 String 类的源码测试。(Master the string processing of Java language, read and write text files.
Write a class named JavaCodeAnalyzer to implement the following functions:
<1> this class can create an object with a Java source file name, if the file does not exist, or the extension does not
It is ".Java" and should be prompted for file errors;
<2> analyzes the source file: code line number, number of annotation lines, and empty line number.
<3> statistics and the most frequent occurrences of 5 key words and their occurrences from many to less.
The result of <4> statistical analysis is exported to the text file named result.txt.
<5> test through the Java7 String class source test.)
编写一个类名为 JavaCodeAnalyzer 的类,实现以下功能:
<1> 该类可以以一个 Java 源程序文件名创建一个对象,如果文件不存在,或扩展名不
是“ .java”,应提示文件错误;
<2> 对该源程序文件进行分析其中的: 代码行数、注释行数和空行数。
<3> 统计并按从多到少输出出现次数最多的 5 个关键字及其出现次数。
<4> 统计分析的结果输出到名为: result.txt 的文本文件中。
<5> 测试时要通过以 Java7 的 String 类的源码测试。(Master the string processing of Java language, read and write text files.
Write a class named JavaCodeAnalyzer to implement the following functions:
<1> this class can create an object with a Java source file name, if the file does not exist, or the extension does not
It is ".Java" and should be prompted for file errors;
<2> analyzes the source file: code line number, number of annotation lines, and empty line number.
<3> statistics and the most frequent occurrences of 5 key words and their occurrences from many to less.
The result of <4> statistical analysis is exported to the text file named result.txt.
<5> test through the Java7 String class source test.)
相关搜索: 面向对象程序设计
Java源代码分析程序
(系统自动生成,下载前可以参看下载内容)
下载文件列表
CodeAnalyazer
CodeAnalyazer\Homework
CodeAnalyazer\Homework\CodeAnalyazer.class
CodeAnalyazer\META-INF
CodeAnalyazer\META-INF\MANIFEST.MF
CodeAnalyazer\Homework
CodeAnalyazer\Homework\CodeAnalyazer.class
CodeAnalyazer\META-INF
CodeAnalyazer\META-INF\MANIFEST.MF
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.