項(xiàng)目信息管理系統(tǒng)Java代碼
隨著軟件開發(fā)的不斷發(fā)展,項(xiàng)目信息管理系統(tǒng)已經(jīng)成為了企業(yè)或組織中必不可少的一部分。一個(gè)項(xiàng)目信息管理系統(tǒng)可以大大提高項(xiàng)目管理的效率,使組織能夠更加有效地規(guī)劃和管理項(xiàng)目。
在項(xiàng)目信息管理系統(tǒng)中,通常需要實(shí)現(xiàn)以下功能:
1. 項(xiàng)目信息管理:包括項(xiàng)目基本信息的錄入、修改、刪除和查詢。
2. 任務(wù)管理:包括任務(wù)基本信息的錄入、修改、刪除和查詢。
3. 進(jìn)度管理:包括項(xiàng)目進(jìn)度信息的錄入、修改、刪除和查詢。
4. 成本管理:包括項(xiàng)目成本信息的錄入、修改、刪除和查詢。
5. 報(bào)表統(tǒng)計(jì):可以根據(jù)不同的維度和條件生成各種報(bào)表,方便管理人員對(duì)項(xiàng)目進(jìn)行監(jiān)控和分析。
為了實(shí)現(xiàn)這些功能,可以使用Java語言編寫項(xiàng)目信息管理系統(tǒng)的代碼。下面是一個(gè)基本的項(xiàng)目信息管理系統(tǒng)的Java代碼實(shí)現(xiàn):
“`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;
版權(quán)聲明:本文內(nèi)容由互聯(lián)網(wǎng)用戶自發(fā)貢獻(xiàn),該文觀點(diǎn)僅代表作者本人。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如發(fā)現(xiàn)本站有涉嫌抄襲侵權(quán)/違法違規(guī)的內(nèi)容, 請(qǐng)發(fā)送郵件至 舉報(bào),一經(jīng)查實(shí),本站將立刻刪除。