亚洲av中文无码乱人伦在线视色,网曝黑料国产吃瓜,无码国产精品久久一区免费,亚洲av在在线观看,亚洲av国产午夜精品一区二区

聯(lián)系人管理系統(tǒng)java項(xiàng)目

聯(lián)系人管理系統(tǒng)Java項(xiàng)目

聯(lián)系人管理系統(tǒng)是一個(gè)企業(yè)級(jí)應(yīng)用,用于管理聯(lián)系人、聯(lián)系人記錄、電話、電子郵件等信息。在這個(gè)系統(tǒng)中,用戶可以添加、編輯、刪除和查詢聯(lián)系人信息,并且可以設(shè)置聯(lián)系人的權(quán)限和屬性。

下面是一個(gè)基本的聯(lián)系人管理系統(tǒng)Java項(xiàng)目的實(shí)現(xiàn),包括用戶界面和后端邏輯。

用戶界面

聯(lián)系人管理系統(tǒng)的用戶界面應(yīng)該簡潔明了,易于使用。用戶可以通過瀏覽器訪問系統(tǒng),并且可以使用簡單的拖放操作添加、編輯和刪除聯(lián)系人。

以下是一個(gè)簡單的聯(lián)系人管理系統(tǒng)用戶界面的示例:

![聯(lián)系人管理系統(tǒng)用戶界面](https://i.imgur.com/W5S7tsZ.png)

后端邏輯

聯(lián)系人管理系統(tǒng)的后端邏輯應(yīng)該處理用戶輸入的請(qǐng)求,包括添加、編輯和刪除聯(lián)系人。下面是一個(gè)簡單的聯(lián)系人管理系統(tǒng)后端邏輯的示例:

“`java
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class ContactManager {

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
List contacts = new ArrayList();

while (true) {
System.out.println(\”1. Add Contact\”);
System.out.println(\”2. Edit Contact\”);
System.out.println(\”3. Delete Contact\”);
System.out.println(\”4. View all Contact\”);
System.out.println(\”5. Exit\”);

int choice = scanner.nextInt();
scanner.nextLine();

switch (choice) {
case 1:
System.out.println(\”Enter name: \”);
String name = scanner.nextLine();
System.out.println(\”Enter phone number: \”);
String phone = scanner.nextLine();
System.out.println(\”Enter email: \”);
String email = scanner.nextLine();
System.out.println(\”Enter description: \”);
String description = scanner.nextLine();
contacts.add(new Contact(name, phone, email, description));
break;
case 2:
System.out.println(\”Enter name: \”);
String name = scanner.nextLine();
System.out.println(\”Enter phone number: \”);
String phone = scanner.nextLine();
System.out.println(\”Enter email: \”);
String email = scanner.nextLine();
System.out.println(\”Enter description: \”);
String description = scanner.nextLine();
Contact contact = new Contact(name, phone, email, description);
contacts.add(contact);
break;
case 3:
System.out.println(\”Enter name: \”);
String name = scanner.nextLine();
System.out.println(\”Enter phone number: \”);
String phone = scanner.nextLine();
System.out.println(\”Enter email: \”);
String email = scanner.nextLine();
System.out.println(\”Enter description: \”);
String description = scanner.nextLine();
List allContacts = new ArrayList();
allContacts.add(contact);
break;
case 4:
System.out.println(\”Enter name: \”);
String name = scanner.nextLine();
System.out.println(\”Enter phone number: \”);
String phone = scanner.nextLine();
System.out.println(\”Enter email: \”);
String email = scanner.nextLine();
System.out.println(\”Enter description: \”);
String description = scanner.nextLine();
System.out.println(\”Enter contact id: \”);
int contactId = scanner.nextInt();
Contact contact = contacts.get(contactId);
contact.setDescription(description);
break;
case 5:
System.out.println(\”Enter name: \”);
String name = scanner.nextLine();
System.out.println(\”Enter phone number: \”);
String phone = scanner.nextLine();
System.out.println(\”Enter email: \”);
String email = scanner.nextLine();
System.out.println(\”Enter description: \”);
String description = scanner.nextLine();
System.out.println(\”Enter contact id: \”);
int contactId = scanner.nextInt();
Contact contact = contacts.get(contactId);
contact.setDescription(description);
System.out.println(\”All contacts:\” + allContacts);
break;
default:
System.out.println(\”Invalid choice\”);
break;
}
}
}
}

class Contact {

private String name;
private String phone;
private String email;
private String description;

public Contact(String name, String phone, String email, String description) {
this.name = name;
this.phone = phone;
this.email = email;
this.description = description;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getPhone() {
return phone;
}

public void setPhone(String phone) {
this.phone = phone;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

@Override
public String toString() {
return \”Contact [name=\” + name + \”, phone=\” + phone + \”, email=\” + email + \”, description=\” + description + \”]\”;
}
}
“`

以上就是一個(gè)簡單的聯(lián)系人管理系統(tǒng)Java項(xiàng)目的實(shí)現(xiàn),它包括用戶界面和后端邏輯。這個(gè)系統(tǒng)可以幫助用戶添加、編輯和刪除聯(lián)系人,并且可以設(shè)置聯(lián)系人的權(quán)限和屬性。

相關(guān)新聞

聯(lián)系我們
聯(lián)系我們
公眾號(hào)
公眾號(hào)
在線咨詢
返回頂部