> # ♻️ 资源
> **大小:** 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】
共108个文件
h:30个
xaml:22个
cpp:16个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 2 下载量 189 浏览量
2023-02-04
10:07:51
上传
评论
收藏 438KB ZIP 举报
温馨提示
详情介绍:https://www.yuque.com/sxbn/ks/100010649 本项目为使用C++实现的手机计费系统。本项目实现的的功能有:计算通话费用、短信费用、流量费、总费用;定时更新实时费用对象;模拟通话、发短信记录,显示通讯录信息、有电话拨通的声音。
资源推荐
资源详情
资源评论
收起资源包目录
基于C++实现的手机计费系统【100010649】 (108个子文件)
Package.appxmanifest 2KB
XamlTypeInfo.Impl.g.cpp 16KB
XamlTypeInfo.g.cpp 9KB
App.xaml.cpp 4KB
msg.cpp 3KB
AddressPage.xaml.cpp 3KB
addressperfectPage.xaml.cpp 3KB
CallPage.xaml.cpp 2KB
CostMapPage.xaml.cpp 2KB
contactPage.xaml.cpp 2KB
MainPage.xaml.cpp 2KB
ciPage.xaml.cpp 2KB
callingpage.xaml.cpp 2KB
SMSPage.xaml.cpp 2KB
SMSlogPage.xaml.cpp 1KB
pch.cpp 38B
XamlLibMetadataProvider.g.cpp 5B
uwp课设3.vcxproj.filters 3KB
XamlTypeInfo.g.h 12KB
XamlBindingInfo.g.h 2KB
msg.h 2KB
CostMapPage.xaml.h 1KB
addressperfectPage.xaml.h 1KB
CallPage.xaml.h 1KB
App.g.h 1KB
contactPage.xaml.h 1KB
addressperfectPage.g.h 954B
callingPage1.g.h 948B
CostMapPage.g.h 947B
callingpage.g.h 947B
AddressPage.g.h 947B
contactPage.g.h 947B
SMSlogPage.g.h 946B
MainPage1.g.h 945B
MainPage.g.h 944B
CallPage.g.h 944B
SMSPage.g.h 943B
ciPage.g.h 942B
AddressPage.xaml.h 925B
ciPage.xaml.h 786B
callingpage.xaml.h 721B
MainPage.xaml.h 702B
SMSPage.xaml.h 631B
App.xaml.h 607B
SMSlogPage.xaml.h 521B
help.h 461B
data.h 109B
pch.h 102B
CallPage.g.hpp 6KB
CostMapPage.g.hpp 5KB
addressperfectPage.g.hpp 5KB
contactPage.g.hpp 4KB
AddressPage.g.hpp 4KB
ciPage.g.hpp 4KB
App.g.hpp 3KB
MainPage.g.hpp 3KB
SMSPage.g.hpp 3KB
callingpage.g.hpp 3KB
SMSlogPage.g.hpp 2KB
XamlBindingInfo.g.hpp 381B
LICENSE 34KB
README.md 6KB
铃声.mp3 201KB
uwp课设3_TemporaryKey.pfx 2KB
p3.png 81KB
p2.png 59KB
SplashScreen.scale-200.png 8KB
Wide310x150Logo.scale-200.png 3KB
Square150x150Logo.scale-200.png 3KB
Square44x44Logo.scale-200.png 2KB
StoreLogo.png 1KB
LockScreenLogo.scale-200.png 1KB
Square44x44Logo.targetsize-24_altform-unplated.png 1KB
uwp课设3.sln 3KB
uwp课设3.vcxproj 14KB
CostMapPage.xaml 4KB
CostMapPage.xaml 4KB
addressperfectPage.xaml 3KB
contactPage.xaml 2KB
addressperfectPage.xaml 2KB
CallPage.xaml 2KB
contactPage.xaml 2KB
CallPage.xaml 2KB
AddressPage.xaml 1KB
ciPage.xaml 1KB
AddressPage.xaml 1KB
SMSPage.xaml 1KB
MainPage.xaml 1KB
ciPage.xaml 1KB
SMSPage.xaml 1KB
MainPage.xaml 1KB
callingpage.xaml 1KB
callingpage.xaml 1KB
SMSlogPage.xaml 875B
SMSlogPage.xaml 836B
App.xaml 227B
App.xaml 226B
CostMapPage.xbf 3KB
addressperfectPage.xbf 2KB
contactPage.xbf 2KB
共 108 条
- 1
- 2
资源评论
- xin_annn2023-09-06资源和描述一致,质量不错,解决了我的问题,感谢资源主。
- cncsupupup2023-09-04这个资源值得下载,资源内容详细全面,与描述一致,受益匪浅。
神仙别闹
- 粉丝: 2714
- 资源: 7669
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功