1.12306手机APP软件测评
首先是软件界面,iPhone版本和android版本长得是一模一样,虽然是注重功能的软件,但是一样样的界面让人完全感受不到软件设计者的诚意啊。
还有就是软件图片和图标,图片logo基本看不出来是什么这就不说了,关键是图标让人感觉跟手机里面其他的图标放在一起总觉得很不合群的样子。包括颜色、高光效果还有图标边缘圆角的弧度,反正就是各种看着不舒服,总担心它不能跟手机里其他图标和谐相处样子。
其次是软件性能,其实吧界面做的好不好看,能不能让人感受到软件设计者满满的诚意这些问题都并不是特别特别重要,最关键的是软件的性能。然而,由于铁路12306客户端使用的是混合app的开发方法,虽然使得这一套代码可以跨ios、android平台使用,但是给用户的体验就是---页面“有点”卡,相应“有点”慢,用户体验各种不好。
2.计算器程序
计算器类counter
public class counter {
private float number1;
private float number2;
private float result;
private Operator op;
public float getNumber1() {
return number1;
}
public void setNumber1(float number1) {
this.number1 = number1;
}
public float getNumber2() {
return number2;
}
public void setNumber2(float number2) {
this.number2 = number2;
}
public float getResult() {
return result;
}
public void setResult(float result) {
this.result = result;
}
public Operator getOp() {
return op;
}
public void setOp(Operator op) {
this.op = op;
}
public void cal(){
if (op == Operator.add) {
result = number1 + number2;
System.out.println("/***********add*************/");
System.out.println("number1+number2:");
}
else if (op == Operator.sub) {
result = number1 - number2;
System.out.println("/***********sub*************/");
System.out.println("number1-number2:");
}
else if (op == Operator.mul) {
result = number1 * number2;
System.out.println("/***********mul*************/");
System.out.println("number1*number2:");
}
else if (op == Operator.div) {
if (number2 == 0) {
System.out.println("error!!!\nnumber2 can not be 0");
return;
}
result = number1 / number2;
System.out.println("/***********div*************/");
System.out.println("number1/number2:");
}
this.result=result;
System.out.println("result="+this.result);
System.out.println(">>>>>>>>>>>end "+this.op+"<<<<<<<<<<<");
System.out.println("");
}
}
枚举类operator
public enum Operator {
add,
sub,
mul,
div
}
主函数main
import java.rmi.server.Operation;
import java.util.Scanner;
import javax.management.openmbean.OpenDataException;
public class main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
counter counter=new counter();
Scanner in =new Scanner(System.in);
System.out.println("please enter 2 number:");
float number1=in.nextFloat();
float number2=in.nextFloat();
counter.setNumber1(number1);
counter.setNumber2(number2);
counter.setOp(Operator.add);
counter.cal();
counter.setOp(Operator.sub);
counter.cal();
counter.setOp(Operator.mul);
counter.cal();
counter.setOp(Operator.div);
counter.cal();
counter.cal();
}
}