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

网站的关键词库wordpress禁止谷歌字体大小

网站的关键词库,wordpress禁止谷歌字体大小,直接打开百度,成都最新通告今天一、问题描述#xff1a; Package继承层次#xff0c;采用继承实现快递包裹的分类计价#xff08;分为空运2日达、陆运3日达#xff09;。自定义一个或多个快递公司#xff0c;自定义计价方法#xff0c;设计合适、合理的界面文本提示#xff0c;以广东省内某市为起点 Package继承层次采用继承实现快递包裹的分类计价分为空运2日达、陆运3日达。自定义一个或多个快递公司自定义计价方法设计合适、合理的界面文本提示以广东省内某市为起点采用用户输入目的地点省份或省份缩写等、货物重量和快递时效类型的方式计算快递运费达到做成一个快递运费查询或者发快递的小软件。二、目的 1. 验证private、protect、public继承权限对数据成员和成员函数的权限影响 2. 掌握继承的优势采用合适的继承方法解决实际问题。 三、问题具体解决方法 1、首先创建基类Package并在构造函数内对变量进行初始化用a来判断用户所选择的快递为哪个。在各快递函数内定义各种费用。 class Package { public:Package(double weight,int a,int b,int c)//Package的构造函数 {weight_mweight;this-c c;firstWeight1;switch(a){case 1: EMS(); break;case 2: YTO(); break;case 3: YUNDA();break;case 4: ZTO(); break;case 5: SF(); break;case 6: STO(); break;}}void EMS()//邮政 {if(c1)//省内包裹 {LandFreight6;}else//省外包裹 {LandFreight8; } continuationWeight_Price3;AirFreight10;}void YTO()//圆通 {if(c1)//省内包裹 {LandFreight8;}else//省外包裹 {LandFreight10; } continuationWeight_Price1.5;AirFreight12;}void YUNDA()//韵达 {if(c1)//省内包裹 {LandFreight8;}else//省外包裹 {LandFreight10; } continuationWeight_Price3;AirFreight9;} void ZTO()//中通 {if(c1)//省内包裹 {LandFreight5;}else//省外包裹 {LandFreight8; } continuationWeight_Price2;AirFreight14;}void SF()//顺丰 {if(c1)//省内包裹 {LandFreight7;}else//省外包裹 {LandFreight9; } continuationWeight_Price2.5;AirFreight9;}void STO()//申通 {if(c1)//省内包裹 {LandFreight10;}else//省外包裹 {LandFreight12; } continuationWeight_Price1.5;AirFreight15;}double getLandFreight(){return LandFreight;}double getAirFreight(){return AirFreight;}double calculateFees(double firstWeight_Price)//计算快递费 {expressFee firstWeight_Price (weight_m - firstWeight)*continuationWeight_Price;return expressFee;} private:double weight_m;//总重量double firstWeight_Price;//首重价格 double continuationWeight_Price;//续重价格 double firstWeight; //首重 double continuationWeight;//续重 double expressFee;//快递费 double LandFreight;//陆运首重价格 double AirFreight;//空运首重价格 int c; }; 2、空运两日达类是Package类的派生类打印输出用户所需支付的快递费用。 class twoDayDeliver:protected Package//空运两日达 { public: twoDayDeliver(double weight_,int a_,int b_,int c_):Package(weight_,a_,b_,c_){ }void outputAmount(){cout你所需支付的快递费为空运: calculateFees(getAirFreight())endl;} }; 3、陆运三日达类功能同上。 class threeDayDeliver:private Package//陆运三日达 { public:threeDayDeliver(double weight_,int a_,int b_,int c_):Package(weight_,a_,b_,c_){ }void outputAmount(){cout你所需支付的快递费为陆运: calculateFees(getLandFreight())endl;} }; 4、测试类的功能。注意可以增加多一点交互。 int main() {int k;int a;//记录选择的快递公司的代号 int b;//记录选择的寄件方式(空/陆) int c;//记录所寄件的省份的是否为省内 string destination;//记录目的地 double weight;//记录包裹重量 cout********************下面为所提供的快递公司的具体收费情况********************endl*公司名称编号 续重价格: 陆运首重价格省内/省外 空运首重价格 *endl *邮政1 3/斤 6/8 10 *endl*圆通2 1.5/斤 8/10 12 *endl*韵达3 3/斤 8/10 9 *endl*中通4 2/斤 5/8 14 *endl*顺丰5 2.5/斤 7/9 9 *endl*申通6 1.5/斤 10/12 15 *endl******************************************************************************endl;cout请输入你想寄的包裹的个数endl;cink; while(k0){cout请输入选择的快递公司的代号1~6endl;cina;cout请输入所寄包裹的目的地(缩写开头字母)endl;cindestination;cout请输入所寄包裹的总重量(以斤为单位)endl;cinweight;cout请选择寄件方式输入编号1.陆运2.空运 endl;cinb;if(destinationGD||destinationgd)//判断目的地是省内还是省外 {c1;}else{c0;} if(b1)//判断选择的是陆运还是空运并计算运费 { threeDayDeliver t2(weight,a,b,c);//创建了一个threeDayDeliver的对象陆运 t2.outputAmount(); } else{twoDayDeliver t3(weight,a,b,c);//创建了一个twoDayDeliver的对象空运t3.outputAmount();}k--;coutendl;} return 0; } 四、完整代码。 #includeiostream #includecstring using namespace std; class Package { public:Package(double weight,int a,int b,int c)//Package的构造函数 {weight_mweight;this-c c;firstWeight1;switch(a){case 1: EMS(); break;case 2: YTO(); break;case 3: YUNDA();break;case 4: ZTO(); break;case 5: SF(); break;case 6: STO(); break;}}void EMS()//邮政 {if(c1)//省内包裹 {LandFreight6;}else//省外包裹 {LandFreight8; } continuationWeight_Price3;AirFreight10;}void YTO()//圆通 {if(c1)//省内包裹 {LandFreight8;}else//省外包裹 {LandFreight10; } continuationWeight_Price1.5;AirFreight12;}void YUNDA()//韵达 {if(c1)//省内包裹 {LandFreight8;}else//省外包裹 {LandFreight10; } continuationWeight_Price3;AirFreight9;} void ZTO()//中通 {if(c1)//省内包裹 {LandFreight5;}else//省外包裹 {LandFreight8; } continuationWeight_Price2;AirFreight14;}void SF()//顺丰 {if(c1)//省内包裹 {LandFreight7;}else//省外包裹 {LandFreight9; } continuationWeight_Price2.5;AirFreight9;}void STO()//申通 {if(c1)//省内包裹 {LandFreight10;}else//省外包裹 {LandFreight12; } continuationWeight_Price1.5;AirFreight15;}double getLandFreight(){return LandFreight;}double getAirFreight(){return AirFreight;}double calculateFees(double firstWeight_Price)//计算快递费 {expressFee firstWeight_Price (weight_m - firstWeight)*continuationWeight_Price;return expressFee;} private:double weight_m;//总重量double firstWeight_Price;//首重价格 double continuationWeight_Price;//续重价格 double firstWeight; //首重 double continuationWeight;//续重 double expressFee;//快递费 double LandFreight;//陆运首重价格 double AirFreight;//空运首重价格 int c; };class twoDayDeliver:protected Package//空运两日达 { public: twoDayDeliver(double weight_,int a_,int b_,int c_):Package(weight_,a_,b_,c_){ }void outputAmount(){cout你所需支付的快递费为空运: calculateFees(getAirFreight())endl;} };class threeDayDeliver:private Package//陆运三日达 { public:threeDayDeliver(double weight_,int a_,int b_,int c_):Package(weight_,a_,b_,c_){ }void outputAmount(){cout你所需支付的快递费为陆运: calculateFees(getLandFreight())endl;} };int main() {int k;int a;//记录选择的快递公司的代号 int b;//记录选择的寄件方式(空/陆) int c;//记录所寄件的省份的是否为省内 string destination;//记录目的地 double weight;//记录包裹重量 cout********************下面为所提供的快递公司的具体收费情况********************endl*公司名称编号 续重价格: 陆运首重价格省内/省外 空运首重价格 *endl *邮政1 3/斤 6/8 10 *endl*圆通2 1.5/斤 8/10 12 *endl*韵达3 3/斤 8/10 9 *endl*中通4 2/斤 5/8 14 *endl*顺丰5 2.5/斤 7/9 9 *endl*申通6 1.5/斤 10/12 15 *endl******************************************************************************endl;cout请输入你想寄的包裹的个数endl;cink; while(k0){cout请输入选择的快递公司的代号1~6endl;cina;cout请输入所寄包裹的目的地(缩写开头字母)endl;cindestination;cout请输入所寄包裹的总重量(以斤为单位)endl;cinweight;cout请选择寄件方式输入编号1.陆运2.空运 endl;cinb;if(destinationGD||destinationgd)//判断目的地是省内还是省外 {c1;}else{c0;} if(b1)//判断选择的是陆运还是空运并计算运费 { threeDayDeliver t2(weight,a,b,c);//创建了一个threeDayDeliver的对象陆运 t2.outputAmount(); } else{twoDayDeliver t3(weight,a,b,c);//创建了一个twoDayDeliver的对象空运t3.outputAmount();}k--;coutendl;} return 0; } 五、运行情况展示。
http://www.dnsts.com.cn/news/84820.html

相关文章:

  • 网站建设和网络营销区别如何去掉2345网址导航
  • 仿各个网站的问题wordpress mysql pdo
  • 金华高端网站设计汇算清缴在哪个网站做
  • 自发购卡网站在吗做厦门人才网官网
  • 舞蹈网站模版哈尔滨建设网证照查询
  • 作风建设主题活动 网站国外产品设计网
  • 百度统计会对原网站产生影响吗海外交易平台有哪些
  • 分分作网站wordpress主题一点就升级
  • 石家庄城乡建设部网站首页wordpress时间中文版
  • 淘宝客新增网站什么是cms系统
  • 上海市城市建设投资开发总公司网站wordpress 图片重命名
  • 威海外贸建站少儿编程加盟店8
  • 山东恒正建设有限公司 网站更改网站伪静态
  • 上海市嘉定区建设银行网站成都建设网站多少钱
  • 网站后台免费模板哪里找装修设计师
  • 鄞州区网站建设报价工程建设中常见的法律责任有哪些
  • 中国上海官网南宁seo团队计划
  • 企业网站设计怎么做后端开发工程师
  • 有哪些网站做国外生意的sae wordpress 4.3
  • 石家庄营销推广网站策划网站建设
  • 数码网站建设电脑编程教学入门教程
  • 县总工会网站建设情况介绍国家企业信用信息公示网官网查询
  • 上海有名的网站建设公司有哪些网站开发模版
  • 赣州市做网站科技手札
  • 网站制作国内知名企业磁力网站怎么做的
  • 备案号如何绑定多个网站游戏开发定制
  • 如何为自己公司做网站公司网站制作风格
  • 怎样用jsp做网站登录自己做的网站怎么被搜录
  • 腾讯建站模板python版 wordpress
  • 网站建设对客户的优势表白网站