个人冲刺(三)——体温上报app(二阶段)
冲刺任务:完成用户类、温度数据和第二页面类的编写
User.java
package com.example.helloworld; class User { private String username; private String userid; private String userphone; private String useraddress; @Override public String toString() { return "User{" + "username='" + username + '\'' + ", userid='" + userid + '\'' + ", userphone='" + userphone + '\'' + ", useraddress='" + useraddress + '\'' + '}'; } public User(String username, String userid, String userphone, String useraddress) { this.username = username; this.userid = userid; this.userphone = userphone; this.useraddress = useraddress; } public void setUsername(String username) { this.username = username; } public void setUserid(String userid) { this.userid = userid; } public void setUserphone(String userphone) { this.userphone = userphone; } public void setUseraddress(String useraddress) { this.useraddress = useraddress; } public String getUsername() { return username; } public String getUserid() { return userid; } public String getUserphone() { return userphone; } public String getUseraddress() { return useraddress; } }
WenData.java
package com.example.helloworld; public class WenDate { private String name; private String dateandtime; private String address; private String wendu; private String more; public WenDate(String name, String dateandtime, String address, String wendu, String more) { this.name = name; this.dateandtime = dateandtime; this.address = address; this.wendu = wendu; this.more = more; } public WenDate(){}; @Override public String toString() { return "WenDate{" + "name='" + name + '\'' + ", dateandtime='" + dateandtime + '\'' + ", address='" + address + '\'' + ", wendu='" + wendu + '\'' + ", more='" + more + '\'' + '}'; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDateandtime() { return dateandtime; } public void setDateandtime(String dateandtime) { this.dateandtime = dateandtime; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getWendu() { return wendu; } public void setWendu(String wendu) { this.wendu = wendu; } public String getMore() { return more; } public void setMore(String more) { this.more = more; } }
SecondActivity.java
package com.example.helloworld; import android.os.Bundle; import android.util.Log; import androidx.appcompat.app.AppCompatActivity; public class SecondActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.v("SecondActivity","SecondActivity启动"); setContentView(R.layout.activity_second); } }