主观题

阅读下列Java程序,回答下列问题。 [Java 程序] public int addAppTask(Activity activity, Intent intent, TaskDescription description, Bitmap thumbnail) { Point size = getSize1; //1 final int tw = thumbnail.getWidth1; final int th = thumbnail.getHeight1; if (tw != size.x || th != size.y){ //2,3Bitmap bm = Bitmap.createBitmap(size.x, size.y, thumbnail.getConfig1); //4 float scale; float dx = 0, dy = 0; if (tw * size.x > size.y * th){ //5 scale = (float) size.x / (float) th; //6 dx = (size.y - tw * scale) * 0.5f; } else { //7 scale = (float) size.y / (float) tw; dy = (size.x - th * scale) * 0.5f; } Matrix matrix = new Matrix1; matrix.setScale(scale, scale); matrix.postTranslate((int) (dx + 0.5f), 0); Canvas canvas = new Canvas(bm); canvas.drawBitmap(thumbnail, matrix, null); canvas.setBitmap(null); thumbnail = bm; } if (description == null) { //8 description = new TaskDescription1; //9 } } //102.1、请简述基本路径测试法的概念。(2分)2.2、请画出上述程序的控制流图,并计算其控制流图的环路复杂度V(G)。(8分)2.3、请给出问题2中控制流图的线性无关路径。(5分)

查看答案
该试题由用户860****91提供 查看答案人数:39733 如遇到问题请 联系客服
正确答案
该试题由用户860****91提供 查看答案人数:39734 如遇到问题请联系客服

相关试题

换一换
购买搜题卡 会员须知 | 联系客服
会员须知 | 联系客服
关注公众号,回复验证码
享30次免费查看答案
微信扫码关注 立即领取
恭喜获得奖励,快去免费查看答案吧~
去查看答案
全站题库适用,可用于E考试网网站及系列App

    只用于搜题看答案,不支持试卷、题库练习 ,下载APP还可体验拍照搜题和语音搜索

    支付方式

     

     

     
    首次登录享
    免费查看答案20
    微信扫码登录 账号登录 短信登录
    使用微信扫一扫登录
    登录成功
    首次登录已为您完成账号注册,
    可在【个人中心】修改密码或在登录时选择忘记密码
    账号登录默认密码:手机号后六位