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

[问答题] [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、请画出上述程序的控制流图,并计算其控制流图的环路复杂度V(G)。2.3、请给出问题2中控制流图的线性无关路径。
答案解析:

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