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

南充外贸网站建设网站建设的税率

南充外贸网站建设,网站建设的税率,哪个汽车网站好,博客网站入口一、Xmind整理#xff1a; 二、上课笔记整理#xff1a; 1.静态数据成员静态成员函数#xff08;银行账户实例#xff09; #include iostreamusing namespace std;class BankAccount { private:double balance; //余额static double interest_rate; //利率 p…一、Xmind整理 二、上课笔记整理 1.静态数据成员静态成员函数银行账户实例 #include iostreamusing namespace std;class BankAccount { private:double balance; //余额static double interest_rate; //利率 public://无参构造函数BankAccount (){}//有参构造函数BankAccount(double balance):balance(balance){}//静态成员函数,获取当前利率static double getInterestRate(){return interest_rate;}//静态成员函数设置当前利率、static double setInterestRate(double rate){interest_rate rate;}//静态成员函数获取连本带利的全额static double getLastMoney(BankAccount account){return account.balance*(1interest_rate);} };double BankAccount::interest_rate 0.05;int main() {cout 当前利率 BankAccount::getInterestRate() endl;BankAccount::setInterestRate(0.03);cout 当前利率 BankAccount::getInterestRate() endl;BankAccount account1(2000.0);BankAccount account2(3000.0);cout 第一个人连本带利的余额为 BankAccount::getLastMoney(account1) endl;return 0; }2.类的继承 #include iostreamusing namespace std;//封装 人 类 父类/基类 class Person { private:string name; protected:int age; public:int h; public://无参构造函数Person(){cout 父类的无参构造函数 endl;}//有参构造Person(string name, int age, int h):name(name),age(age),h(h){cout 父类的有参构造函数 endl;}//拷贝构造函数Person(const Person other):name(other.name),age(other.age),h(other.h){cout 父类的拷贝构造函数 endl;}//拷贝赋值函数Person operator(const Person p){name p.name;age p.age;h p.h;cout 父类的拷贝赋值函数 endl;return *this;}void show(){cout 父类的show endl;} };//封装 学生 类 共有继承人 类 class Stu:public Person //子类 、派生类 { private:int id;int math;public://无参构造函数Stu(){cout 子类的无参构造函数 endl;}//有参构造函数Stu(string name, int age, int h, int id, int math):Person(name,age,h),id(id),math(math){cout 子类的有参构造函数 endl;}//拷贝构造函数Stu(const Stu s):id(s.id),math(s.math),Person(s){cout 子类的拷贝构造函数 endl;}//拷贝赋值函数Stu operator(const Stu s){Person::operator(s);id s.id;math s.math;cout 子类的拷贝赋值函数 endl;return *this;}void show(){cout 子类的show endl;cout h endl; //通过共有继承类外、子类可以访问父类共有成员cout age endl; //通过共有继承子类可以访问父类保护成员,类外不可以访问//cout name endl;//通过共有继承子类不可访问父类私有成员,类外不可以访问} };int main() {Stu s(zhangsan,12,190,1001,78);Stu s2s;Stu s3;s3 s2;// s.show(); // s.Person::show();return 0; } 3.多继承 #include iostreamusing namespace std;class Sofa { private:string sitting; public://无参构造函数Sofa(){cout 沙发的无参构造 endl;}//有参构造函数Sofa(string s):sitting(s){cout 沙发的有参构造 endl;}void display(){cout sitting endl;} };class Bed { private:string sleep; public://无参构造函数Bed(){cout 床的无参构造 endl;}//有参构造函数Bed(string(s)):sleep(s){cout 床的有参构造 endl;}void display(){cout sleep endl;} };class Sofa_Bed:public Bed,public Sofa { private:int w; public://无参构造函数Sofa_Bed(){cout 沙发床的无参构造 endl;}//有参构造函数Sofa_Bed(string sit, string s, int w):Bed(s),Sofa(sit),w(w){cout 沙发床的有参构造 endl;} }; int main() {Sofa_Bed(s);Sofa_Bed s1(可坐,可躺,123);s1.Sofa::display();s1.Bed::display();return 0; }
http://www.hkea.cn/news/14319382/

相关文章:

  • 网站收录怎么删公司变更名字需要什么手续
  • 网站自动弹窗代码莱芜在线论坛莱芜一中李念学
  • 公司制作网站价格合肥画册设计公司
  • 做网站建设怎么跑客户怎么做网站自动响应
  • 泸州大浪科技做网站个人网页的设计与制作价值
  • 网站设计网站类型制作社交网站
  • 营销型网站如何制作安徽省建设部网站
  • 亿景网站建设百度搜索指数排名
  • 石家庄网站优化多少钱请别人做网站有风险吗
  • 公司网站怎么做产品图片什么是网站结构
  • 公司的做网站wordpress 分类 标题
  • 网站建设前期如何规划平台设计方法
  • 软件公司网站素材内蒙古建设工程交易服务中心网站
  • 张家港网站优化从做系统后以前的网站打不开了怎么办
  • 上海市开办企业一窗网上服务seo优化标题 关键词
  • 企业门户网站开发源码管理咨询公司是做什么
  • 做外贸网站市场分析十大农业网站
  • 如何做汽车团购网站asp flash网站模板
  • 自建网站平台可以实现哪些功能网站搭建平台选哪个
  • 做网站页面大小多大做公益网站又什么要求
  • asp.net 大型网站开发个人网站好备案吗
  • 学校做好网站建设目的女排联赛最新排行榜
  • 哪个网站做logo好邯郸大网站
  • 西安 网站建设 费用西丽网站建设设计
  • 外贸网站推广有哪些做电商设计在哪个网站接单
  • 深圳住房和建设局网站 招标专业网站设计开发
  • 网站重新建设的请示网站备案阿里云流程
  • 网站设计的需求如何给网站做权重
  • 天津做网站的广州建设网站专家
  • 佛山市和城乡建设局网站首页中国纪检监察报社长范清安