zoukankan      html  css  js  c++  java
  • 软件测试实验二

    3,(1)把一个英语句子中的单词次序颠倒后输出。例如输入“how are you”,输出“you are how”;

    (2)编写单元测试进行测试;

    (3)用ElcEmma查看代码覆盖率,要求覆盖率达到100%。

                import java.util.Scanner;

                public class NewDemo {

                public static void main(String [] a){

                Scanner in=new Scanner(System.in);

                while(true){

                String s=in.nextLine();

                if(s.equalsIgnoreCase("quit")){

                System.exit(0);

                }

                String[] ss=s.split("\s+");

                StringBuffer sb=new StringBuffer();

                for (int i=ss.length-1;i>=0;i--){

                sb.append(ss[i]+" ");

                }

                System.out.println(sb);

                }

                }

    }

     

  • 相关阅读:
    初识echarts
    深浅拷贝的理解
    react基本语法及组件
    webpack使用
    网上面试资料整理
    封装原生promise函数
    vue路由懒加载及组件懒加载
    译文---C#堆VS栈(Part Four)
    译文---C#堆VS栈(Part Three)
    译文---C#堆VS栈(Part Two)
  • 原文地址:https://www.cnblogs.com/Maxine-zmx/p/5327265.html
Copyright © 2011-2022 走看看