diff --git "a/work/com/java/minxi/java_20240530/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/Main.java" "b/work/com/java/minxi/java_20240530/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/String.java" similarity index 76% rename from "work/com/java/minxi/java_20240530/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/Main.java" rename to "work/com/java/minxi/java_20240530/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/String.java" index f686060f52a3cb21640f26b834cd4c0d7fab6fe7..631b6fd39fde915ccabb411bf7fc7b6e84d09a97 100644 --- "a/work/com/java/minxi/java_20240530/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/Main.java" +++ "b/work/com/java/minxi/java_20240530/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/String.java" @@ -1,4 +1,4 @@ package com.java.minxi.java_20240530.java_2301_林晗希_2344310108; -public class Main { +public class String { } diff --git "a/work/com/java/minxi/java_20240530/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/main.jsp" "b/work/com/java/minxi/java_20240530/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/main.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..798d7214ed584799d66d31675b474d0b6b0fb58e --- /dev/null +++ "b/work/com/java/minxi/java_20240530/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/main.jsp" @@ -0,0 +1,46 @@ +<%@ page import="com.java.minxi.java_20240530.java_2301_林晗希_2344310108.String" %> +<% + class Animal{ + public java.lang.String sleep(int time){ + return "一只动物在睡觉"; + } + } + + class Cat{ + private String name; + private int time; + + public Cat() { + + } + + public java.lang.String sleep(int time){ + return "一只"+name+"睡觉睡了"+time+"小时"; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getTime() { + return time; + } + + public void setTime(int time) { + this.time = time; + } + + public Cat(String name, int time) { + this.name = name; + this.time = time; + } + + + + + } +%> \ No newline at end of file diff --git "a/work/com/java/minxi/java_20240603/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/circle.jsp" "b/work/com/java/minxi/java_20240603/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/circle.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..fe91c492cabaf8f2ca86146e5f22f707c317d44a --- /dev/null +++ "b/work/com/java/minxi/java_20240603/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/circle.jsp" @@ -0,0 +1,31 @@ + param name="r" value="5" + +<% + class circle{ + private Integer rr; + double a=3.1415926; + + public circle() { + + } + + public double circleArea(){ + return rr*a*a; + } + + public Integer getRr() { + return rr; + } + + public void setRr(Integer rr) { + this.rr = rr; + } + + public circle(Integer rr) { + this.rr = rr; + } + + circle circle=new circle(); + + } +%> \ No newline at end of file diff --git "a/work/com/java/minxi/java_20240603/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/ladder.jsp" "b/work/com/java/minxi/java_20240603/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/ladder.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..e394c8724cc77349d9f3a4f90d3af85bbc1a2605 --- /dev/null +++ "b/work/com/java/minxi/java_20240603/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/ladder.jsp" @@ -0,0 +1,52 @@ + + param name="a" value="5" + param name="b" value="7" + param name="h" value="4" + +<% + class trapezium{ + public trapezium(){ + + } + + private Integer a; + private Integer b; + private Integer h; + int aa=2; + + public trapezium(Integer a, Integer b, Integer h) { + this.a = a; + this.b = b; + this.h = h; + } + + public Integer getA() { + return a; + } + + public void setA(Integer a) { + this.a = a; + } + + public Integer getB() { + return b; + } + + public void setB(Integer b) { + this.b = b; + } + + public Integer getH() { + return h; + } + + public void setH(Integer h) { + this.h = h; + } + + public double trapeziumArea(){ + int i = (a + b) * h / aa; + return i; + } + } +%> diff --git "a/work/com/java/minxi/java_20240603/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/main.jsp" "b/work/com/java/minxi/java_20240603/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/main.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..19e15f67a9aa7a33e4f44bac42f3e42dea5acc79 --- /dev/null +++ "b/work/com/java/minxi/java_20240603/java_2301_\346\236\227\346\231\227\345\270\214_2344310108/main.jsp" @@ -0,0 +1,6 @@ + + + param name="r" value="5" + param name="a" value="5" + param name="b" value="7" + param name="h" value="4"