diff --git "a/work/com/java/minxi/java_20240415/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/MainTest134.java" "b/work/com/java/minxi/java_20240415/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/MainTest134.java" new file mode 100644 index 0000000000000000000000000000000000000000..b94cb04d40f5c628c4cc7e7b19ca59424afbe9ef --- /dev/null +++ "b/work/com/java/minxi/java_20240415/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/MainTest134.java" @@ -0,0 +1,12 @@ +package com.java.minxi.java_20240415.java_2301_王显义_2344310134; + +public class MainTest134 { + public static void main(String[] args) { + for (int i = 1; i <= 9; i++) { + System.out.println(" "); + for (int k = 1; k <= i; k++) { + System.out.print(k + "*" + i + "=" + i * k + "\t"); + } + } + } +} diff --git "a/work/com/java/minxi/java_20240425/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Manage134.java" "b/work/com/java/minxi/java_20240425/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Manage134.java" new file mode 100644 index 0000000000000000000000000000000000000000..28d4f4df93a625313dc52e3fc0ad6249a4b65bb4 --- /dev/null +++ "b/work/com/java/minxi/java_20240425/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Manage134.java" @@ -0,0 +1,114 @@ +package com.java.minxi.java_20240425.java_2301_王显义_2344310134; + +public class Manage134 { + //员工ID + private long ID; + + //账号 + private String admin; + + //密码 + private String password; + + //姓名 + private String name; + + //年龄 + private int age; + + //无参构造 + + public Manage134() { + } + + + //有参构造 + public long getID() { + return ID; + } + + public void setID(long ID) { + this.ID = ID; + } + + public String getAdmin() { + return admin; + } + + public void setAdmin(String admin) { + this.admin = admin; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + //登入 + + public Manage134(String admin, String password) { + this.password = password; + this.admin = admin; + if ("123456".equals(admin) && "654321".equals(password)){ + System.out.println("登入成功"); + }else + System.out.println("登入失败"); + } + + //打卡 + + + public Manage134(long ID, String password) { + this.ID = ID; + this.password = password; + if (ID == 1000 && "654321".equals(password)){ + System.out.println("打卡成功"); + }else + System.out.println("打卡失败"); + } + //退出 + public void quit (){ + System.out.println("退出成功"); + } + + } + + + + + + + + + + + + + + + + + + + + + + diff --git "a/work/com/java/minxi/java_20240425/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Manage134_info.java" "b/work/com/java/minxi/java_20240425/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Manage134_info.java" new file mode 100644 index 0000000000000000000000000000000000000000..2455d05e39a883434cebcac24ffd667f25a7df2e --- /dev/null +++ "b/work/com/java/minxi/java_20240425/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Manage134_info.java" @@ -0,0 +1,15 @@ +package com.java.minxi.java_20240425.java_2301_王显义_2344310134; + +public class Manage134_info { + //登入 + public static void main(String[] args) { + Manage134 login = new Manage134("123456","654321"); + + //打卡 + Manage134 sign = new Manage134("1000","654321"); + + //退出 + Manage134 quit =new Manage134(); + quit.quit(); + } +} diff --git "a/work/com/java/minxi/java_20240428/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Person134.java" "b/work/com/java/minxi/java_20240428/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Person134.java" new file mode 100644 index 0000000000000000000000000000000000000000..5255a52b8a97a9857b48d23b8f7b7b6573a80d16 --- /dev/null +++ "b/work/com/java/minxi/java_20240428/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Person134.java" @@ -0,0 +1,36 @@ +package com.java.minxi.java_20240428.java_2301_王显义_2344310134; + +public class Person134 { + + +// 声明一个名为Person的类,里面有name与age两个属性,并声明一个含有两个参数的构造方法 + private String name; + + private int age; + + + public Person134() { + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + +// 这是一个含有两个参数的构造方法 + public Person134(String name, int age) { + this.name = name; + this.age = age; + } +} diff --git "a/work/com/java/minxi/java_20240428/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Student134.java" "b/work/com/java/minxi/java_20240428/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Student134.java" new file mode 100644 index 0000000000000000000000000000000000000000..e1ca15b1d5195e3ded09a2a3548015dbb3f4b491 --- /dev/null +++ "b/work/com/java/minxi/java_20240428/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Student134.java" @@ -0,0 +1,27 @@ +package com.java.minxi.java_20240428.java_2301_王显义_2344310134; + +public class Student134 extends Person134{ + + //添加一个属性school; + private String school; + + public String getSchool() { + return school; + } + + public void setSchool(String school) { + this.school = school; + } + +// 声明一个名为Student的类,此类继承自Person类 + public Student134(String name, int age,String school){ + super(name,age); + this.school=school; + } + + //.定义一个intro方法,进行自我介绍,输出格式:姓名:张三,年龄:18,学校:闽西职业技术学院 + public void intro(){ + System.out.println("姓名:"+getName()+" 年龄:"+getAge()+" 学校:"+school); + + } +} diff --git "a/work/com/java/minxi/java_20240428/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Student_info134.java" "b/work/com/java/minxi/java_20240428/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Student_info134.java" new file mode 100644 index 0000000000000000000000000000000000000000..9697c86c3c2e4c2d4e101ed58f17ca8590efc852 --- /dev/null +++ "b/work/com/java/minxi/java_20240428/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Student_info134.java" @@ -0,0 +1,11 @@ +package com.java.minxi.java_20240428.java_2301_王显义_2344310134; + +public class Student_info134 { + + //实例化一个Student类的对象student,为Student对象student中的school赋值,调用intro方法,打印输出姓名:张三,年龄:18,学校:龙岩学院。 + public static void main(String[] args) { + Student134 st=new Student134("张三",18,"龙岩学院"); + st.intro(); + + } +} diff --git "a/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/AirPlane134.java" "b/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/AirPlane134.java" new file mode 100644 index 0000000000000000000000000000000000000000..439eb8951f7330ce3fe42a0e5b9dc1959f73f29e --- /dev/null +++ "b/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/AirPlane134.java" @@ -0,0 +1,37 @@ +package com.java.minxi.java_20240506.java_2301_王显义_2344310134; + +public class AirPlane134 extends Vehicles134 { + //地址 + private String place; + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + //重写交通工具中的 travel()方法 + public void travel(){ + System.out.println("坐着"+getColor()+getBrand()+getType()+"客机前往"+getPlace()+"旅游"); + } + + //编写带有飞机颜色和品牌两个参数及String返回值的方法combination(); + public String combination(String color,String brand){ + return color+brand; + } + + //编写带有品牌参数及String返回值的方法 combination(); + public String combination(String brand){ + return brand; + } + + public AirPlane134() { + } + + public AirPlane134(String type, String brand, String color,String place) { + super(type, brand, color); + this.place=place; + } +} diff --git "a/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Car134.java" "b/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Car134.java" new file mode 100644 index 0000000000000000000000000000000000000000..2604582fbe999b99d7e68b87cba61e7bc4e63325 --- /dev/null +++ "b/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Car134.java" @@ -0,0 +1,37 @@ +package com.java.minxi.java_20240506.java_2301_王显义_2344310134; + +public class Car134 extends Vehicles134 { + //地址 + private String place; + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + //重写交通工具中的 travel()方法 + public void travel(){ + System.out.println("开着"+getColor()+getBrand()+getType()+"前往"+getPlace()+"旅游"); + } + + //编写带有汽车颜色和品牌两个参数及String返回值的方法"combination(); + public String combination(String color,String brand){ + return color+brand; + } + + //编写带有品牌参数及String返回值的方法combination(); + public String combination(String brand){ + return brand; + } + + public Car134() { + } + + public Car134(String type, String brand, String color,String place) { + super(type, brand, color); + this.place=place; + } +} diff --git "a/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Test134.java" "b/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Test134.java" new file mode 100644 index 0000000000000000000000000000000000000000..a2adddd80e462089337ff3bfee572067a36f8fef --- /dev/null +++ "b/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Test134.java" @@ -0,0 +1,14 @@ +package com.java.minxi.java_20240506.java_2301_王显义_2344310134; + +public class Test134 { + public static void main(String[] args) { + Car134 c1 =new Car134("汽车","大众","白色","北京"); + Car134 c2 =new Car134("汽车","奔驰","","东山岛"); + c1.travel(); + c2.travel(); + AirPlane134 A1=new AirPlane134("客机","波音","蓝色","大理"); + AirPlane134 A2=new AirPlane134("客机","空客","","哈尔滨岛"); + A1.travel(); + A2.travel(); + } +} diff --git "a/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Vehicles134.java" "b/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Vehicles134.java" new file mode 100644 index 0000000000000000000000000000000000000000..acd847e87a104c7fdf120a467854e8185a7e5574 --- /dev/null +++ "b/work/com/java/minxi/java_20240506/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Vehicles134.java" @@ -0,0 +1,52 @@ +package com.java.minxi.java_20240506.java_2301_王显义_2344310134; + +public class Vehicles134 { + //类型 + private String type; + //品牌 + private String brand; + //颜色 + private String color; + //无参 + public Vehicles134(){ + + } + //全参 + + public Vehicles134(String type, String brand, String color) { + this.type = type; + this.brand = brand; + this.color = color; + } + + //getset方法 + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getBrand() { + return brand; + } + + public void setBrand(String brand) { + this.brand = brand; + } + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + //travel()方法 + public void travel(){ + + } + +}