当前位置: 首页 > news >正文

电影网站页面seo网站建设的内部风险

电影网站页面seo,网站建设的内部风险,好项目寻找个人投资,小程序开发的发展前景本文实例为大家分享了java实现通讯录管理系统的具体代码#xff0c;供大家参考#xff0c;具体内容如下完成项目的流程#xff1a;1.根据需求#xff0c;确定大体方向2.功能模块分析3.界面实现4.功能模块设计5.coding6.代码测试下面是源代码#xff1a;import java.awt.Co…本文实例为大家分享了java实现通讯录管理系统的具体代码供大家参考具体内容如下完成项目的流程1.根据需求确定大体方向2.功能模块分析3.界面实现4.功能模块设计5.coding6.代码测试下面是源代码import java.awt.Container;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.io.BufferedReader;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.FileWriter;import java.io.IOException;import java.util.ArrayList;import java.util.Scanner;import java.util.concurrent.SynchronousQueue;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.WindowConstants;import javax.swing.text.html.HTMLDocument.Iterator;class Infro{public String id;public String name;public String sex;public String address;public String e_mail;public String phoneNumber;static int index 0;static ArrayList list new ArrayList();static int len list.size();//构造函数public Infro(String id,String name,String sex,String address,String e_mail,String phoneNumber){this.id id;this.name name;this.sex sex;this.address address;this.e_mail e_mail;this.phoneNumber phoneNumber;}public String toString(){return 编号id 姓名name 性别sex 通讯地址address 邮箱地址e_mail 电话phoneNumber;}/*** 添加功能**/public static void addFunction(){//添加功能Infro infro new Infro(,,,,,);System.out.println(请输入添加的数据);Scanner in new Scanner(System.in);System.out.println(输入编号);infro.id in.next();System.out.println(输入姓名);infro.name in.next();System.out.println(输入性别);infro.sex in.next();System.out.println(输入通讯地址);infro.address in.next();System.out.println(输入邮箱地址);infro.e_mail in.next();System.out.println(输入电话);infro.phoneNumber in.next();list.add(index,infro);index;if(list.isEmpty()){System.out.println(数据添加失败啦);}else{System.out.println(数据添加成功啦);len;//list集合长度加一// System.out.println(list.get(0).toString());}}// public static void deleteFunction(){//删除功能// System.out.println(输入要删除的联系人的编号);// Scanner in_2 new Scanner(System.in);// String d1 in_2.nextLine();// for(int a 0; a// if(d1.equals(list.get(a).id)){// list.remove(list.get(a));// len --;// }// }// }/*** 删除功能**/public static void deleteFunction(){System.out.println(输入要删除的联系人的编号);Scanner in_2 new Scanner(System.in);String d1 in_2.nextLine();java.util.Iterator it list.iterator();while (it.hasNext()){Infro infro it.next();if (infro.id.equals(d1)){it.remove();--index;//一定要加这个否则当做了删除操作再做添加操作的时候会出现异常(类似于指针栈)System.out.println(删除完毕此时通讯录记录条数为 --len);}}}/*** 修改功能**/public static void reditFunction(){System.out.println(输入要修改的通讯录的Id);Scanner in_r new Scanner(System.in);String r1 in_r.nextLine();for(int a 0; a len;a){if(r1.equals(list.get(a).id)){System.out.println(输入修改后的姓名);String name_1 in_r.next();list.get(a).name name_1;System.out.println(输入修改后的性别);String sex_1 in_r.next();list.get(a).sex sex_1;System.out.println(输入修改后的通讯地址);String address_1 in_r.next();list.get(a).address address_1;System.out.println(输入修改后的邮箱地址);String e_mail_1 in_r.next();list.get(a).e_mail e_mail_1;System.out.println(输入修改后的电话);String phoneNumber_1 in_r.next();list.get(a).phoneNumber phoneNumber_1;System.out.println(数据修改完毕);}}}/*** 查询功能**/public static void searchFunction() throws Exception{//查询功能System.out.println(请输入要查询的姓名);Scanner in_1 new Scanner(System.in);String s1in_1.nextLine();for(int a 0; aif(s1.equals(list.get(a).name)){System.out.println(list.get(a).toString());}}}/*** 显示功能**/public static void showFunction(){for(int i 0 ;iSystem.out.println(list.get(i).toString());}}/*** 保存功能**/public static void writeFunction() throws IOException{FileWriter writer new FileWriter(通讯录管理.txt);for(int i 0 ;iString []strwriter new String[len];strwriter[i]list.get(i).toString();writer.write(strwriter[i]);writer.write(\r\n);System.out.println(成功写入一行数据到 通讯录管理.txt 中);}writer.close();//关闭写入流释放资源}/*** 读取功能**/public static void readFunction() throws IOException{FileReader reader new FileReader(通讯录管理.txt);BufferedReader br new BufferedReader(reader);String str;while((str br.readLine()) ! null){//每次读取一行文本判断是否到达文件尾System.out.println(str);}br.close();}}public class Demo extends JFrame {/*** 界面设计**/public Demo(){Container c getContentPane(); //定义一个顶级容器cJPanel jp new JPanel(); //新建JPanel面板--jpJButton button1 new JButton(新建联系人);JButton button2 new JButton(删除联系人);JButton button3 new JButton(编辑联系人);JButton button4 new JButton(查找联系人);JButton button5 new JButton(显示所有联系人);JButton button6 new JButton(保存联系人到本地);JButton button7 new JButton(读取本地联系人);jp.setLayout(new GridLayout(2,4,5,5));//新建网格布局管理器(行数列数组件间的水平垂直间距)jp.add(button1);jp.add(button2);jp.add(button3);jp.add(button4);jp.add(button5);jp.add(button6);jp.add(button7);c.add(jp);//将JPanel面板jp添加到顶级容器c中setSize(600,500);setTitle(*通 讯 录 管 理 系 统*);setVisible(true);setResizable(false);//窗体大小由程序员决定用户不能自由改变大小setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);/***按键响应***/button1.addActionListener(new ActionListener(){//添加功能实现public void actionPerformed(ActionEvent arg0){Infro.addFunction();}});button2.addActionListener(new ActionListener(){//删除功能实现public void actionPerformed(ActionEvent arg0){Infro.deleteFunction();}});button3.addActionListener(new ActionListener(){//修改功能实现public void actionPerformed(ActionEvent arg0){Infro.reditFunction();}});button4.addActionListener(new ActionListener(){//查询功能实现public void actionPerformed(ActionEvent arg0){try {Infro.searchFunction();} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}}});button5.addActionListener(new ActionListener(){//显示功能实现public void actionPerformed(ActionEvent arg0){Infro.showFunction();}});button6.addActionListener(new ActionListener(){//保存功能实现public void actionPerformed(ActionEvent arg0){try {Infro.writeFunction();} catch (IOException e) {e.printStackTrace();}}});button7.addActionListener(new ActionListener(){//读取功能实现public void actionPerformed(ActionEvent arg0){try {Infro.readFunction();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}});}public static void main(String[] args) {// TODO Auto-generated method stubnew Demo();Infro a new Infro(, , , , , );}}推荐教程《Java教程》
http://www.zqtcl.cn/news/324705/

相关文章:

  • 广州番禺区有什么好玩的地方优化软件有哪些
  • 面包机做面包网站wordpress获取用户注册时间
  • 福州网站建设个人兼职泰州seo排名扣费
  • 泰安北京网站建设公司个人自我介绍网页
  • 网站建设适应全屏如何自动深圳市哪里最繁华
  • 杭州网站推广公司阿里云wordpress 安装目录
  • 厦门优秀网站建设app项目开发流程
  • 工作设计室网站海外网站代理
  • 室内设计官方网站没网站怎么做cpa
  • 哪个网站做欧洲旅游攻略好wordpress编辑器字体大小
  • aspcms 手机网站wordpress 刷浏览量
  • dw网站首页的导航怎么做网站建设企业建站模板
  • 平台型网站建设网站关键词优化seo
  • 齿轮机械东莞网站建设技术支持热搜词排行榜关键词
  • 河南专业做网站网站推广优化c重庆
  • 温州网站建设钱建设工程公司网站
  • 做笑话网站全国大学生职业生涯规划大赛官网
  • 便宜购 网站建设平台推广引流怎么做
  • 怎么用记事本做钓鱼网站制作公司网页的步骤
  • 机械设备东莞网站建设智慧软文网站
  • 个人网站需不需要搭建服务器蘑菇短视频2023版特色功能
  • 网站建设公司是什么东兰县建设局网站
  • 网站优化排名方案软件发布网
  • 企业网站开发价钱低企业策划案例
  • 网站建设帐号网站导入页欣赏
  • ftp 迁移 网站建筑公司商标logo设计
  • 没钱怎么做网站wordpress 链接修改插件
  • 建一个网站需要多久建设银行官网登录入口
  • 贸易公司网站制作邢台哪里做网站
  • 2018网站开发的革新帮别人起名 做ppt的网站