项目信息管理系统Java代码
随着软件开发的不断发展,项目信息管理系统已经成为了企业或组织中必不可少的一部分。一个项目信息管理系统可以大大提高项目管理的效率,使组织能够更加有效地规划和管理项目。
在项目信息管理系统中,通常需要实现以下功能:
1. 项目信息管理:包括项目基本信息的录入、修改、删除和查询。
2. 任务管理:包括任务基本信息的录入、修改、删除和查询。
3. 进度管理:包括项目进度信息的录入、修改、删除和查询。
4. 成本管理:包括项目成本信息的录入、修改、删除和查询。
5. 报表统计:可以根据不同的维度和条件生成各种报表,方便管理人员对项目进行监控和分析。
为了实现这些功能,可以使用Java语言编写项目信息管理系统的代码。下面是一个基本的项目信息管理系统的Java代码实现:
“`java
import java.util.ArrayList;
import java.util.Scanner;
public class ProjectInfoManager {
private ArrayList projects = new ArrayList();
private ArrayList tasks = new ArrayList();
private ArrayList costs = new ArrayList();
public ProjectInfo createProject(String name) {
ProjectInfo project = new ProjectInfo();
project.setName(name);
return project;
}
public void updateProject(String name, ProjectInfo project) {
project.setName(name);
projects.add(project);
}
public void deleteProject(String name) {
projects.remove(name);
}
public void addTask(String name, TaskInfo task) {
tasks.add(task);
}
public void updateTask(String name, TaskInfo task) {
task.setName(name);
tasks.add(task);
}
public void deleteTask(String name) {
tasks.remove(name);
}
public void addCost(String name, CostInfo cost) {
costs.add(cost);
}
public void updateCost(String name, CostInfo cost) {
cost.setCost(cost.getCost());
costs.add(cost);
}
public void deleteCost(String name) {
costs.remove(name);
}
public ArrayList getProjects() {
return projects;
}
public ArrayList getTasks() {
return tasks;
}
public ArrayList getCosts() {
return costs;
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println(\”Enter the name of the first project: \”);
String name = scanner.nextLine();
ProjectInfo project = createProject(name);
System.out.println(\”Enter the name of the first task: \”);
String name = scanner.nextLine();
TaskInfo task = createTask(name);
System.out.println(\”Enter the name of the first cost: \”);
String name = scanner.nextLine();
CostInfo cost = createCost(name);
System.out.println(\”Enter the name of the first project: \”);
name = scanner.nextLine();
System.out.println(\”Enter the name of the first task: \”);
name = scanner.nextLine();
System.out.println(\”Enter the name of the first cost: \”);
name = scanner.nextLine();
System.out.println(\”Enter the name of the first project: \”);
name = scanner.nextLine();
System.out.println(\”Enter the name of the first task: \”);
name = scanner.nextLine();
System.out.println(\”Enter the name of the first cost: \”);
name = scanner.nextLine();
System.out.println(\”Enter the name of the first project: \”);
name = scanner.nextLine();
System.out.println(\”Enter the name of the first task: \”);
name = scanner.nextLine();
System.out.println(\”Enter the name of the first cost: \”);
name = scanner.nextLine();
project.setName(name);
task.setName(name);
cost.setCost(name);
tasks.add(task);
costs.add(cost);
projects.add(project);
System.out.println(\”Press any key to exit\”);
scanner.nextLine();
System.exit(0);
}
}
class ProjectInfo {
private String name;
private String description;
private String url;
private String images;
public ProjectInfo(String name, String description, String url, String images) {
this.name = name;
this.description = description;
this.url = url;
this.images = images;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public String getUrl() {
return url;
}
public String getImages() {
return images;
}
public void setName(String name) {
this.name = name;
}
public void setDescription(String description) {
this.description = description;
}
public void setUrl(String url) {
this.url = url;
}
public void setImages(String images) {
this.images = images;
}
}
class TaskInfo {
private String name;
private String description;
private String url;
private String images;
public TaskInfo(String name, String description, String url, String images) {
this.name = name;
this.description = description;
this.url = url;
this.images = images;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public String getUrl() {
return url;
}
public String getImages() {
return images;
}
public void setName(String name) {
this.name = name;
}
public void setDescription(String description) {
this.description = description;
}
public void setUrl(String url) {
this.url = url;
}
public void setImages(String images) {
this.images = images;
}
}
class CostInfo {
private String name;
private String description;
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。