day68(struts web项目启动5.18)
2014-05-20 22:25
134 查看
天,不容易,只贴结果,过程迂回了,中间都不知道怎么贴了。是日志还是贴xml还是java程序。这是我的第一个web开发项目。
如今才解到弄好,开发与测试最大的区别在于,开发,更重结果,他们在乎,实现 这个事情。而测试才在意在间的一些细节。
从看软件测试的笔记到完成一个简单的struts框架的web项目的发布的结果这一路的笔记上,比较深的感受就是这一点。(PS:也许这也是为什么开发,和测试的氛围不同所在原因了。开发总是相对沉静的。静静的,静静的,上班时间鲜有人出来扯淡的。 测试总是热火朝天。
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/titter.gif)
开发们,都在潜心研究自己的技术。)
我的感受是,如果想做一个好的测试开发人员,你要具备的是,像开发一样沉下得学习,并研究和代码死磕到底的心,也要具备测试那个多方位思考,多渠道找原因的特质。具备两个测试和开发身上的最大的特质,才能成为一个合格的测试开发人员。
![](http://img.blog.csdn.net/20140520102318265?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxNDYxOTk0NA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
![](http://img.blog.csdn.net/20140520102542656?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxNDYxOTk0NA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
这种写法是错的,要注意。
package com.atguigu.app;
import java.util.*;
public class EqualTest {
public static void main (String[] args){
Employee alice1=new Employee("Alice Adams",75000,1987,12,15);
}
class Employee{
public Employee(String n,double s,int year,int month,int day){
name=n;
salary=s;
GregorianCalendar calendar=new GregorianCalendar(year,month-1,day);
hireDay=calendar.getTime();
}
}
private Object salary;
private Object hireDay;
private String name;
public String getName(){
return name;
}
public Object getSalary(){
return salary;
}
public Date getHireDay(){
return hireDay;
}
public void RaiseSalry(double byPercent){
double raise=salary*byPercent/100;
salary+=raise;
}
public boolean equals(Object otherObject){
if (this==otherObject) return true;
if (otherObject==null) return false;
if (getClass()!=otherObject.getClass())
return false;
Employee other=(Employee) otherObject;
return name.equals(other)
&&salary==other.salary
&&hireDay.equals(other.hireDay);
}
public int hashCode(){
return 7*name.hashCode()
+11*(double).hashCode()//double d = (double)2
+13*hireDay.hashCode();
}
public String toString(){
return getClass().getName()
+"[name=]"+name+",salary="+salary+",hirDay="+hireDay+"]";
}
class Manager extends Employee{
private int bonus;
public Manager(String n,double s,int year ,int month,int day){
super(n,s,year,month,day);
bonus=0;
}
public double gretSalary(){
double baseSalary=super.getSalary();
return baseSalary+bonus;
}
public void setBonus(double b){
bonus=(int) b;
}
public boolean equal(Object otherObject){
if (!super.equals(otherObject)) return false;
Manager other=(Manager) otherObject;
return bonus==other.bonus;
}
public int hashcode(){
return super.hashCode()
+17*new Double(bonus).hashCode();
}
public String toString(){
return super.toString()+"[bonus=]"+bonus+"]";
}
}
}
本来只有一个错,double d=(double)2,现在,将它按类,移到另的文件,一移,多了其它很几个错,只能将移回去。因为一些限制,和定义的缘故,错误还是存在,明早研究,今天晚上,省得明天起不来。
如今才解到弄好,开发与测试最大的区别在于,开发,更重结果,他们在乎,实现 这个事情。而测试才在意在间的一些细节。
从看软件测试的笔记到完成一个简单的struts框架的web项目的发布的结果这一路的笔记上,比较深的感受就是这一点。(PS:也许这也是为什么开发,和测试的氛围不同所在原因了。开发总是相对沉静的。静静的,静静的,上班时间鲜有人出来扯淡的。 测试总是热火朝天。
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/titter.gif)
开发们,都在潜心研究自己的技术。)
我的感受是,如果想做一个好的测试开发人员,你要具备的是,像开发一样沉下得学习,并研究和代码死磕到底的心,也要具备测试那个多方位思考,多渠道找原因的特质。具备两个测试和开发身上的最大的特质,才能成为一个合格的测试开发人员。
这种写法是错的,要注意。
package com.atguigu.app;
import java.util.*;
public class EqualTest {
public static void main (String[] args){
Employee alice1=new Employee("Alice Adams",75000,1987,12,15);
}
class Employee{
public Employee(String n,double s,int year,int month,int day){
name=n;
salary=s;
GregorianCalendar calendar=new GregorianCalendar(year,month-1,day);
hireDay=calendar.getTime();
}
}
private Object salary;
private Object hireDay;
private String name;
public String getName(){
return name;
}
public Object getSalary(){
return salary;
}
public Date getHireDay(){
return hireDay;
}
public void RaiseSalry(double byPercent){
double raise=salary*byPercent/100;
salary+=raise;
}
public boolean equals(Object otherObject){
if (this==otherObject) return true;
if (otherObject==null) return false;
if (getClass()!=otherObject.getClass())
return false;
Employee other=(Employee) otherObject;
return name.equals(other)
&&salary==other.salary
&&hireDay.equals(other.hireDay);
}
public int hashCode(){
return 7*name.hashCode()
+11*(double).hashCode()//double d = (double)2
+13*hireDay.hashCode();
}
public String toString(){
return getClass().getName()
+"[name=]"+name+",salary="+salary+",hirDay="+hireDay+"]";
}
class Manager extends Employee{
private int bonus;
public Manager(String n,double s,int year ,int month,int day){
super(n,s,year,month,day);
bonus=0;
}
public double gretSalary(){
double baseSalary=super.getSalary();
return baseSalary+bonus;
}
public void setBonus(double b){
bonus=(int) b;
}
public boolean equal(Object otherObject){
if (!super.equals(otherObject)) return false;
Manager other=(Manager) otherObject;
return bonus==other.bonus;
}
public int hashcode(){
return super.hashCode()
+17*new Double(bonus).hashCode();
}
public String toString(){
return super.toString()+"[bonus=]"+bonus+"]";
}
}
}
本来只有一个错,double d=(double)2,现在,将它按类,移到另的文件,一移,多了其它很几个错,只能将移回去。因为一些限制,和定义的缘故,错误还是存在,明早研究,今天晚上,省得明天起不来。
相关文章推荐
- 无法在Web服务器上启动调试,未将项目配置为进行调试.
- 试图运行项目时出错:无法在web服务器上启动项目得解决办法
- 试图运行项目时出错:无法在Web服务器上启动调试
- 试图运行项目时出错:无法在web服务器上启动项目得解决办法
- 无法在Web服务器上启动调试。未将项目配置为进行调试
- 项目的启动(struts+hibernate+spring)
- 试图运行项目时出错:无法在web服务器上启动项目
- 试图运行项目时出错:无法在web服务器上启动项目得解决办法
- 在基于Struts构架的Java Web项目中加入ICTCLAS分词
- 今天碰到试图运行项目时出错:无法在web服务器上启动调试.调试失败,因为没有启用集成windows身份验证
- 启动一个Rich Web Client的项目:Qomo OpenProject
- 无法在web服务器上启动项目另一种解决方法
- 无法在Web服务器上启动调试,未将项目配置为进行调试.
- 无法在Web服务器上启动调试,未将项目配置为进行调试
- 无法在WEB服务器上启动调试,未将项目配置为进行调试
- 试图运行项目时出错:无法在Web服务器上启动调试.
- “试图运行项目时出错:无法在 web 服务器上启动调试。” 的解决办法
- 无法在Web服务器上启动调试。未将项目配置为进行调试
- 试图运行项目时出错:无法在WEB服务器上启动调试,发送调试HTTP请求时发生服务器端错误。
- 无法在web服务器上启动调试,未将项目配置为进行调试_解决方案