当前位置:天才代写 > C++/C代写,c语言代写代考-100%安全,包过 > C++ midterm考试帮助辅导quiz,在线远程代考

C++ midterm考试帮助辅导quiz,在线远程代考

2018-03-23 08:00 星期五 所属: C++/C代写,c语言代写代考-100%安全,包过 浏览:1108

QQ图片20180323113506.jpg

QQ图片20180323113510.jpg

Question 1- 1.cpp code:

#include #include using namespace std;
double SquareRoot(double d)
{
    double x=1;
    for(int i=0;i<1000;++i)
    {
        double t=d/x;
        x=(x+t)/2;
    }
    return x;
}
int main()
{
    double res=SquareRoot(17);
    cout.setf(ios::fixed);
    cout << setprecision(4) << res << endl;
    return 0;
    
}

Rectangle.cpp code

#include "Rectangle.h"
Rectangle::Rectangle(int h,int w)
{
    height=h;
    width=w;
}
Rectangle::Rectangle(const Rectangle &other)
{
    height=other.height;
    width=other.width;
}
Rectangle & Rectangle::operator=(const Rectangle &other)
{
    height=other.height;
    width=other.width;
    return *this; 
}
int Rectangle::getheight()
{
    return height;
}
int Rectangle::getwidth()
{
    return width;
}
void Rectangle::setheight(int h)
{
    height=h;
}
void Rectangle::setwidth(int w)
{
    width=w;
}
int Rectangle::getArea()
{
    return height*width;
}
int Rectangle::getCircumference()
{
    return 2*(height+width);
}

Question 2- 2.cpp code:

#include#include "Rectangle.h"
using namespace std;
int main()
{
    Rectangle r(8,5);
    cout<<"The area is:"<<r.getArea()<<endl;
    cout<<"The circumference is:"<<r.getCircumference()<<endl;
    r.setheight(10);
    r.setwidth(8);
    cout<<"After the chage"<<endl;
    cout<<"The area is:"<<r.getArea()<<endl;
    cout<<"The circumference is:"<<r.getCircumference()<<endl;
    return 0;
    
}

Rectangle.cpp 2 part code:

#ifndef _RECTANGLE_H
#define _RECTANGLE_H
class Rectangle
{
private:
    int height;
    int width;
public:
    Rectangle(int h=1,int w=1);
    Rectangle();
    Rectangle (const Rectangle &other);
    Rectangle & operator=(const Rectangle &other);
    int getheight();
    int getwidth();
    void setheight(int h);
    void setwidth(int w);
    int getArea();
    int getCircumference();
    
};
#endif

Score:98

代写CS&Finance|建模|代码|系统|报告|考试

编程类:C++,JAVA ,数据库,WEB,Linux,Nodejs,JSP,Html,Prolog,Python,Haskell,hadoop算法,系统 

金融类统计,计量,风险投资,R语言,Python语言,Matlab,建立模型,数据分析,数据处理

服务类:Lab/Assignment/Project/Course/Qzui/Midterm/Final/Exam/Test帮助代写代考辅导

  u=199783060,2774173244&fm=58&s=188FA15AB1206D1108400056000040F6&bpow=121&bpoh=75.jpgalipay_pay_96px_533896_easyicon.net.pngpaypal_96px_533937_easyicon.net.pngchina_union_pay_96px_533911_easyicon.net.pngmastercard_pay_96px_533931_easyicon.net.pngasia_pay_96px_533902_easyicon.net.png

本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝或者Upwork交易!

E-mail:850190831@qq.com   微信:BadGeniuscs  工作时间:无休息工作日-早上8点到凌晨3点


如果您用的手机请先保存二维码到手机里面,识别图中二维码。如果用电脑,直接掏出手机果断扫描。

qr.png

 

    关键字:

天才代写-代写联系方式