日考8_7
commit
b234946f4d
|
@ -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
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AnalysisProjectProfileManager">
|
||||||
|
<option name="PROJECT_PROFILE" />
|
||||||
|
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
|
||||||
|
<list size="0" />
|
||||||
|
</component>
|
||||||
|
<component name="SuppressionsComponent">
|
||||||
|
<option name="suppComments" value="[]" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
# 默认忽略的文件
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# 基于编辑器的 HTTP 客户端请求
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="PROJECT" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CodeInsightWorkspaceSettings">
|
||||||
|
<option name="optimizeImportsOnTheFly" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="MavenProjectsManager">
|
||||||
|
<option name="originalFiles">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
<component name="SuppressionsComponent">
|
||||||
|
<option name="suppComments" value="[]" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AnalysisProjectProfileManager">
|
||||||
|
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||||
|
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
|
||||||
|
<scopes />
|
||||||
|
<profiles>
|
||||||
|
<profile profile_name="Project Default" version="1.0" is_locked="false" />
|
||||||
|
</profiles>
|
||||||
|
<list size="0" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -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>rikao8_7</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>
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.bwie;
|
||||||
|
|
||||||
|
//TIP 要<b>运行</b>代码,请按 <shortcut actionId="Run"/> 或
|
||||||
|
// 点击装订区域中的 <icon src="AllIcons.Actions.Execute"/> 图标。
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,73 @@
|
||||||
|
package com.bwie.pojo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class Tar {
|
||||||
|
private BigDecimal num= BigDecimal.valueOf(1);
|
||||||
|
private BigDecimal num2=BigDecimal.valueOf(3);
|
||||||
|
private BigDecimal num3=BigDecimal.valueOf(5);
|
||||||
|
private BigDecimal num4=BigDecimal.valueOf(6);
|
||||||
|
|
||||||
|
|
||||||
|
public Tar() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Tar(BigDecimal num, BigDecimal num2, BigDecimal num3, BigDecimal num4) {
|
||||||
|
this.num = num;
|
||||||
|
this.num2 = num2;
|
||||||
|
this.num3 = num3;
|
||||||
|
this.num4 = num4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNum() {
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNum(BigDecimal num) {
|
||||||
|
this.num = num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNum2() {
|
||||||
|
return num2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNum2(BigDecimal num2) {
|
||||||
|
this.num2 = num2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNum3() {
|
||||||
|
return num3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNum3(BigDecimal num3) {
|
||||||
|
this.num3 = num3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNum4() {
|
||||||
|
return num4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNum4(BigDecimal num4) {
|
||||||
|
this.num4 = num4;
|
||||||
|
}
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Tar tar = new Tar();
|
||||||
|
|
||||||
|
//加
|
||||||
|
BigDecimal add = tar.num.add(tar.num2);
|
||||||
|
//减
|
||||||
|
BigDecimal subtract = tar.num2.subtract(tar.num3);
|
||||||
|
//除
|
||||||
|
BigDecimal divide = tar.num4.divide(tar.num2);
|
||||||
|
//乘
|
||||||
|
BigDecimal multiply = tar.num2.multiply(tar.num3);
|
||||||
|
|
||||||
|
System.out.println(add+"++"+subtract+"===="+divide+"+++++"+multiply);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue