图书信息管理系统的设计与实现(源码)

本文档详细介绍了使用C++编程实现的图书信息管理系统的源码,包括LinkList头文件、LinkList实现文件以及主程序文件main.cpp。通过这些代码,读者可以了解如何设计和操作单链表来管理图书数据。
摘要由CSDN通过智能技术生成

接上一篇博客

https://blog.csdn.net/qq_56277977/article/details/118089622 

//LinkList.h


#pragma once
#include<iostream>
using namespace std;

struct Book {
    string name=""; //书名
    string ID="";//书号
    double price=0; //价格
};

struct Node {
    Book data;//数据域
    Node* next;//指针域
};

class LinkList
{
    public:
        LinkList();
        ~LinkList();
        void createList();
        void printList();
        void insert();
        void insert(int i, Book x);
        void Delete();
        void find();
        void changePrice();
        void outputMaxPrice();
        void quickSort(Node* begin, Node* end);
        void insertSort();
        void reList();
        void delete1(Node* head);
        int getLength();
        double getAveragePrice();  
        Node* getFirst();
        friend Node* partition(Node* begin,Node *end);
    private:
        Node* first;
};

//LinkList.cpp

#include "LinkList.h"
#include <iomanip>

LinkList::LinkList()
{
	first = new Node;
	first->next = NULL;
}

LinkList::~LinkList()
{

}

void LinkList::printList()
{
	Node* p = first->next;
	while (p) {
		cout << p->data.ID << " " << p->data.name << " " << setiosflags(ios::fixed) << setprecision(2) <<p->data.price<< endl;
		p = p->next;
	}
}



void LinkList::createList()
{
	cout << "分别输入图书的书号、书名和价格" << endl;
	cout << "输入0 0 0时结束操作" << endl;
	Book book;
	/*
	while (book.ID != "0&
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
  一、序言····················································································································· 4 二、需求分析说明书···································································································· 4 2.1系统介绍................................................................................................................................................. 4 2.2系统面向的用户群体............................................................................................................................. 4 2.3系统的功能性需求................................................................................................................................. 4 2.4系统的非功能性需求............................................................................................................................. 5 2.4.1用户界面需求.................................................................................................................................. 5 2.4.2软硬件环境需求.............................................................................................................................. 5 2.4.3软件质量需求.................................................................................................................................. 5 三、可行性分析报告···································································································· 5 3.1技术可行性............................................................................................................................................. 5 3.2人员可能性............................................................................................................................................. 5 3.3时间、设备可能性................................................................................................................................. 5 3.4系统工作量............................................................................................................................................. 5 3.5代码工作量............................................................................................................................................. 5 3.6文档要求................................................................................................................................................. 5 四、开发环境与项目规划····························································································· 5 4.1开发环境................................................................................................................................................. 5 4.2项目规划与管理..................................................................................................................................... 5 4.2.1开发人员安排.................................................................................................................................. 5 4.2.2开发进度安排.................................................................................................................................. 6 五、软件界面设计标准与规范······················································································ 6 5.1编写目的................................................................................................................................................. 6 5.2界面设计思想......................................................................................................................................... 6 5.3界面设计原则......................................................................................................................................... 6 5.4界面设计样式......................................................................................................................................... 6 5.5常见提示信息样式................................................................................................................................. 6 5.6常见错误信息样式................................................................................................................................. 7 5.7其他界面约定......................................................................................................................................... 7 六、软件编码设计标准与规范······················································································ 7 6.1对象命名约定......................................................................................................................................... 7 6.2常量和变量命名约定............................................................................................................................. 8 6.3结构化编码约定..................................................................................................................................... 8 6.4数据源的约定......................................................................................................................................... 9 6.5数据库访问约定..................................................................................................................................... 9 6.6其他约定................................................................................................................................................. 9 七、数据库分析与设计································································································ 10 7.1数据库环境说明...................................................................................................................................... 10 7.2数据库命名标准与规范.......................................................................................................................... 10 7.3数据库逻辑设计...................................................................................................................................... 10 7.4数据库物理设计...................................................................................................................................... 10 7.4.1表、视图汇总.................................................................................................................................. 10 7.4.2各表、视图设计详解...................................................................................................................... 11 八、软件体系结构设计说明书······················································································ 15 8.1系统概述................................................................................................................................................. 15 8.2设计约束................................................................................................................................................. 15 8.3设计策略................................................................................................................................................. 15 8.4系统概要设计说明书............................................................................................................................. 16 8.4.1图例说明.......................................................................................................................................... 16 8.4.2系统总体结构图.............................................................................................................................. 16 8.4.3销售子系统流程图.......................................................................................................................... 17 8.4.4进货子系统流程图.......................................................................................................................... 17 8.4.5退货子系统流程图.......................................................................................................................... 17 8.5系统详细设计说明书............................................................................................................................. 17 8.5.1系统模块汇总.................................................................................................................................. 17 8.5.2系统核心模块详解.......................................................................................................................... 18 8.5.3系统模块详解.................................................................................................................................. 28 九、用户界面设计报告································································································ 42 9.1界面设计规范......................................................................................................................................... 42 9.2系统窗体汇总......................................................................................................................................... 42 9.3主界面设计............................................................................................................................................. 43 9.4子界面设计............................................................................................................................................. 43 9.5界面资源设计......................................................................................................................................... 44 十、软件测试分析报告································································································ 44 10.1测试范围与主要内容........................................................................................................................... 44 10.2测试方法............................................................................................................................................... 44 10.3测试报告............................................................................................................................................... 44 10.4改进建议与措施................................................................................................................................... 45 十一、软件使用说明书····························································&
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值