91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-04
  • 語言: C/C++
  • 標簽: UserApp.cpp??

資源簡介

Package-delivery services, such as FedEx?, DHL? and UPS?, offer a number of different shipping options, each with specific costs associated. Create an inheritance hierarchy to represent various types of packages.

資源截圖

代碼片段和文件信息

#include
#include
using?namespace?std;
class?Shape
{
public?:
virtual?void?draw(){
cout<<“drow?Shape!“< }
};
class?Point
{
public:
double?x;
double?y;
};
class?Triangle:public?Shape
{
public:
Point?a;
Point?b;
Point?c;
void?draw(){
cout<<“Triangle!“< cout<<“(“< cout<<“(“< cout<<“(“<};
class?Square:public?Shape
{
public:
Point?v1;
double?width;
void?draw(){
cout<<“Square!“< };
};
class?Rectangle:public?Shape
{
public:
Point?a;
Point?b;
double?width;
double?height;
void?draw(){
cout<<“Rectangle!“< };
};
class?Graphics:public?Shape
{
public?:
vector?shapes;
void?add(Shape?*shape){
shapes.push_back(shape);
};
void?draw(){
for(int?i=0;i {
Shape?*shape=shapes[i];
shape-

評論

共有 條評論

相關資源