⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vehicle.cpp

📁 含有文章和源码
💻 CPP
字号:
                                  // Chapter 7 - Program 2
#include "vehicle.h"



              // initialize to any data desired
void vehicle::initialize(int in_wheels, float in_weight)
{
   wheels = in_wheels;
   weight = in_weight;
}


              // get the number of wheels of this vehicle
int vehicle::get_wheels()
{
   return wheels;
}


              // return the weight of this vehicle
float vehicle::get_weight()
{
   return weight;
}


              // return the weight on each wheel
float vehicle::wheel_loading()
{
   return weight/wheels;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -