日考19单元

master
陈思豪 2024-08-08 09:33:47 +08:00
commit 476157cd3f
5 changed files with 143 additions and 0 deletions

38
.gitignore vendored 100644
View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

17
pom.xml 100644
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.bwie</groupId>
<artifactId>day-19</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -0,0 +1,26 @@
package com.bwie;
import com.bwie.domain.Student;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Student student1 = new Student(1, "规定火锅", "12", "82.11");
Student student2 = new Student(2, "凡已经", "15", "58.7");
Student student3 = new Student(3, "一天", "12", "35.7");
Student student4 = new Student(4, "交易合同", "", "101");
Student student5 = new Student(5, "今天", "", "85.45");
ArrayList<Student> students = new ArrayList<>();
students.add(student1);
students.add(student2);
students.add(student3);
students.add(student5);
students.add(student4);
for (Student student : students) {
System.out.println(student.getId()+student.getName()+student.getKm()+student.getScore());
}
}
}

View File

@ -0,0 +1,52 @@
package com.bwie.domain;
public class Student {
private Integer id;
private String name;
private String km;
private String score;
public Student() {
}
public Student(Integer id, String name, String km, String score) {
this.id = id;
this.name = name;
this.km = km;
this.score = score;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getKm() {
return km;
}
public void setKm(String km) {
this.km = km;
}
public String getScore() {
return score;
}
public void setScore(String score) {
this.score = score;
}
}

View File

@ -0,0 +1,10 @@
package com.bwie.service;
import com.bwie.domain.Student;
public class StudentService {
}