java-gui编程 GUI的组件1.窗口、弹窗、面板、文本框、列表框、按钮、图片、监听事件一、简介GUI的核心技术:Swing、AWT1.界面不美观 2.需要jre目的:1.写出需要的小工具 2.了解MVC、了解监听二、AWT1.AWT简介:有很多接口和类2.元素:...
java-面向对象 一、对象与类1.面向对象的本质:以类的方式组织代码,以对象的组织封装数据2.特性:抽象(共性)、封装、多态、继承3.现实:先有对象,后有类;实际上,先有类,才有对象类是模板(抽象),对象是一个具体的实例类:静态的属性,动态的行为4.方法:静态方法:直接类.方法调用动态方法:实例化这个类package com;public class wjm10 { public static void main(String[] args) { .
java基础(续) 一、Java方法1.方法=函数方法最好只完成一个功能Java只有值传递2.方法的重载名字可以相同,但是参数列表(类型、个数、排列顺序)必须不同,返回类型可相同也可不同,仅仅返回类型不同是不可以的3.不定项参数在参数类型后加一个... static void printMax(double ...numbers) { if(numbers.length==0) { System.out.print("no");
Java基础 一、注释二、标识符命名只能以大写字母、小写字母、_、$开头,且大小写敏感三、数据类型1.基本数据类型:byte、short、int、long(数值后要加L)float、doublechar(一个单纯的字符)booleanString不是基本数据类型,是个类2.引用类型类、接口、数组3.整数拓展二进制0b八进制0十六进制0x避免用浮点数进行比较强制转换:所有的字符本质还是数字转义字符:\t=tab4.类型转换1.强制类型转换:
CCF-窗口 问题描述 在某图形操作系统中,有 N 个窗口,每个窗口都是一个两边与坐标轴分别平行的矩形区域。窗口的边界上的点也属于该窗口。窗口之间有层次的区别,在多于一个窗口重叠的区域里,只会显示位于顶层的窗口里的内容。 当你点击屏幕上一个点的时候,你就选择了处于被点击位置的最顶层窗口,并且这个窗口就会被移到所有窗口的最顶层,而剩余的窗口的层次顺序不变。如果你点击的位置不属于任何窗口,则系统会忽略你这...
软件测试期末复习 一、语句覆盖、条件覆盖、判定覆盖、判定条件覆盖、条件组合覆盖的定义与区别语句覆盖:所有的“语句”都要覆盖一遍判定覆盖:包含语句覆盖,每个判断T、F各一次条件覆盖:包含语句覆盖,每个条件T、F各一次判定条件覆盖:包含判定覆盖、条件覆盖条件组合覆盖:每个条件的每种组合路径覆盖:所有执行路径二、具体分析与方式1语句覆盖使所有的判断语句都能执行一次的条件案例,例如当判断...
将word文档中的代码段图形化的方法 1.打开谷歌浏览器输入http://www.planetb.ca/syntax-highlight-word2.选择相应的代码段然后复制粘贴生成,再将其复制到word文档里即可注意,只能用谷歌浏览器。效果图:...
PTA-1014 Waiting in Line (30 分) Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space...
PTA-1013 Battle Over Cities (25 分) It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee...
PTA-1012 The Best Rank (25 分) To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - Eng...
PTA-1011 World Cup Betting (20 分) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Si...
PTA-1010 Radix (25 分)(部分正确) Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive inte...
PTA-1009 Product of Polynomials (25 分) This time, you are supposed to find A×B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the informa...
PTA-1008 Elevator (20 分) The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 sec...
PTA-1007 Maximum Subsequence Sum (25 分) Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequen...
PTA-1006 Sign In and Sign Out (25 分) At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you...
PTA-1005 Spell It Right (20 分) Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Eac...
PTA-1003 Emergency (25 分) As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the l...
PTA-1002 A+B for Polynomials (25 分) This time, you are supposed to find A+B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the informa...
PTA-1001 A+B Format (20 分) Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input ...