导航
您当前的位置:首页 > 计算机 > 软件水平
问题:

[问答题] 阅读下列Java程序,回答下列问题。[Java 程序]public int addAppTask(Activity activity, Intent intent,TaskDescription description, Bitmap thumbnail) {Point size = getSize1; //1final 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); //4float scale;float dx = 0, dy = 0;if (tw * size.x > size.y * th) { //5scale = (float) size.x / (float) th; //6dx = (size.y - tw * scale) * 0.5f;} else { //7scale = (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) { //8description = new TaskDescription1; //9}} //101、请简述基本路径测试法的概念。2、请画出上述程序的控制流图,并计算其控制流图的环路复杂度vfG.。3、请给出问题2中控制流图的线性无关路径。
答案解析:

您可能感兴趣的问题
相关问题
关于我们 | 用户指南 | 版权声明 | 给我留言 | 联系我们 | 积分商城 | 答案求助 | 网站地图
Copyright © 2024 www.daanwo.com All Rights Reserved