1、 VC+VC+课程设计课程设计 电话簿管理程序的设计 本程序是在第 5 章第 5 题的基础之上改进而来的。增加了加密, 修改记录的功能、录入时间的显示及存储、智能查询等功能。 汉化了菜单与帮助,并且使用了类与对象重建了系统。 程序中使 用了 friend_node 来表示一个记录, 其中包含了 char last_name20 表 示 朋 友 的 姓 , char first_name15 表 示 朋 友 的 名 , char phone_num12表示电话号码,指针 friend_node *next 指向后一个 结点,指针 friend_node *last 指向前一个结点。 程序中使用了
2、类 friend_node 来封装双向链表, 其成员数据及成 员函数如下: void handle_choice(int choice) 根据用户选择调用函数 void add_record() 增加记录 void insert_node(friend_node *new_rec_ptr)将 一 个 由 new_rec_ptr 指向的新结点插入链表中 friend_node*position_insertion_point(charlastname20) 根 据 姓氏,返回其在链表中的正确位置, 新结点即将插入此点 void make_node_new_head(friend_node *ne
3、w_rec_ptr) 使新插入 结点成为头结点 void add_node_to_end(friend_node *new_rec_ptr) 使新插入结点 成为尾结点 void move_current_to_end()移动当前结点到链表尾 void display_list()输出所有数据 void delete_record()删除结点 void delete_head_of_list()删除链表头 void delete_end_of_list(friend_node *previous_ptr)删除链表尾 void delete_from_middle_of_list(friend_n
4、ode*previous_ptr)删 除中间当前结点 int verify_delete()要求拥护确认 void delete_node(friend_node *previous_ptr) 删除当前结点 void delete_list()删除成个链表 void search_by_lastname()根据姓氏查找 void search_by_name()精确查找某一记录 void search_by_firstname()按名查询 void modify_record()修改数据 void look_char() 智能查询 void write_list_to_file()将链表数据写如文件 void load_list_from_file()读取数据,重建链表处理函数 void help_me()帮助 void welcome()使用菜单界面 void enter()用户登录 程序流程图如下: N Y Y N