Java基础学习:尚硅谷项目三 开发团队调度软件
Java基础学习:尚硅谷项目三 开发团队调度软件
一、软件功能与结构设计
1. 软件功能
该软件实现以下功能:
- 软件启动时,根据给定的数据创建公司部分成员列表(数组)
- 根据菜单提示,基于现有的公司成员,组建一个开发团队以开发一个新的项目
- 组建过程包括将成员插入到团队中,或从团队中删除某成员,还可以列出团队中现有成员的列表
- 开发团队成员包括架构师、设计师和程序员
2. 软件结构设计
二、软件编写流程
1. 创建项目基本组件
- 完成以下工作:
- 创建TeamSchedule项目
- 按照设计要求,创建所有包
- 将项目提供的几个类复制到相应的包中 (view包中:TSUtility.java; service包中:Data.java)
- 按照设计要求,在com.gaorui.team.domain包中,创建Equipment接口及其各实现子类代码
- 按照设计要求,在com.gaorui.team.domain包中,创建Employee类及其各子类代码
- 检验代码的正确性
package com.gaorui.team.service;public class Data {public static final int EMPLOYEE = 10;public static final int PROGRAMMER = 11;public static final int DESIGNER = 12;public static final int ARCHITECT = 13;public static final int PC = 21;public static final int NOTEBOOK = 22;public static final int PRINTER = 23;//Employee : 10, id, name, age, salary//Programmer: 11, id, name, age, salary//Designer : 12, id, name, age, salary, bonus//Architect : 13, id, name, age, salary, bonus, stockpublic static final String[][] EMPLOYEES = {{"10", "1", "马 云", "22", "3000"},{"13", "2", "马化腾", "32", "18000", "15000", "2000"},{"11", "3", "李彦宏", "23", "7000"},{"11", "4", "刘强东", "24", "7300"},{"12", "5", "雷 军", "28", "10000", "5000"},{"11", "6", "任志强", "22", "6800"},{"12", "7", "柳传志", "29", "10800","5200"},{"13", "8", "杨元庆", "30", "19800", "15000", "2500"},{"12", "9", "史玉柱", "26", "9800", "5500"},{"11", "10", "丁 磊", "21", "6600"},{"11", "11", "张朝阳", "25", "7100"},{"12", "12", "杨致远", "27", "9600", "4800"}};//如下的EQUIPMENTS数组与上面的EMPLOYEES数组元素一一对应//PC :21, model, display//NoteBook:22, model, price//Printer :23, name, type public static final String[][] EQUIPMENTS = {{},{"22", "联想T4", "6000"},{"21", "戴尔", "NEC17寸"},{"21", "戴尔", "三星 17寸"},{"23", "佳能 2900", "激光"},{"21", "华硕", "三星 17寸"},{"21", "华硕", "三星 17寸"},{"23", "爱普生20K", "针式"},{"22", "惠普m6", "5800"},{"21", "戴尔", "NEC 17寸"},{"21", "华硕","三星 17寸"},{"22", "惠普m6", "5800"}};
}
1.1 键盘访问的实现
- 项目view包中提供了TSUtility.java类,可用来方便地实现键盘访问。
- 该类提供了以下静态方法:
- public static char readMenuSelection()
用途:该方法读取键盘,如果用户键入’1’-’4’中的任意字符,则方法返回。返回值为用户键入字符。 - public static void readReturn()
用途:该方法提示并等待,直到用户按回车键后返回。 - public static int readInt()
用途:该方法从键盘读取一个长度不超过2位的整数,并将其作为方法的返回值。 - public static char readConfirmSelection() :
用途:从键盘读取‘Y’或’N’,并将其作为方法的返回值。
package com.gaorui.team.view;import java.util.*;
/*** * @Description 项目中提供了TSUtility.java类,可用来方便地实现键盘访问。* @author Gaorui* @version * @date 2022年3月28日13:10:29**/
public class TSUtility {private static Scanner scanner = new Scanner(System.in);/*** * @Description 该方法读取键盘,如果用户键入’1’-’4’中的任意字符,则方法返回。返回值为用户键入字符。* @author Gaorui* @date 2022年3月28日13:10:29* @return*/public static char readMenuSelection() {char c;for (; ; ) {String str = readKeyBoard(1, false);c = str.charAt(0);if (c != '1' && c != '2' &&c != '3' && c != '4') {System.out.print("选择错误,请重新输入:");} else break;}return c;}/*** * @Description 该方法提示并等待,直到用户按回车键后返回。* @author Gaorui* @date 2022年3月28日13:10:29*/public static void readReturn() {System.out.print("按回车键继续...");readKeyBoard(100, true);}/*** * @Description 该方法从键盘读取一个长度不超过2位的整数,并将其作为方法的返回值。* @author Gaorui* @date 2022年3月28日13:10:29* @return*/public static int readInt() {int n;for (; ; ) {String str = readKeyBoard(2, false);try {n = Integer.parseInt(str);break;} catch (NumberFormatException e) {System.out.print("数字输入错误,请重新输入:");}}return n;}/*** * @Description 从键盘读取‘Y’或’N’,并将其作为方法的返回值。* @author Gaorui* @date 2022年3月28日13:10:29* @return*/public static char readConfirmSelection() {char c;for (; ; ) {String str = readKeyBoard(1, false).toUpperCase();c = str.charAt(0);if (c == 'Y' || c == 'N') {break;} else {System.out.print("选择错误,请重新输入:");}}return c;}private static String readKeyBoard(int limit, boolean blankReturn) {String line = "";while (scanner.hasNextLine()) {line = scanner.nextLine();if (line.length() == 0) {if (blankReturn) return line;else continue;}if (line.length() < 1 || line.length() > limit) {System.out.print("输入长度(不大于" + limit + ")错误,请重新输入:");continue;}break;}return line;}
}
1.2 Equipment接口及其实现类
package com.gaorui.team.domain;/*** @InterfaceName Equipment* @Description Equipment接口,声明了抽象方法getDescription()* @Author 86150* @Date 2022/3/28 13:25* @Version 1.0*/public interface Equipment {//抽象方法getDescription()public abstract String getDescription();
}
package com.gaorui.team.domain;/*** @ClassName PC* @Description Equipment接口的实现类* @Author 86150* @Date 2022/3/28 13:25* @Version 1.0*/public class PC implements Equipment {private String model; //机器的型号private String display; //显示器的名称public PC() {}public PC(String model, String display) {this.model = model;this.display = display;}public String getModel() {return model;}public void setModel(String model) {this.model = model;}public String getDisplay() {return display;}public void setDisplay(String display) {this.display = display;}//实现类重写接口中的抽象方法getDescription()@Overridepublic String getDescription() {return model + "(" + display + ")";}
}
package com.gaorui.team.domain;/*** @ClassName NoteBook* @Description Equipment接口的实现类* @Author 86150* @Date 2022/3/28 13:34* @Version 1.0*/public class NoteBook implements Equipment {private String model; //机器的型号private double price; //机器的价格public NoteBook() {}public NoteBook(String model, double price) {this.model = model;this.price = price;}public String getModel() {return model;}public void setModel(String model) {this.model = model;}public double getPrice() {return price;}public void setPrice(double price) {this.price = price;}//实现类重写接口中的抽象方法getDescription()@Overridepublic String getDescription() {return model + "(" + price + ")";}
}
package com.gaorui.team.domain;/*** @ClassName Printer* @Description Equipment接口的实现类* @Author 86150* @Date 2022/3/28 13:34* @Version 1.0*/public class Printer implements Equipment {private String name; //机器的型号private String type; //机器的类型public Printer() {}public Printer(String name, String type) {this.name = name;this.type = type;}public String getName() {return name;}public void setName(String name) {this.name = name;}public String getType() {return type;}public void setType(String type) {this.type = type;}//实现类重写接口中的抽象方法getDescription()@Overridepublic String getDescription() {return name + "(" + type + ")";}
}
1.3 Employee类及其子类
package com.gaorui.team.domain;/*** @ClassName Employee* @Description TODO* @Author 86150* @Date 2022/3/28 14:53* @Version 1.0*/public class Employee {private int id;private String name;private int age;private double salary;public Employee() {}public Employee(int id, String name, int age, double salary) {this.id = id;this.name = name;this.age = age;this.salary = salary;}public int getId() {return id;}public void setId(int id) {this.id = id;}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 double getSalary() {return salary;}public void setSalary(double salary) {this.salary = salary;}public String getDetails() {return id + "\t" + name + "\t" + age + "\t" + salary;}@Overridepublic String toString() {return getDetails();}
}
package com.gaorui.team.domain;import com.gaorui.team.service.Status;import static com.gaorui.team.service.Status.*;/*** @ClassName Programmer* @Description Employee的子类* @Author 86150* @Date 2022/3/28 14:55* @Version 1.0*/public class Programmer extends Employee {private int memberId; //记录成员加入开发团队后在团队中的IDprivate Status status = FREE; //表示成员的状态private Equipment equipment; //表示成员领用的设备。接口不能实例化对象,故该引用类型变量指向的是该接口的实现类(多态)public Programmer() {}public Programmer(int id, String name, int age, double salary, Equipment equipment) {super(id, name, age, salary);this.equipment = equipment;}public int getMemberId() {return memberId;}public void setMemberId(int memberId) {this.memberId = memberId;}public Status getStatus() {return status;}public void setStatus(Status status) {this.status = status;}public Equipment getEquipment() {return equipment;}public void setEquipment(Equipment equipment) {this.equipment = equipment;}@Overridepublic String toString() {return super.toString() + "\t程序员\t" + status.getNAME() + "\t\t\t\t\t" + equipment.getDescription();}
}
package com.gaorui.team.domain;/*** @ClassName Designer* @Description Programmer的子类* @Author 86150* @Date 2022/3/28 15:42* @Version 1.0*/public class Designer extends Programmer {private double bonus; //奖金public Designer() {}public Designer(int id, String name, int age, double salary, Equipment equipment, double bonus) {super(id, name, age, salary, equipment);this.bonus = bonus;}public double getBonus() {return bonus;}public void setBonus(double bonus) {this.bonus = bonus;}@Overridepublic String toString() {return getDetails() + "\t设计师\t" + getStatus().getNAME() + "\t" + bonus + "\t\t\t" + getEquipment().getDescription();}
}
package com.gaorui.team.domain;/*** @ClassName Architect* @Description Designer的子类* @Author 86150* @Date 2022/3/28 15:45* @Version 1.0*/public class Architect extends Designer{private int stock; //公司奖励的股票数量public Architect() {}public Architect(int id, String name, int age, double salary, Equipment equipment, double bonus, int stock) {super(id, name, age, salary, equipment, bonus);this.stock = stock;}public int getStock() {return stock;}public void setStock(int stock) {this.stock = stock;}@Overridepublic String toString() {return getDetails() + "\t架构师\t" + getStatus().getNAME() + "\t" + getBonus() + "\t" + stock + "\t" + getEquipment().getDescription();}
}
package com.gaorui.team.service;import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;/*** @ClassName Status* @Description 枚举类Status是项目service包下自定义的类,在类内声明三个Status类型的对象属性,* 分别表示成员的状态:① FREE-空闲;② BUSY-已加入开发团队;③ VACATION-正在休假* @Author 86150* @Date 2022/3/28 14:56* @Version 1.0*/public class Status {//私有常量属性,表示成员的状态private final String NAME;//枚举类,该类只能有三个对象,因此需要将构造器私有化private Status(String NAME) {this.NAME = NAME;}//声明三个对象属性:全局常量(public static final)public static final Status FREE = new Status("FREE"); //FREE-空闲public static final Status BUSY = new Status("BUSY"); //BUSY-已加入开发团队public static final Status VACATION = new Status("VACATION"); //VACATION-正在休假//提供NAME属性的get方法,供该类的对象属性调用public String getNAME() {return NAME;}//也可以直接重写toString方法,//直接System.out.println(),自动执行重写后的toString方法,返回对象的属性NAME@Overridepublic String toString() {return NAME;}
}
2. 实现service包中的类
- 按照设计要求编写NameListService类
- 在NameListService类中临时添加一个main方法中,作为单元测试方法。
- 在方法中创建NameListService对象,然后分别用模拟数据调用该对象的各个方法,以测试是否正确
- 注意:测试应细化到包含了所有非正常的情况,以确保方法完全正确
- 重复1-3步,完成TeamService类的开发
2.1 NameListService类
package com.gaorui.team.service;import com.gaorui.team.domain.*;
//导入Data类的所有静态结构,在此文件下调用Data类的静态结构无需再在前面加Data.
import static com.gaorui.team.service.Data.*;/*** @ClassName NameListService* @Description 负责将Data中的数据封装到Employee[]数组中,同时提供相关操作Employee[]的方法* @Author 86150* @Date 2022/3/28 16:19* @Version 1.0*/public class NameListService {private Employee[] employees; //employees对象数组用来保存公司所有员工对象/*NameListService()构造器:对employees对象数组及其数组元素进行初始化*/public NameListService() {//1. 对象数组的初始化:根据Data类的静态二维数组EMPLOYEES的形状构建相应大小的employees数组employees = new Employee[EMPLOYEES.length]; //二维数组.length 返回的是外层数组的长度//2. 根据Data类中的数据构建不同的对象,包括Employee、Programmer、Designer和Architect对象,以及相关联的Equipment实现类的对象,并将对象存在数组中for (int i = 0; i < EMPLOYEES.length; i++) {//确定员工的类型,并将字符串转换成整型int type = Integer.parseInt(EMPLOYEES[i][0]);//所有类型的公共属性:Employee类的4个基本属性值int id = Integer.parseInt(EMPLOYEES[i][1]);String name = EMPLOYEES[i][2];int age = Integer.parseInt(EMPLOYEES[i][3]);double salary = Double.parseDouble(EMPLOYEES[i][4]);//非公共属性Equipment equipment;double bonus;int stock;switch (type) {case EMPLOYEE: //10employees[i] = new Employee(id, name, age, salary);break;case PROGRAMMER: //11equipment = creatEquipment(i);employees[i] = new Programmer(id, name, age, salary, equipment);break;case DESIGNER: //12equipment = creatEquipment(i);bonus = Double.parseDouble(EMPLOYEES[i][5]);employees[i] = new Designer(id, name, age, salary, equipment, bonus);break;case ARCHITECT: //13equipment = creatEquipment(i);bonus = Double.parseDouble(EMPLOYEES[i][5]);stock = Integer.parseInt(EMPLOYEES[i][6]);employees[i] = new Architect(id, name, age, salary, equipment, bonus, stock);break;}}}/*creatEquipment(int index)方法:获取employees对象数组指定索引的员工的设备*/private Equipment creatEquipment(int index) {int type = Integer.parseInt(EQUIPMENTS[index][0]);switch (type) {case PC: //21return new PC(EQUIPMENTS[index][1], EQUIPMENTS[index][2]);case NOTEBOOK: //22return new NoteBook(EQUIPMENTS[index][1], Double.parseDouble(EQUIPMENTS[index][2]));case PRINTER: //23return new Printer(EQUIPMENTS[index][1], EQUIPMENTS[index][2]);}return null;}/*getAllEmployees()方法:获取当前所有员工返回:包含所有员工对象的数组*/public Employee[] getAllEmployees() {return employees;}/*getEmployee(int id)方法:获取指定ID的员工对象参数:指定员工的ID返回:对象数组中指定id的Employee(员工)对象异常:找不到指定的员工*/public Employee getEmployee(int id) throws TeamException {for (int i = 0; i < employees.length; i++) {if (employees[i].getId() == id) {return employees[i];}}throw new TeamException("找不到指定的员工");}
}
package com.gaorui.team.service;/*** @ClassName TeamException* @Description 自定义异常类* @Author 86150* @Date 2022/3/28 21:05* @Version 1.0*///1.自定义的异常类需要继承Java现有的异常类,一般为:RuntimeException 或 Exception
public class TeamException extends Exception {//2.提供全局常量(static final):serialVersionUIDstatic final long serialVersionUID = -703745766939L;//3.提供重载的构造器public TeamException() {}public TeamException(String message) {super(message);}
}
2.2 TeamService类
package com.gaorui.team.service;import com.gaorui.team.domain.*;/*** @ClassName TeamService* @Description 关于开发团队成员的管理:添加、删除等* @Author 86150* @Date 2022/3/29 1:28* @Version 1.0*/public class TeamService {//counter为静态变量,用来为开发团队新增成员自动生成团队中的唯一ID,即memberId(提示:应使用增1的方式)private static int counter = 1;//表示开发团队最大成员数private final int MAX_MEMBER = 5;//对象数组:用来保存当前团队中的各成员对象private Programmer[] team = new Programmer[MAX_MEMBER];//记录团队成员的实际人数private int total = 0;//构造器public TeamService() {}/*getTeam()方法:返回当前团队的所有对象返回:包含所有成员对象的数组,数组大小与当前团队总的成员人数一致*/public Programmer[] getTeam() {Programmer[] currentTeam = new Programmer[total];for (int i = 0; i < total; i++) {currentTeam[i] = team[i];}return currentTeam;}/*addMember(e: Employee)方法:向团队中添加成员参数:待添加成员的对象异常:添加失败,TeamException中包含了失败原因,包含以下几种:1. 成员已满,无法添加2. 该成员不是开发人员,无法添加3. 该员工已在本开发团队中4. 该员工已是某团队成员5. 该员正在休假,无法添加6. 团队中至多只能有一名架构师7. 团队中至多只能有两名设计师8. 团队中至多只能有三名程序员注意:一般先把可能出现的异常情况写在前*/public void addMember(Employee e) throws TeamException {if (total >= MAX_MEMBER) {throw new TeamException("成员已满,无法添加");}if (!(e instanceof Programmer)) {throw new TeamException("该成员不是开发人员,无法添加");}if (isExist(e)) {throw new TeamException("该员工已在本开发团队中");}//getStatus()是Programmer类的方法,这里需要向下转型(强转)才能调用子类中的方法Programmer p = (Programmer) e;//两个String类型变量使用equals比较值时,通常将确定的字符串写在前面,避免空指针异常if ("BUSY".equals(p.getStatus().getNAME())) {throw new TeamException("该员工已是某团队成员");}if ("VACATION".equals(p.getStatus().getNAME())) {throw new TeamException("该员正在休假,无法添加");}//获取team已有成员中架构师、设计师、程序员的人数int numOfArch = 0, numOfDes = 0, numOfPro = 0;for (int i = 0; i < total; i++) {if (team[i] instanceof Architect) {numOfArch++;} else if (team[i] instanceof Designer) {numOfDes++;} else if (team[i] instanceof Programmer) {numOfPro++;}}//再判断待加入成员是什么类型if (p instanceof Architect) {if (numOfArch >=1) {throw new TeamException("团队中至多只能有一名架构师");}} else if (p instanceof Designer) {if (numOfDes >= 2) {throw new TeamException("团队中至多只能有两名设计师");}} else if (p instanceof Programmer) {if (numOfPro >= 3) {throw new TeamException("团队中至多只能有三名程序员");}}//若以上异常情况均排除,则将待添加对象添加到team数组中,total加1team[total++] = p;//更改待添加对象的status属性p.setStatus(Status.BUSY);p.setMemberId(counter++);}/*判断指定的员工是否已经存在于现有开发团队中*/private boolean isExist(Employee e) {for (int i = 0; i < total; i++) {if (team[i].getId() == e.getId()) {return true;}}return false;}/*removeMember(memberId: int)方法:从团队中删除成员参数:待删除成员的memberId异常:找不到指定memberId的员工,删除失败*/public void removeMember(int memberId) throws TeamException {for (int i = 0; i < total; i++) {if (team[i].getMemberId() == memberId) {//将该员工的status置为FREEteam[i].setStatus(Status.FREE);//删除元素,后面的元素覆盖前面的元素for (int j = i; j < total - 1; j++) {team[j] = team[j + 1];}//最后一个元素置成nullteam[total - 1] = null;//当前团队成员数减1total--;return;}}throw new TeamException("找不到指定memberId的员工,删除失败");}
}
3. 实现view包中的类
- 按照设计要求编写TeamView类,逐一实现各个方法,并编译
- 执行main方法中,测试软件全部功能
3.1 TeamView类
package com.gaorui.team.view;import com.gaorui.team.domain.*;
import com.gaorui.team.service.*;/*** @ClassName TeamView* @Description UI界面* @Author 86150* @Date 2022/3/29 15:40* @Version 1.0*/public class TeamView {private NameListService listSvc = new NameListService();private TeamService teamSvc = new TeamService();/*enterMainMenu()方法:主界面显示及控制方法*/public void enterMainMenu() {char menu = '0';while (true) {if (menu != '1') {listAllEmployees();}System.out.print("1-团队列表 2-添加团队成员 3-删除团队成员 4-退出 请选择(1-4):");menu = TSUtility.readMenuSelection();switch (menu) {case '1':getTeam();break;case '2':addMember();break;case '3':deleteMember();break;case '4':System.out.print("是否确认退出(Y/N):");char isExit = TSUtility.readConfirmSelection();if (isExit == 'Y') {return;}}}}/*listAllEmployees()方法:以表格形式列出公司所有成员*/private void listAllEmployees() {System.out.println("----------------------- 开发团队调度软件 -------------------------------\n");Employee[] employees = listSvc.getAllEmployees();if (employees == null || employees.length == 0) {System.out.println("公司没有任何员工信息!");} else {System.out.println("ID\t姓名\t\t年龄\t工资\t\t职位\t\t状态\t\t奖金\t\t股票\t\t领用设备");for (int i = 0; i < employees.length; i++) {System.out.println(employees[i]);}}System.out.println("---------------------------------------------------------------------");}/*getTeam()方法:显示团队成员列表操作*/private void getTeam() {System.out.println("-------------------------- 团队成员列表 -------------------------------\n");Programmer[] team = teamSvc.getTeam();if (team == null || team.length == 0) {System.out.println("开发团队目前没有成员!");} else {System.out.println("TID/ID\t姓名\t\t年龄\t\t工资\t\t职位\t\t奖金\t\t股票");for (int i = 0; i < team.length; i++) {System.out.println(team[i].getDetailsForTeam());}}System.out.println("---------------------------------------------------------------------");}/*addMember()方法:实现添加成员操作*/private void addMember() {System.out.println("-------------------------- 添加成员 -------------------------------\n");System.out.print("请输入要添加的员工ID:");int id = TSUtility.readInt();try {Employee employee = listSvc.getEmployee(id);teamSvc.addMember(employee);System.out.println("添加成功!");} catch (TeamException e) {System.out.println("添加失败,原因:"+ e.getMessage());}TSUtility.readReturn();}/*deleteMember()方法:实现删除成员操作*/private void deleteMember() {System.out.println("-------------------------- 删除成员 -------------------------------\n");System.out.print("请输入要添加的员工TID:");int memberId = TSUtility.readInt();System.out.print("是否确认删除(Y/N):");char isDelete = TSUtility.readConfirmSelection();if (isDelete == 'Y') {try {teamSvc.removeMember(memberId);System.out.println("删除成功!");} catch (TeamException e) {System.out.println("删除失败,原因:" + e.getMessage());}TSUtility.readReturn();}}public static void main(String[] args) {TeamView view = new TeamView();view.enterMainMenu();}
}System.out.println("添加成功!");} catch (TeamException e) {System.out.println("添加失败,原因:"+ e.getMessage());}TSUtility.readReturn();}
Java基础学习:尚硅谷项目三 开发团队调度软件相关推荐
- 学习java第四天,自己做的尚硅谷项目三开发人员调度系统,代码很丑陋,等后面有时间再优化一下。
1.定义公司成员作为父类 package tEAM;public class Person {private String ID;private String age;private String w ...
- Java学习笔记项目三:开发团队调度软件(尚硅谷)
JAVA学习笔记开发团队调度软件 ①创建基础组件 Equipment 接口 package august.domain;/*** 设备领取** @author : Crazy_August* @Dat ...
- Java学习笔记 | 尚硅谷项目三详解
该笔记基于B站视频:尚硅谷Java入门视频教程 目录 1,目标 2,需求说明 2.1,功能实现 2.1,菜单显示 2.2,添加功能 2.3,删除功能 2.3,查看团队成员 3,软件设计结构 4,具体实 ...
- java尚硅谷 项目三《开发团队调度项目》最细致流程、总结
目录 1.目标 2.项目细节 2.1功能 2.2主界面显示 2.3功能展示 2.3.1团队列表 2.3.2添加团队成员 2.3.3删除团队成员 2.3.4退出 3.项目包和类的说明,软件设计结构 4. ...
- java 基础学习——基本语法(三)
十五.Java条件语句之 if 生活中,我们经常需要先做判断,然后才决定是否要做某件事情.例如,如果考试成绩大于 90 分,则奖励一个 IPHONE 5S .对于这种"需要先判断条件,条件满 ...
- JAVA基础学习之路(三)类定义及构造方法
类的定义及使用 一,类的定义 class Book {//定义一个类int price;//定义一个属性int num;public static int getMonney(int price, i ...
- java基础学习之JSP动态web开发技术
一 JSP是什么? jsp 页面允许在标准的HTML 页面中包含Java代码 目标:是支持表现和业务逻辑的分离. 表现:由前端人员实现. 业务逻辑: 有后台程序员处理 二JSP页面的运行原理 第一步 ...
- Java基础学习总结(158)——开发Leader如何做CodeReview
一.目标和原则 提高代码质量,及早发现潜在缺陷,降低修改/弥补缺陷的成本 促进团队内部知识共享,提高团队整体水平 评审过程对于评审人员来说,也是一种思路重构的过程,帮助更多的人理解系统 是一个传递知识 ...
- Java基础学习总结(146)——开发人员日志实践规范
一.日志规范 日志作用: 1.日常排查问题(基本作用),快速定位问题的根源 2.分析日志,构建常见问题排查平台 3.报表输出(日活.周活) 4.追踪程序执行的过程,追踪数据的变化: a)在系统启动或 ...
最新文章
- 独家 | 如何用简单的Python为数据科学家编写Web应用程序?(附代码链接)
- python3解释器执行long(10)的结果为_Python3解释器执行'AB2C3D'.lower().title()的结果是( )。...
- Vue封装预约日期插件和发布到npm上
- oracle-只读数据文件的备份与恢复
- java中方法_java中的方法
- PAT 1032 (未完成)
- Face Recognition
- InnerJoin分页导致的数据重复问题排查
- 表格元素的完全指南(译)
- 挑战程序设计竞赛题解目录
- matlab解三角函数方程组,用matlab解三角函数方程组:y=A+Bx+Csin(Dx)+Esin(Fx)
- POJ-1144 Network——Trajan+割点
- 融云观察:壳壳语音新玩法,深挖语音社交市场
- 阿里云服务器ECS测评
- 打造前端MAC工作站(五)让我们熟悉一下 MAC 命令行吧!
- SonarQube扫描的Bug、漏洞以及异味的修复(持续更新)
- 关于LDO和DC-DC,看这一篇就够了!
- mac执行java死卡_MacOS应用程序有时卡死,怎么办?2种方法轻松搞定
- 水果店怎样开业吸引人流量,水果店怎样开业吸引人
- 记录一次Win10莫名其妙被植入一个恶意软件
热门文章
- android xml sax解析,《android用SAX解析xml》
- HIVE常用参数配置
- SEO又一新站Cosplay网站
- elementui[el-table]表格全选操作以及翻页选中取消相关效果
- 1-MATLAB APP Design-图像的输入与输出
- CVPR 2021 | 港科大:如何利用闪光图像(flash image)来去除反光?
- 十分详细的阳光十六法则
- 【Python】大数据挖掘课程作业3——使用朴素贝叶斯分类对B站评论进行分析
- 【看表情包学Linux】man 手册 | 复制文件或目录 | 移动文件和重命名操作 | 查看目标文件内容
- 《惢客创业日记》2018.12.29(周六)取代手机的“量子智能标签”