> # ♻️ 资源
> **大小:** 437KB
> **文档链接:**[**https://www.yuque.com/sxbn/ks/100010649**](https://www.yuque.com/sxbn/ks/100010649)
> **➡️ 资源下载:**[**https://download.csdn.net/download/s1t16/87415912**](https://download.csdn.net/download/s1t16/87415912)
> **注:更多内容可关注微信公众号【神仙别闹】,如当前文章或代码侵犯了您的权益,请私信作者删除!**
> ![qrcode_for_gh_d52056803b9a_344.jpg](https://cdn.nlark.com/yuque/0/2023/jpeg/2469055/1692147256036-49ec7e0c-5434-4963-b805-47e7295c9cbc.jpeg#averageHue=%23a3a3a3&clientId=u8fb96484-770e-4&from=paste&height=140&id=u237e511a&originHeight=344&originWidth=344&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=8270&status=done&style=none&taskId=ud96bf5f7-fe85-4848-b9c2-82251181297&title=&width=140.1999969482422)
# 手机计费系统
## 功能分析
1. 计算通话费用、短信费用、流量费、总费用
2. 定时更新实时费用对象
3. 模拟通话、发短信记录,显示通讯录信息、有电话拨通的声音
## 功能设计
- 输入个人信息
- 拨打电话
- 发送短信
- 查看通讯录
- 添加联系人
- 查看账单
- 查看短信记录
## 类设计与类结构
### 类设计
- 信息类(information)
- 费用类(cost)
- 通讯录类(address)
- 短信类(message)
### 类结构
![b643e16db54cfee0bd9ecea220ddce94.PNG](https://cdn.nlark.com/yuque/0/2024/png/2469055/1714006639145-aa3cf01d-4084-4370-851c-934b89e8cf57.png#averageHue=%23fafafa&clientId=u6af1c28d-1e8f-4&from=paste&height=709&id=uf005af7a&originHeight=886&originWidth=1625&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=60897&status=done&style=none&taskId=ubbdbbbbc-31a6-424b-aea8-b0d351ca495&title=&width=1300)
## 功能模块设计
### 辅助模块
- 头文件 `help.h` 用来转化 `string` 类型,`static std::string toStdStr` 函数为 `Platform::String` 向 `std::string` 转化,`static Platform::String^ toPlaStr` 反之
- 头文件 `data.h` 用来存取数据——`information` 的对象指针和电话号码 `number`
### information 模块:
- 初始化函数
- printmessagenum()
- 数据访问器 `getincalltime(double time)`、`getsms(string, string)`
- 完善通讯录函数 `addressperfect()`
- 通讯录联系人初始化函数 `addressinitialize(address)`
- 返回数据成员函数 `printtraffic()`、`printcalltime()`、`printaddress()`
- 计算费用函数 `callcost()`、`messagecost()`、`sumcost()`
### MainPage 页面
该页面含有两个 TextBox,输入字符串时触发 `MainPage::TextBox_TextChanged` 函数,将文本内容分别赋值给 `_MainPage::name` 和 `_MainPage::number`。定义一个 `information` 类对象指针 `info`,在按动 Button 时触发 `MainPage::Button_Click` 函数,调用 `information` 的构造函数初始化 `info`,初始化两个 `address` 对象 `a1`、`a2`,通过 `data::info->addressinitialize` 函数压入 vector 中,并且跳转到 `ciPage` 页面
### ciPage 页面
该页面含有 5 个 button,分别跳转 `CallPage`、`SMSPage`、`AddressPage`、`CostMapPage`、`addressperfectPage` 页面
### CostMapPage 页面
该页面含有 6 个 TextBlock:
1. 载入时用 `help::toPlaStr()` 函数将 `data::info->printcalltime()`(返回通话时间的函数)从 C++ string 向 UWP 转化,给 `(TextBlock^)sender)->Text` 赋值,并在其中显示
2. 同 1,调用 `printmessagenum()` 函数
3. 使用 `callcost` 函数计算通话费用,先将通话时间向上取整,再乘通话单价,转化成 `string` 类型返回,在 TextBlock 中显示。
4. 同 3,调用 `messagecost` 显示短信费用
5. 先用 `Type stringToNum`(用来将 `string` 转化成 `Type`)模板函数(令 `Type` 等于 `double` 型),将 `messagecost()` 和 `callcost()` 转化成 `double` 类型相加后再将结果转化成 `string`,用 `help::toPlaStr` 转化后在 TextBlock 中显示
6. 调用 `printtraffic` 函数返回流量值显示流量费用
该页面含有两个 button:
- 返回 `ciPage`
- 跳转 `SMSlogPage`(短信记录页面)
### SMSlogPage 页面
该页面有一个 TextBlock,载入时调用 `smslogprint` 函数,循环 `sms.size()` 次(`sms` 为 `info` 中的短信 `vector` 成员),每次循环将循环下标对应的 `sms` 的 `Recipientnum` 和 `messagecontent` 成员通过 `sms[i].printRecipientnum` 和 `sms[i].printmessagecontent` 函数压入 `str` 字符串中并将其返回显示。
该页面有一个 button 用来跳转 `ciPage`
### addressperfectPage(通讯录完善页面)
该页面有 6 个 TextBlock,内容发生改变时触发 `TextBox_TextChanged` 函数,将输入的 6 条信息分别存入 `no`、`name`、`unit`、`num`、`email`、`type`,用 `help::toStdStr` 转化后给 `address` 类对象 `temp` 成员初始化,使用 `data::info->addressinitialize` 函数压入 `vector` 中
该页面有 1 个 button 用来返回 `ciPage`
### AddressPage(通讯录页面)
该页面有一个列表,先使用 `appendItem` 函数用来向纵向堆栈中添加条目,通过 for 循环(截止条件为通讯录中联系人个数)动态生成 `n` 个条目,列表内容通过 `data::info->printaddname(i)` 显示联系人姓名。
点击每一个条目时,将点击的条目的内容存入 `content`,用 `data::info->searchadd` 函数进行搜索,返回值为选中 `add` 的下标赋值给 `_contactPage::selectSub`,并且进入 `contactPage`
也可以在 TextBox 中搜索联系人姓名,姓名存入 `_AddressPage::searchname`,同样使用 `data::info->searchadd` 搜索获得 `add` 下标赋值给 `_contactPage::selectSub`,按动 button2 进入 `contactPage`
### contactPage(名片页):
通过 `_contactPage::selectSub` 分别调用 `info` 的 6 个 `print` 函数,获取该联系人的信息在 6 个 TextBlock 中展示
按动 button 返回 `AddressPage`
### cost 类的结构与功能设计
![89a8b334cf1b67ef2297d2cdd0b33a9b.PNG](https://cdn.nlark.com/yuque/0/2024/png/2469055/1714006690583-4ea26c3b-e230-4af9-b559-7aa6f0b6ba9f.png#averageHue=%23f9f9f9&clientId=u6af1c28d-1e8f-4&from=paste&height=585&id=uaafe1292&originHeight=731&originWidth=996&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=83018&status=done&style=none&taskId=udbb26fb0-bff6-4c2f-87be-f64318c4fd9&title=&width=796.8)
没有合适的资源?快使用搜索试试~ 我知道了~
基于C++实现的手机计费系统【100010649】
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共108个文件
h:30个
xaml:22个
cpp:16个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
![star](https://csdnimg.cn/release/downloadcmsfe/public/img/star.98a08eaa.png)
温馨提示
详情介绍:https://www.yuque.com/sxbn/ks/100010649 本项目为使用C++实现的手机计费系统。本项目实现的的功能有:计算通话费用、短信费用、流量费、总费用;定时更新实时费用对象;模拟通话、发短信记录,显示通讯录信息、有电话拨通的声音。
资源推荐
资源详情
资源评论
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![application/octet-stream](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 108 条
- 1
- 2
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
- xin_annn2023-09-06资源和描述一致,质量不错,解决了我的问题,感谢资源主。
- cncsupupup2023-09-04这个资源值得下载,资源内容详细全面,与描述一致,受益匪浅。
![avatar](https://profile-avatar.csdnimg.cn/fbed2db386fd4018b8f2474d6651545d_s1t16.jpg!1)
神仙别闹
- 粉丝: 2712
- 资源: 7668
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)